2014-04-30 08:56 AM
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, aninterrupt 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
2015-08-11 07:16 AM
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 and thishttp://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1743/LN1920/PF262417
. -Shahrzad-