2025-08-20 10:18 PM
Product: SMT32C013
Issue: firmware download in bootmode
Details:
I’ve recently started firmware development and, with community help, I’ve managed to create firmware for STM8 and several STM32 devices. Until now, I’ve always programmed the MCU using ST-Link—either by debugging or by drag-and-dropping the binary file.
Due to new system design requirements, I’d like to create a GUI tool to download firmware using the built-in bootloader. According to AN2606 and the MCU datasheet (STM32C013 series), the bootloader supports two interfaces:
USART1 on PA9/PA10
I²C on PB6/PB7
Here are my questions:
If PA9/PA10 and PB6/PB7 are already allocated to GPIOs for LEDs, buttons, or other connectivity, can they still be used for bootloading? Or does their existing allocation block firmware download?
If those pins are unavailable, are there any alternative methods to download firmware via bootloader (besides ST-Link)?
The documentation also refers to Pattern 11 for bootloader activation, listing conditions like:
BOOT_LOCK(bit) = 0, nBoot1(bit) = 1, nBOOT0_SEL(bit) = 1, nBoot0(bit) = 0
BOOT_LOCK(bit) = 0, nBoot1(bit) = 1, Boot0(pin) = 1, nBOOT0_SEL(bit) = 0
BOOT_LOCK(bit) = 0, nBOOT0_SEL(bit) = 1, nBoot0(bit) = 1, and main flash empty
BOOT_LOCK(bit) = 0, Boot0(pin) = 0, nBOOT0_SEL(bit) = 0, and main flash empty
I’m having difficulty understanding how to apply this in a real setup. Could anyone explain how Pattern 11 actually works and how I can configure it to reliably enter bootloader mode?