2018-11-27 10:01 AM
Hi All
I have been experimenting with the Flash write protection most of the day and was hoping to be able to set it by just writing the setting in the FLASH_OPTCR register, however the value that is written doesn't seem to affect anything unless committed to Flash (with the OPTSTRT flag).
The idea was to generally have all sectors protected from writes/erases and to enable just the sector each time a write or erase is performed to it - then protect it again.
Based on the results it looks like each time something is changed the change needs to be committed to flash as well before it takes effect. Since there are a lot of write/erase operations this sounds as though it may be unsuitable, but I don't find any information about its impact.
Note that I was using the Flash_CR lock to do this generally but am looking for a second level of protection to further reduce the possibility that flash content could be modified by run-away code.
Presently I have a bricked board after setting a value I didn't want in the FLASH_OPTCR register (I have posted a different question about this) so am generally stuck at the moment (and can't do the timing measurement in point 1 above, for example) but it would still be nice to know whether there is any sense in experimenting with write protection or not. [Also the debugger can't load code when it is on, which makes life complicated...]
Thanks
Mark
2018-11-30 05:55 PM
Hi All
I have published the following video discussing and demonstrating STM32F429 (similar or the same for various other parts too) Flash Option programming and operation, focusing on Flash Sector Write protection and the Flash Read-out protection - a very important aspect in many products: https://youtu.be/IN_U7QsYQlc
Regards
Mark
2020-03-31 03:09 AM
Hello,
Did you find an answer to this question :
2. Does each change also cause flash wear and so would have a limitation if performed very frequently?
Your video does not answer this question, and I am interested in it !
2020-03-31 06:45 AM
Hi
Yes, I managed to answer all questions with a few days of intensive research, but i was told that I was not welcome to show my work on the forum and so I do not contribure any more.
Thank you for your understanding.
Regards
Mark
2020-04-01 12:55 AM
Argh it is sad !
I understand.
I was interested in your work results, I cannot find informations about the option byte updating consequences, I presume it i not good for flash cycles. That is strange that nobody else asks the question...
It misses the capability to change access rights on the fly, without modifying flash data (I also presume there is nothing, as nothing about that is in reference manual...). In my case, I will give permanent write access for this reason.
2020-04-01 12:56 AM
Thank you for your answer, whatever !