The STM32 Discovery boards are nothing new, we’ve looked at them several times. But the newest sibling in the line might be just the thing to make the leap from your steadfast 8-bit projects. We got our hands on it and recorded a video review.
The STM32F0-Discovery gives you a programmer and ARM Cortex-M0 chip all on one convenient board. The top portion is the ST-Link V2 programmer, and includes jumpers and a programming header which let it easily program off-board chips.
The included microcontroller is an STM32F051R8T6 which includes 64kb of program memory and 8kb of RAM. Coming in at $1.80-3.77 in single units and in a hand-solderable LQFP package this raises an eyebrow for our future projects. It has an 8 MHz internal oscillator with 6x PLL which means you can run at 48 MHz without an external crystal (check out [Kenneth Finnegan’s] PLL primer if you don’t know what this is).
The only thing holding us back is the development environment. ST provides everything you need if you’re on Windows, but we want a Linux friendly solution. We know other Discovery boards have worked under Linux thanks to this project. This uses the same ST-LINK V2 so it should work as well. If you want one of your own head over the ST page to see if they’re still giving away samples. There should be a button labeled “Register for your FREE KIT”.
I just got one last Tuesday at one of their free seminars they are doing. They provide breakfast, lunch and a some hands on demos. Oh and don’t forget the sales pitch of some of their products.
Actually I should take we got two, since my fiance went too.
They really need to do a seminar on their peripheral library. It is kind of convoluted and every example they use does things a different way than the previous one (like initializing IO for example).
Ugh, “kind of convoluted” is an understatement. What a mess.
Meh, awesome chips, but there are way better STM32 boards than those lame Discovery boards. I would recommend anyone to just buy one which uses the inbuilt UART bootloader off ebay.
The time wasted with the crippleware IDEs and unofficial tools will outnumber the board cost in no time.
The convolutedness and brokenness of the USB protocol make it glaringly obvious that it was made that way on purpose.
about dealing with the bad IDEs: I also got sick of them, and just got Eclipse and got the ARM-GCC plug in for it. I can load binaries using the ST Link utility. Debugging is a pain, there is a way to get GDB working with the ST Link through some really painful workaround involving stealing a component out of Atollic’s IDE. but I never had to use fancy debugging in my AVR days so I’m not complaining so much.
You can use http://github.com/texane/stlink instead of the Atollic gdbserver, it works quite well.
CooCox works with Discovery. However, I don’t know if F0 microcontrollers are supported yet.
Yep Coocox works just fine with my STM32F100 Discovery board. We use it’s DAC output to control a set point controller for our reflow oven.
I purchased the STM32F4 Discovery board from mouser. I am convinced learning to work with such a device will completely change the nature of my engineering endeavors. However, after spending somewhere around 18 hours trying to figure out how to simply utilize the ST-Link with one of the twenty or so development environments I installed, just to upload a demo program…. i now feel rather belittled and realize that I probably overestimated my capabilities and intelligence.
I haven’t lost faith or given up.. It will just be a long while before I torture myself with that learning curve again.
Please don’t let my experience scare any of you off though. I can’t wait to see more hobbyists sharing their experiences and knowledge of such devices with the community. Thank you.
I went through something similar. I’ve more or less given up on doing things that way and just installed eLua onto my STM324F4 Discovery. I’ll file away my F0 Discovery until I have a rainy Sunday to waste away on it.
They now have firmware with lots of working examples uploaded. That should help you get started.
Thank you, I will have a look and a second go. I’ve spent much more time exploring the boards I’ve got from Renesas than I have the STMicro discovery board. I have found the Renesas boards to be a bit more friendly. I may also consider the option mentioned by Mlöck, to find one w/ a UART Bootloader. Perhaps it would be possible to somehow alter the Discovery boards to function the same way.. Best wishes.
I was recently well and truly converted from the atmega’s across to the stm32 chips. Never going back! (especially since the discovery boards are many, many, many times more powerful than an arduino and cheaper to boot.)
I’ve currently got a couple of F1 discovery boards and an F4 one, and am designing a device using an F1 to go into production.
Biggest problem with the F1 discovery is that they use the old stlink V1 programmer, which is pretty awful. I’m amazed ST refuse to allow you to upgrade (the main difference is firmware!) and my attempts to hack the fw upgrade util to do it anyway haven’t worked out yet. I’ve had first-hand accounts that it can be done, so I’ll keep trying.
There is an open source framework that should help that supports the discovery boards: http://libopencm3.org/wiki/Main_Page
Extremely well written, lesser GPL license, consistent, and very clean.
The problem with the Discovery boards is that they’re just so big. They’re so wide they don’t fit on a single breadboard strip! And while the built-in programmer is nice, it makes it nearly twice as long as it needs to be.
So I gave up on it and made my own STM32 board. It’s much smaller, and you can even cut it with a hacksaw to remove the functionality you don’t need. It costs me less than $10 each, fully populated. Check it out at http://www.galacticstudios.org/blackknight/
> ST provides everything you need if you’re on Windows
You cannot program a STM32 Discovery board on Windows if you do not have Administrator privilege. I know this doesn’t matter to 80% of the people out there, but if you’re one of those people who does not login as Administrator (for security reasons), know that you will not be able to program your Discovery board.
to clarify: the STLink utility uses the USB port in a bodgy way that requires it to run with elevated privileges.
I think the same problem exists on Linux, but they solve it by running the process setuid.
Only for the F1 boards. All the other discovery boards use the STLink V2 programmer, which doesn’t use a severely broken USB implementation.
So, would it be possible to make a simple I/O midi interface using this board? Maybe for a C64 or Gameboy (DMG-01)?
I just ordered one, not really sure what I will do with it, but it’s a free microcontroller, so I’m sure I will think of something.
Can’t find the Free Sample button :\
I guess that’s because I live in Italy, or maybe they ran out of boards… could you check?
Still, if it’s in the 10-20USD range (with shipping), I’m probably getting one this summer and have some fun with it (:
Check out the stm32f4 development board:
http://www.mouser.com/ProductDetail/STMicroelectronics/STM32F4DISCOVERY/?qs=J2qbEwLrpCGdWLY96ibNeQ%3d%3d
The free boards are US only, although they will apparently be given away free at some European seminars.
http://www.st.com/internet/com/Learning/stm32f0_europe_seminars.jsp?WT.ac=enews_may12_stm32f0_eur_seminars
The STM32 Journal has some intersting info but is a bit of a marketing brochure
http://www.st.com/internet/com/Learning/stm32_journal.jsp
Joseph Yiu’s book on the Cortex M0 is quite good (also has a M3 book)
http://www.amazon.com/The-Definitive-Guide-ARM-Cortex-M0/dp/0123854776
I’ve been playing with adding a JavaScript interpreter to the STM32VL and STM32F4 discovery boards recently.
stlink is great on Linux – it flashes faultlessly and even works for gdb debugging.
I’ve tried a few different compilers on Linux including summon-arm-toolchain, but I have found that the package gcc-arm-linux-gnueabi on newer Ubuntu distributions actually just installs and works!
The stm32-flash.ld from ST’s projects must be modified to add a line which discards ‘.note.*’, and I haven’t yet got any built-in C libraries to work though. Still, that allows you to do quite a lot out of the box (including using ST’s libraries).
If you need more info and examples concerning the STM32 family go here:
http://www.emcu.it/index.html#STM32
In particular STM32F0 is here:
http://www.emcu.it/STM32F0xx/STM32F0xx.html
Regards E.M.
If there is an F4, why would someone go for the F0? FPU and 168MHz…
Some people don’t need the extra functionality of the F4 so its better to use a cheaper MCU if you don’t need the extra performance. Also if your developing something to be very low power consumption you may want a smaller MCU as it will use a lot less power.
kB, not kb?
I have a problem with SPI in STM32F0-Discovery. No matter what I set the frame size is always 16 bits. Could someone check on your board?
I have the same problem with SPI in STM32F0-Discovery. Use mode half-duplex communication with enable hardware NSS output: BIDIMODE = 1, BIDIOE = 1 and SSM = 0, SSOE = 1.