Now that you know what an STM32 is and what it looks like, it’s time to get your hands on one and get it to do stuff. Ambitious stuff. Like blinking an LED. Dizzying heights of human achievement.
Unless you’re already far too knowledgeable to be reading this page, or someone offered you a very unusual birthday present, you don’t own an STM32 yet. This is problematic because it’s very hard to program a device you don’t have. Luckily, this is easily remedied provided you have a few euros lying around.
ST offers all sorts of development tools for their products, much like all their competitors. Unlike most of them, though, they also target “the little people”, you and me, and not just big engineering companies. As part of that strategy, they offer the very good yet extremely cheap Nucleo range of development boards, similar to Arduino boards. It’s a set of three designs adapted to MCU’s of different complexity, with prices between ten and thirty euros. Yeah, they aren’t turning a profit on those.
(Left to right : Nucleo 32, Nucleo 64 and Nucleo 144.)
The Nucleo 32 is the size of an Arduino Nano and shares most of its pinout. It’s so small you could easily fit one in an actual product, or at least a prototype. The trade-off is you’re limited to very few I/O pins, but there’s still a lot to go around.
The Nucleo 64 is the size of a credit card and can take Arduino shields, with a big caveat : Arduino’s are 5V devices, STM32 are 3.3V devices. More on that later. Moreover, it has additional connectors which bring out all of the microcontroller’s I/O pins.
The Nucleo 144 is the bad boy of the bunch : it can take Arduino Mega shields, with the same caveat regarding signal voltages, and has additional connectors to bring out all possible I/O pins. It’s designed for the largest STM32 devices and has peripherals such as Ethernet and USB.
One thing those boards all have in common is that you don’t need any other hardware to get started : they contain their own programming and debugging probe. Such probes used to be very expensive standalone tools, but not anymore.
On the software side of things, ST provides a range of free software development tools under the “Cube” brand. Lately, they have been consolidated into a single tool : the STM32CubeIDE. If you’re new to software development, IDE stands for Integrated Development Environment. You can (and should) download it from the official page right now. Seriously, right now, because it’ll take a while to install it. It’s a big tool. You may also want to install git and create a github account if you haven’t already : that way you will be able to download and use my code very easily.
I’m not going to post screenshots here to tease you into it. The main reason is that STM32CubeIDE, which I’ll henceforth call Cube for simplicity, is a very complex tool. This ain’t no amateur grade gadget like the Arduino “IDE”. Do not let the price tag fool you : Cube is made for doing serious work and building complex projects in environments where time is money.
And most importantly, Cube supports all Nucleo boards, saving you time.