Skip to main content
sute
Associate III
November 18, 2022
Solved

STM32CubeProgrammer reset not working with RDB=0xBB

  • November 18, 2022
  • 1 reply
  • 1863 views

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?

This topic has been closed for replies.
Best answer by MM..1

Cant be fix is by design

1 reply

MM..1
Chief III
November 18, 2022

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

sute
suteAuthor
Associate III
November 18, 2022

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

MM..1
MM..1Best answer
Chief III
November 18, 2022

Cant be fix is by design