cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L151CB-A not booting from internal FLASH with RDP = BB (Level 0)

LKamm.2
Associate II

Dear all,

I have a question regarding the read-out-protection on STM32 L1 series (STM32L151CB-A) and I was wondering, if the same problem occurred to anyone of you before.

I am booting from internal flash memory (BOOT0 = GND) and set the option bytes RDP to BB (Read out protection level 0) using the Cube Programmer.

However, after doing so, the controller is not booting anymore. Even after a hardware reset pulling the NRST line low.

My program is also writing to the FLASH and EEPROM - could this be an issue?

(HAL EEPROM / FLASH unlock).

What could be the origin of the problem?

Thank you and all the best!

2 REPLIES 2

So code is probably running.

Make sure to instrument your code to see where and how far execution gets.

Perhaps do something in Reset_Handler to set or toggle a GPIO

Add output to HardFault_Handler and ErrorHandler so you can see if things get stuck there.

Watch for other while() loops where it might get stuck or hung up.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
FBL
ST Employee

Hello @LKamm.2​,

RDP = BB refers to RDP level1 not 0. You may need to set RDP level to AA to disable the read protection.

Hope this helps!

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.