cancel
Showing results for 
Search instead for 
Did you mean: 

STM32C011F6U6 Flash using UART System Bootloader

ronnabh
Associate II

Hi everyone,

I’m working with the STM32C011F6U6 in my design and would like to flash it using the system bootloader (USART1 on PA9/PA10 as described in the datasheet).

Before finalizing my design, I ordered the MB1684B board with the STM32C011F6U6 to test this.

However, I’m struggling to get the MCU into bootloader mode. It seems like the device never enters the system bootloader at all.

Here’s what I did:

  • I previously flashed a simple LED blink program, which works fine.

  • I connected a push button to the BOOT0 pin (pressing the button ties BOOT0 to VDD).

  • While holding BOOT0 high, I pressed the NRST button to reset the MCU.

After reset, the LED is still blinking, which suggests the code in flash is running, not the system bootloader.

On my NUCLEO-L412RB-P, doing the same BOOT0 + reset sequence works correctly and I can flash via UART. I assumed the STM32C0 family would behave the same, since the boot mode section in the datasheet looks similar.

Why does the MB1684B (STM32C011F6U6) not enter the system bootloader when BOOT0 is high? Is there something different about the boot configuration on the C0 family that I’m missing?

Any suggestions or guidance would be greatly appreciated.

Thanks in advance :)

 

 

 

2 REPLIES 2
TDK
Super User

I think the BOOT0 pin is ignored by default on the STM32C0. Change the option bytes in STM32CubeProgrammer if you want to change this behavior. See AN2606 for details on entering the user manual. See the STM32C0 Reference Manual for details on the factory settings for option bytes.

If you feel a post has answered your question, please click "Accept as Solution".
ronnabh
Associate II

Thank you for your assistance, 

ronnabh_0-1756991808248.png

ronnabh_1-1756992104816.png

I was able to solve my UART flashing issue — the problem was the nBOOT0 option bit. After unchecking nBOOT0 in STM32CubeProgrammer, I could connect and flash using UART successfully. Thanks a lot for the support!

Now I have one more question:
Is it possible to write firmware code that sets the nBOOT0 option bit to 0 automatically?

The reason is that for production, I want to provide the initial firmware to the PCB manufacturer, and when I receive the boards I’d like to flash them directly over UART without having to manually change the option byte on every single board in CubeProgrammer.

In short, I’d like to automate the option bit configuration step as part of the programming sequence.

Thanks in advance for any advice!