2020-04-09 08:25 AM
Hi, I am using stm32f407vg. There is no read/write protection for sectors, there is only write protection option.
So I had to enable read out protection, when I change protection level 0 to 1, code doesnt work. It's not working for even led blink code. Should I do something before chancing protection level? I am just downloading code then changing protection level. When I change 1 to 0 and download same application, it works. What should I do? Thanks.
2020-04-09 08:31 AM
>>There is no read/write protection for sectors, there is only write protection option.
Correct, the F2/F4 design doesn't have selective read protection.
Read Out Protection is an array level control.
2020-04-09 08:37 AM
Yes I saw that but why application doesnt work when level is 1?
2020-04-10 12:45 AM
What do you mean "application doesn't work". There are many ways for it to not work; some that generate error or warning messages. Those messages might be hard to understand but they should contain clues as to what specifically is going wrong in your case.
You can't use the ST bootloader or JTAG to download to FLASH when code READOUT protection is set.
This is because
It is possible to download code to RAM and execute that code even when readout protection is set to level 1. But that code isn't allowed to read the FLASH.
2020-04-10 03:40 AM
Of course I am not trying to download when Read Out Protection level is 1. When protection level is 0 I download the code and see led is blinking, UART is sending messages, then I only change protection level, nothing else. Same code should work but after I change protection level 0 to 1 from STM32 ST-LINK Utility, led is not blinking and UART is not sending anything. What I meant was that.
2020-04-10 04:42 AM
Try some very simple program first, only blinking LED and NOTHING else.
JW
2020-04-10 05:05 AM
I tried, it is just blinking.
Then I changed protection level.
And nothing is working.
Couple of weeks ago, I touched to on board debugger and static killed it, I cant use that debugger anymore so I am using external debugger. Maybe static also damaged MCU, is it possible? It may be nonsense because without read out protection everything is working fine.