cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeProgrammer reset not working with RDB=0xBB

sute
Associate III

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?

1 ACCEPTED SOLUTION

Accepted Solutions

Cant be fix is by design

View solution in original post

5 REPLIES 5
MM..1
Chief II

If i good rememmber you need power off after change rdp.

sute
Associate III

Yes, but powering off does not fix reset and run STM32CubeProgrammer commands not working when read protection is set.

Cant be fix is by design

sute
Associate III

Ok, thanks!

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