2025-07-24 5:12 AM
Hi All,
Using STM32CubeProgrammer with the ST-LINK in SWD mode.
If the RDP flag is set to 0xBB (level 1) and programmed the programmer can no longer connect to the device.
How can I reconnect to the device to set it back to 0xAA?
_Carl_
Solved! Go to Solution.
2025-07-25 9:12 AM
Solved! (I think)
Make sure nBOOT0, nBOOT1 and nBOOT_SEL are all set. Make sure BOOT_LOCK is clear.
Setting the Read Protection to 0xBB works as before. However, it is possible to connect to the device again and restore it to 0xAA.
This would appear to be contrary to the description given in RM0490 Rev 3. From what I can work out: ultimately, it was the BOOT_LOCK bit that was the problem.
The next problem is how to mark this thread as solved.
2025-07-24 5:48 AM
Do a full chip erase?
2025-07-24 5:58 AM
Holding BOOT0 high during reset may let you connect with SWD, do a full chip erase, and recover the chip.
You should be able to connect under RDP1 unless it's actively modifying option bytes, erasing flash, going into low power modes, or reassigning SWD pins.
2025-07-25 5:35 AM
Hi TDK,
BOOT0 is SWCL. Therefore I cannot control it. It is under the control of the STM32CubeProgrammer. Unless, there is a setting in that to help?
2025-07-25 9:12 AM
Solved! (I think)
Make sure nBOOT0, nBOOT1 and nBOOT_SEL are all set. Make sure BOOT_LOCK is clear.
Setting the Read Protection to 0xBB works as before. However, it is possible to connect to the device again and restore it to 0xAA.
This would appear to be contrary to the description given in RM0490 Rev 3. From what I can work out: ultimately, it was the BOOT_LOCK bit that was the problem.
The next problem is how to mark this thread as solved.
2025-07-25 9:15 AM
@Bugfarmer wrote:The next problem is how to mark this thread as solved.
https://community.st.com/t5/community-guidelines/help-others-to-solve-their-issues/ta-p/575256