cancel
Showing results for 
Search instead for 
Did you mean: 

Testing UART Bootloader on NUCLEO-C092RC

Vagni
Associate III

I would like to test UART Bootloader on my NUCLEO-C092RC.

System Bootloader mode can be selected pressing the BOOT (B3) pushbutton while resetting the STM32C092 mcu through RESET (B2) pushbutton and without the ST-Link interference removing JP2, JP4, JP6, JP7 jumpers, right?

UART2 on PA2 (TX) and PA3 (RX) port-pins is one of the UARTs handled by System Bootloader, right?

UART2 is already connected as Virtual Com Port (VCP), so it can be used with bootloader through CN1 USB-C connector, right?

Furthermore, BOOT0 pin must be enabled for boot mode selection in the User Option Bytes, right?

Now, my STM32C092 mcu has nBOOT_SEL bit just cleared in Opton Byte and my simple led blinking application is running. If I keep BOOT pressed while I press and release RESET, my led blinking app still start running and STM32CubeProgrammer does not connect with the target.

Is my procedure correct? How to start NUCLEO-C092RC in System Bootloader through BOOT pushbutton?

And UART2 as VCP is available to test System Bootloader through UART?

 

5 REPLIES 5
TDK
Super User

AN2606 is the correct resource which lists all of these answers.

Introduction to system memory boot mode on STM32 MCUs - Application note

 

Here are the ways to get into the bootloader. Check BOOT_LOCK bit.

TDK_0-1761589082944.png

 

Yes, PA2/PA3 are supported.

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

With STM32CubeProgrammer through ST-Link I verified:

  • BOOT_LOCK(bit) = 0 (it is the default value)
  • nBOOT1(bit) = 1 (it is the default value)
  • nBOOT_SEL(bit) = 0 (cleared by me)

NUCLEO-C092RC_Option_Bytes.png

 So, why System Bootloader does not start when I reset the NUCLEO with BOOT pushbutton pressed?

 

Vagni
Associate III

OK, now it works after I disconnected an RS485 interface from the NUCLEO.

The RS485 interface (SN75HVD12) was connected to UART1 (TX, RX, DE on CN10) and supplied with NUCLEO +3V3 supply voltage from CN7 pin 16. Anyway, the RS485 bus was in idle state during reset, so there were no TX and RX data.

How those connections may interfere with System Bootloader entry?

Another question: I see STM32CubeProgrammer connects with the target STM32C092 mcu at max 460800 baudrate via UART. What is this upper limit due to?

Thank you!

AN2606 lists the interfaces and pins the bootloader listens for. If one of those is active, the bootloader will switch to that interface and ignore the others. Sounds like this was happening and the bootloader was being entered as expected.

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

I know System Bootloader starts initializing the three UARTs and then waiting to receive one 0x7F character (host connection) from one of them. The autobaude detection is performed on each UART? Or it is performed only on the first UART detected as active?

But System Bootloader must be started to do that job. And I think it should remain active till a mcu reset, even if it should never receive the 0x7F character, right?

Instead, keeping the BOOT pushbutton pressed, when I press and release the RESET pushbutton, my application starts immediately; so bootloader entry never happens on my NUCLEO, if UART1_RX input is already active.

I found a NUCLEO power off-on cycle is needed to start bootloader with the BOOT pushbutton pressed: in that case an activity present on UART1_RX input does not prevent bootloader entry.

How do the two conditions differ?