STM32
STM32 is a family of 32-bit microcontroller integrated circuits by STMicroelectronics. They are as inexpensive as the Arduino Nano or the Raspberry Pico but much more powerful. They are a bit complex to get started with so they are not so popular but if you need a better performing circuit you can consider the STM32. STM32 development boards are referred to as the Black Pill or the Blue Pill depending on the PCB color.
Output Voltage | Operating Voltage | Maximum Current |
---|---|---|
3.3V | 3.3V |
STM32 Specific Steps
The following settings are required to program an STM32 Black Pill with the Arduino IDE:
-
You need to install the STM32CubeProgrammer and add the executable path to the system path.
-
In File > Preferences, add the URL below to Additional Board Manager URLs text box: https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json (opens in a new tab)
-
In Tools > Board > Boards Manager search for STM32 and install STM32 Boards Group
-
Now in Tools > Board > Boards Manager you will see STM32 Boards Group.
-
From that list select Generic STM32F4 Series for the Black Pill model STM32F401CCU6.
-
In Tools > Board Part Number select BlackPill F401CC for the Black Pill model STM32F401CCU6.
-
In Tools > Upload Method select STM32CubeProgrammer (DFU).
-
In Tools > USB Support select CDC (generic 'Serial' supersede U(S)ART).
-
In Tools > Port select COM3 (or the port that shows up on connection).
Important Unusual Steps:
- The board on the bottom of the IDE will show Generic STM32F4 series on COM3 [not connected]. Ignore the not connected status.
- The STM32F411 has a DFU bootloader. Basically, it’s a bootloader built into part of the ROM which can’t be erased. This means that you can put the device into “programming mode” by holding down boot (BOOT0) button while short-pressing reset (NRST) (still holding boot), and finally letting go of boot.
- Use the USB-A to USB-C cable. The USB-C to USB-C may not work.
- If the code is uploaded but does not run open the STM32CubeProgrammer and do a Full Chip Erase and then upload again.
Now upload the sketch which can be the same as the one written for an Arduino board, except for the pin definitions. */