Retronics

Restoring, remodeling and creating electronic devices


DIY: STM32 WhiteBoard48: A “Blue Pill” alternative with twice the program memory

For hobbyists, Blue Pill is probably the most commonly used STM32 development board. It’s based on the STM32F103C8T6, which is a reasonably priced yet powerful microcontroller. Its 64kB program memory may, however, be scarce for advanced projects.

Following up the WhiteBoard64 (a more powerful and advanced development board based on STM32F411RET6), I made the WhiteBoard48, a Blue Pill alternative based on STM32F103CBT6.

The main differences from the Blue Pill are:

  • 128kB program memory
  • Optional 4MB flash (other flash sizes may also work)
  • Custom ST-LINK interface with IDC8 connector, for quick and easy connection to an ST-LINK programming adapter, with no risk of making erroneous connections.

Manually soldering the LQFP48 primarily takes a decent soldering iron held by a steady hand, but a microscope may also be convenient. I’m using a modified version of Andonstar AD407.

The board can be powered by 5V from the USB micro connector or the 5V pin. The 3V3 is bidirectional: it can used either for 3.3V regulated input, or as output for powering peripherals like displays or sensors (max total current: 150mA).

By default, STM32F103C8T6 doesn’t have an onboard DFU bootloader for uploading firmware via USB. If you need this feature, you are just a Google search away from finding suitable DFU bootloaders. My preferred interface for code upload and debugging with SMT32s is ST-LINK. I’ve made a standard ST-LINK interface with IDC8 connector, which I’m using with all boards that contain an STM32. This interface incorporates UART, which means you can use commands like Serial.print() to send text between the MCU and the programming IDE (e.g. Arduino or PlatformIO.

On the bottom side of the PCB, there is room for an optional Flash memory with SPI interface.

Some MCU pins serve as both GPIO and special purposes, e.g. PA11 and PA12 are used as USB data lines. If you’re using USB communication in your project, the same pins cannot be used as GPIO. Similarly, PA2 and PA3 are used for UART2, which is incorporated in the ST-LINK interface.

Pins to be aware of have dual names in the schematic, and are highlighted with inverse text on the PCB.


Connected to PC via ST-LINK for programming and debugging.

If you’re using Arduino IDE, choose Board: Generic STM32F1 series, and Board part number: BluePill F103CB.

For uploading firmware via ST-LINK, choose Upload method: STM32CubeProgrammer (SWD). The CubeProgrammer application needs to be installed, and it can be downloaded for free from the ST Website.


For programming microcontrollers, I prefer PlatformIO over Arduino IDE. I’ve shared some PlatformIO code examples for WhiteBoard48 on GitHub. Below is a screenshot of a code example for using the STM32s internal real-time clock.


If you need more IO lines, more program memory or more processing power, check out the WhiteBoard64.



2 responses to “DIY: STM32 WhiteBoard48: A “Blue Pill” alternative with twice the program memory”

  1. Hi, nice project. Just add the VBlock capacitors as an assembly option and your board is ready for the 250 MHz STM32Hxx with FPU and much more.. Why didnt you use the SDO pin PB2 for Serial Trace output? This is common soluton for Print output and data trace in Keil IDE.

    Like

    1. Thank you for your suggestions for improvements. Different projects may need different MCU capabilities like higher clock frequency, more program memory, more IO lines, special interfaces etc. For many applications the STM32F103 still covers my needs, but if a faster MCU is needed, I may consider using something from the STM32H series. For more program memory and more IO, I’ve made a development board with the STM32F411RET6: https://retronics.no/2023/11/15/diy-stm32-whiteboard64-part-1-design/
      This board also implements a switched voltage regulator and selectable ADC reference voltage. On this board, SWO (pin PB3) is included in the ST-LINK interface, but personally I’ve never used this interface, so for the smaller STM32F103 board I decided to use PB3 as GPIO.

      Like

Leave a reply to retronics.no Cancel reply