Skip to main content
Janek1
Associate II
August 6, 2021
Question

[STM32L496] Jumping from bootloader to user Application with RDP enabled doesn't work without going through a power cycle.

  • August 6, 2021
  • 1 reply
  • 1239 views

I'm currently testing the UART bootloader on a NUCLEO-L496ZG-P, the bootloader itself works fine and i've written a python script which can upload .bin files to the controller.

The problemi'm having is that the product will need Readout Protection in the end, but when i'm uploading a programm and afterwards send the Readout Protect command ( 0x82 + checksum ) and than pull the jumper from boot0 (currently it's a jumper, but will be handled otherwise later on) and reset the controller it doesn't boot into the user application, but instead into an undefined(??) state which is neither bootloader nor user application (none of the user LEDs are on or blinking (my user app currently is only blinking LEDs) and it's also not responding to any of the commands from the bootloader command set). Only when going through a power cycle the chip will boot into the user application.

So i guess my question is, is this intended? Is there any way to get into the user application without going through a power cycle?

This topic has been closed for replies.

1 reply

TDK
Super User
August 6, 2021

The Readout Protect command generates a system reset.

You could attach a debugger to find out where the CPU is after this command. Likely it's executing code somewhere.

Another option would be to check and set RDP at the beginning of your program rather than via the bootloader.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Janek1
Janek1Author
Associate II
August 6, 2021

according to AN3155 (page 32, note 2) the readout protect command will only generate a system reset on some controllers, but not on the L496.

TDK
Super User
August 6, 2021

I was looking at an older version which didn't have that note.

Seems like if it responds to the "go" command, it's still in the bootloader after that, and the "go" command probably works. I would attach a debugger.

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