STM32 development boards revisited

Years ago, I took the blue pill and woke up from the matrix. After battling the deadly bootloading bots, I plugged myself back into the matrix. It became too hard to resist the sensuous tempting call of the ATMEGA328P libraries. Time passed and ST officially took over the Arduino Core development from Roger Clark so I decided to see if the bootloading bots are still present in the new core with my STM32 boards.

Installation

Start Arduino IDE and edit Preferences:

File -> Preferences : Additional Boards Managers URLs:

https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json

Tools -> Board -> Boards Manager



Once installed, the STM32 board configurations will be available in the IDE eg:



You will also need to install STM32CubeProgrammer(which needs Java 8) from ST. In addition, purchase a ST-Link V3 Mini programmer. In order to install a HID bootloader into the board, use the ST-Link programmer to burn it. I managed to program the bootloader into the Maple Mini and Blue Pill after a lot of fiddling around but the Mini STM32 V3 did not work. The steps are:

Be prepared to have multiple tries at programming the bootloader before it works. You may also need to uninstall old unused COM ports from Windows as the bootloader may mistakenly associate it as its virtual serial port. This was where I previously gave up went back into the matrix again.

Instead of the HID bootloader, you can upload using the ST-Link programmer which always works. You need to connect to SWDIO, SWDCLK, GND on the board and use the SWD upload method.



The STM32 boards are much faster, have more GPIOs and are cheaper than the Atmel ATMEGA328P boards but API libraries may not be available. Check before committing to the STM32 for your project. You can always port or suggest the API author port it to the STM32 platform though.