2025-04-10 7:35 AM
The STM32L052K8u Bootloader is replying to my GoToAddress command with 0x3F. I can't find any documentation that describes reply code 0x3F.
The entry in my STM32L052K8UX_FLASH.ld file says this:
/* Memories definition */
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 8K
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 64K
}
So, I believe the correct address to send with the GoToAddress command is 0x08000000.
Here are the messages exchanged between the code running on my PC and the UART of my STM32L052K8u - which powered up in Bootloader mode because it sensed the right state of the BOOT pin.
My goal is for my PC to tell the Bootloader exit Bootloader mode and jump to running my application, which is already stored in the flash.
Please advise.
From the PC's perspective:
1. Sending 0x7F to Bootloader...
2. Received 1 bytes (hex): 79
3. Sending Go command to Bootloader: 0x21 0xDE
4. Received 1 bytes (hex): 79
5. Sending go-to-address plus checksum to Bootloader: 0x08 0x00 0x00 0x00 0x08
6. Received 1 bytes (hex): 3F
7. PC reported "Unrecognized status 0x3F in reply from Bootloader. Aborting."
2025-04-17 9:24 AM
Hi,
0x1F is a NACK from the bootloader.
As the bootloader USART communication uses 8 bits + 1 even parity bit and a stop bit, our guess is that your PC might be interpreting the even parity bit as part of the data, which would explain the 0x3F. Otherwise, yes, it is an abnormal result.
We performed a test with a Nucleo-L053R8, and we confirm that the GO command using the 0x08000000 address is working fine on our side.
A workaround you can use if you are unable to make the GO command work is to set the boot pin back to low and perform a reset.
To debug the GO command, we will need further details on how you perform the communication, part of your code, etc. If you are not sending data using the even parity bit, that could explain why you receive a NACK from the device.
Please let us know if you have any questions about this.
BR
Nico.