cancel
Showing results for 
Search instead for 
Did you mean: 

[STM32L151C6] change RDP level 1 to level 0

jumbler
Associate
Posted on April 28, 2015 at 11:30

Hi All:

 I'm a newbie for the MCU programming.

 So far, I use SWD protocol to program STM32L151C6 chip with RDP level 1.

 I want to remove RDP level 1, program, and change level 0 to level 1.

 However, I follow the unlock steps of RM0038 reference manual to unlock the flash.

 First, I unlock the PECR register and option byte block.

 then I write the '0xFF5500AA' value into the address of flash 0x1FF80000 for setting RDP level 0, and write the '0xFF870078' value into the address 0x1FF80004 for set USE default values.

 Then, I unprotect the flash by writing 0xFFFF0000 into the address of option block from 0x1FF80008 to 0x1FF8001C

 After performing above steps, I find that the flash's FLASH_OBR doesn't show the RDP level 0 bits, 0x00F000AA.

 How can I to enable the RDP level 0 immedately after changing RDP level ?

Regards ~ 
0 REPLIES 0