cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F10x read-out protection from code

tg.developer
Associate II
Posted on March 16, 2017 at 12:15

I would like to implement read-out protection on STM32F103 high-density device. As far I can see there is an

option register FLASH_OBR with RDP bit for read-out enable/disable protection.

Beside the main application, I also implemented bootloader, which can reprogram main application from external

flash. So this bootloader should be able to SET and CLEAR RDP bit without a need for mass flash erase! 

Is this possible? I implemented WRITE protection, which works OK, but I can't get read-out protection!  

I managed to enable read-out protection using an external tool, but it is not functional if I run it from code.

#stm32f103
1 REPLY 1
Danish1
Lead II
Posted on March 21, 2017 at 11:10

Why would you need to disable readout protection from within your bootloader?

The bootloader should be able to read protected FLASH whether or not you have readout protection.

Readout protection only prevents external debuggers and the like from reading your FLASH. (Even if, for example, the external debugger downloads some code to run from RAM).

Hope this helps,

Danish