cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure the PCROP feature and capture the RDERR interrupt for STM32F429

41422372
Associate
Posted on April 30, 2014 at 17:56

Hi there,

I am working on STM32F429 Discovery board and trying to figure out a proper way to enable PCROP feature shipped with this board. I can use windows st-link utility application to turn flash sector into PCROP state. But once the sector is in PCROP state, it can't be written. My understanding is that PCROP is all about read protection. So why a PCROP flash sector can not be written or programmed? Each time I have to use that windows application to remove the PCROP state and program the flash with my image. Then use same application to enable the PCROP. This is quit annoying.

Anything is about how to define the interrupt handler to capture the interrupt caused by read to PCROP area. According to the STM32F429 manual section 3.6.6:

In this case, if the error interrupt enable bit (ERRIE) is set in the FLASH_SR register, an

 

interrupt is generated and the operation error bit (OPERR) is set in the FLASH_SR  register.

 

So far in my project the read to PCROP sector will get a meaningless value like zero, and then it will continue to execute, not fall into an interrupt handler. How can I define a handler to capture such interrupt?

Thanks in advance.

BR,

Terry
1 REPLY 1
Posted on August 11, 2015 at 16:16

Hi guo.terry.001,

1-PCROP is Read and Write protection, so once this protection is activated the application can not be modified. 

2-You should activate the PCROP protection only after finalizing and testing your final application. Because, desactivating  this protection will erase the code progarmmed in the flash memory. 

3-If you want to protect the code againt writing, you can use RDP protection (which is valid for all the Flash memory). 

4-For further examples, you may refer to

http://www.st.com/st-web-ui/static/active/en/resource/technical/document/application_note/DM00186528.pdf

 and this

http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1743/LN1920/PF262417

.

-Shahrzad-