Hi I'm new with stm32, I bought an stm32f0discovery but I can't work with it I wanna get help or some tutorial please.
Why can't you "work with it"? Where are you stuck? What have you tried?
For basic getting-started tips, see: https://community.st.com/thread/46923-stm32l162#comment-182758
Please don't put the entire question in the subject line!
Maybe we should have FAQ page since many questions are asked again and again without searching the site (not sure if the searching works fine now - it works at least for me). The basic stuff:
-how to start
-where the training materials are stored
-some basic projects e.g LED blinking (*.ioc based projects) - not everybody find ST delivered examples interesting when he/she would like to start - these examples have no ioc files what is particularly important when you want to use BSP (I shared several project for a few Discovery boards)
Your post is really good to be re-used here....
Bogdan Golab wrote:many questions are asked again and again without searching
Bogdan Golab wrote:
many questions are asked again and again without searching
and there's the fundamental flaw: people who don't search won't find the FAQ.
I guess it would help people like you - instead of writing time consuming posts you would just add a link to the FAQ:)
On the other hand we all could update such FAQ to have shared (and updated) knowledge base. In theory.
Could I use arduino modules such as esp8266 for wifi or sdcard module ?
Yes, it is certainly possible.
Whether you, specifically, have the necessary skills and experience is less certain ...
Generally you can use arduino shields. CAre should be taken if a particular modules uses 5V logic - e.g. arduino shield with LCD 48x84 display has also joystick on board and uses analog pin - so in this case a divider would be helpful to avoid connecting 5V input directly.
The conclusion is: it's worth studying the schematic earlier. It is always worth to check voltage - STM32 is definitely 3.3V powered devices - It has 5V available to power other stuff but uses 3.3V and not all pins are 5V tolerant.
Thanks, actually I find it more difficult especially the F0 Discovery. But I'm gonna try
You find what "more difficult"?
And, "more difficult" - than what?
As you know the beginning is always the hardest part and I'm an electronics engineering student, so I'm not skilled in programming, and Arduino avr is not as arm ones.
Study books/datasheets, do experiments to verify what you have learned, ask for feedback / advise. I work this way.
The whole point of being a student is to study - the clue is in the name!
It has been said that the sign of a good education is not what you know, but what you know how to find out.
Your first focus should be to keep up with your classes, lectures, reading, study and assignments - these will equip you with the skills needed to be able handle this stuff.
Don't try to run ahead, or off on a tangent. before you've thoroughly covered the basics.
Nidhal Abidi wrote:Arduino avr is not as arm ones.
Nidhal Abidi wrote:
Arduino avr is not as arm ones.
AVR is not fundamentally different from ARM; it's just a difference in scale - not in fundamental principles.
Yes, it does not have the Arduino connector, but connections can be made with wires, maybe via a breadboard... If you wanted Ardunio connectivity, you should have bought a Nucleo board
You mentioned ESP8266 - the cheapest modules have non-arduino connectors so you need to wire them using a few cables. Arduino connector won't help here too much.
The pins can be easily identified - use CubeMX to allocate resources (UART + GPIO in this case). To handle UART you need only two functions: HAL_UART_Transmit / HAL_UART_Receive. GPIO is handles similarly. You spend most of the time on ESP8266 module because the STM32 part in really simple here.
STM32 needs some skill in C and C++ more and more then arduino specially the avr. I find it a bit difficult to start with. and I didn't find a lot of projects with codes for stm32f0 like Nucleo or F4. But for sure I will find a way as always.
You don't need both C and C++.
For widest support, stick to just C
Nidhal Abidi wrote:I find it a bit difficult to start with
I find it a bit difficult to start with
So did you look at the "basic getting-started tips" I linked as the very first reply?
The answer to your question generally requires more information about your skills and your difficulties than you are willing to provide.
With that said, I did a series of "getting started with ..." On stm32 and other chips / tools. While the details vary, the gist is the same.
Also, there is a stm32 port of the Arduino, and I had a (few) generic port of Arduino to stm32, including the f0 chip.
I can post a link later. Or you can search "xduino" on GitHub.
Note that STM32 is now supported directly in the Arduino IDE: STM32 cores enabled in Arduino™ IDE
Previously, there were a number of "Arduino-like" things - including Maple, stm32duino, the above-mentioned "xduino", et al ...
On the top of information provided by Andrew let me share with you a presentation, which guides how to get started step by step with STM32 and Arduino IDE. Please find a file attached.
Excellent guide! Now, two things must be addressed in the future:
1 - markings on the Nucleo boards for all 5V tolerant pins (Microchip has a migration guide from 5V to 3.3V, do you have something similar?) - you can't imagine how useful is this for the person that come from the 8bit/5Vcc microcontrollers that still have a plethora of 5Vcc peripherals on his cabinet and in fact, continue to develop for those micros (every time he hits his head on an STM32 specific problem);
2 - the Arduino/Wiring language implemented over the LL driver - having it implemented on the HAL is just ridiculous! HAL itself is already a "Wiring language". It can make a real difference in the Arduino world, so don't be so stingy...
Vasile Guta_Ciucur wrote:It can make a real difference in the Arduino world
Vasile Guta_Ciucur wrote:
It can make a real difference in the Arduino world
Well, it's all open source - so, if you think it should be done, get on and do it!
don't be so stingy...
Andrew Neil wrote: ...don't be so stingy...Indeed!
Andrew Neil wrote:
Hey could I use the integrated st-link v2 in the stm32f0discovery to flash or to program something else or other chip. It exists 6 pins (SWD) ???
Thanks I did read it but how. Is it possible to flash arduino via the " ISP header 6-pins" ???
It will only program other STM32s.
The Arduino you refer, uses 8bit AVR microcontrollers like (ATmega168, ATmega328, etc.). This Nucleo board has an Arduino connector (I don't know which is the pinout for your specific board) and have the Arduino Libraries ported to the STM32 microcontroller.
Now, there is the Arduino ISP scketch that can transform a simple original Arduino board into an ATmega programmer. If the Arduino libraries were correctly and completely ported to STM32, you can indeed transform the STM32 into an ATmega/Arduino programmer that can program ATmega chips but there are the same restrictions as for the Arduin DUE and Arduino ZERO.
I suppose you bought this board and found that is to hard to work with and now you would like to program an ATmega controler as Arduino board... ask someone near your place to solve your problem, as this is beyond beginner's level.
"Is it possible to flash arduino via the " ISP header 6-pins" ??? "
yes, on any chip made by anyone so long as it follows STM's programming protocol.
Retrieving data ...