Skip to main content
Visitor II
December 30, 2024
Question

UART bootloader no magic byte after mass erase

  • December 30, 2024
  • 1 reply
  • 478 views

Dear Community,

 

I have an reocurring issue with STM32G4 series processors:

 

I am programming via UART from another embedded system. Via this system, I can set Boot0 pin and NRST as well as communicate via UART.

When the STM is flashed via CubeProg on another port, I can enter the bootloader mode, send magic byte and receive ACK.

Then I can proceed to do a mass erase. I can see via CubeProg, that the mass erase is successful.

However, I can neither continue to write nor get back into the bootloader mode via the same pin toggeling succesfully. While I can see from the external pin states, that bootloader mode is loaded, I do not get any ACK on the magic byte anymore.

Even a power cycle does not change the outcome.

As soon as I flash again via CubeProg, I can enter and leave the bootloader mode sucessfully again using BOOT0 and NRST.

All Option Bytes are default, and also no read or write protection set up.

I am at a loss here, any suggestions on how this behaviour could be debugged?

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    January 22, 2025

    Dear @mniethammer ,

    Can you please provide more details on this :

    When the STM is flashed via CubeProg on another port, I can enter the bootloader mode, send magic byte and receive ACK. Then I can proceed to do a mass erase. I can see via CubeProg, that the mass erase is successful."

    You are using SWD and Programming the MCU or using Bootloader with ST-Link  ,  if possible to provide the Serial/RS232 trace of the failure to see if a NACK or a timeout ?

    Thank you

    STOne-32.