2022-11-18 04:50 AM
If I set read protection (RDP=0xBB) on my STM32H7 MCU, it seems that both software reset and hardware reset commands stop working, e.g. I type:
STM32_Programmer_CLI -c port=SWD sn=XXXXXXX reset=HWrst -hardRst
and nothing happens. Also, the MCU will not reset after flashing if read protection is set to 0xBB. Is this expected behaviour?
Edit. After some experimenting it seems that in the GUI STM32CubeProgrammer it is not possible to run the firmware by clicking Run button in MCU core view if RDB is set. I get "Error: Unable to run application"
Edit. More experimenting: When I try to run
STM32_Programmer_CLI -c port=SWD sn=XXXXXXX --start -vb 3
I get:
RUNNING Program ...
Address: : 0x8000000
STLink read from (0x08000000) returned: 0x00000020
2nd try fail!
STLink read from (0x08000004) returned: 0x00000020
2nd try fail!
w ap 0 reg 15 PC 0x000EFFFF
w ap 0 reg 17 MSP 0x000EFFFF
w ap 0 reg 16 xPSR 0x01000000
Warning: The core is locked up
Start operation achieved successfully
Disconnected
So is it really that starting the application requires read access so it is not possible to do with read protection?
Solved! Go to Solution.
2022-11-18 06:50 AM
Cant be fix is by design
2022-11-18 06:10 AM
If i good rememmber you need power off after change rdp.
2022-11-18 06:11 AM
Yes, but powering off does not fix reset and run STM32CubeProgrammer commands not working when read protection is set.
2022-11-18 06:50 AM
Cant be fix is by design
2022-11-18 07:02 AM
Ok, thanks!
2022-11-18 07:11 AM
Maybe run command with entered addr work i dont test it. But you need know this addr from your code build, because read is protected.
If you connect over DFU i mean go works