2023-03-06 01:17 PM
Hi,
I have a custom board built around an STM32U585AII6 that utilizes RDP level 2 to prevent debug access. In the firmware I provided keys to allow for regression from level 2 back to level 0 and have been able to do this regression through the Cube Programmer successfully on many occasions, but only when I completely remove power from the device in between the various steps of the process. A successful regression typically follows the sequence below:
Is it a requirement to completely remove power from the device or is it possible to perform RDP regressions while keeping the device power?
2023-03-06 11:48 PM
In documentation it's said that reset should be enough. As you already observed it's not.
But there is a workaround:
I've got that info from polish STM32 distributor after consulting ST. Works at least in STM32L0 and L4. Not tested on newer models.
It was even more needed for me than in your case - our product included 5F supercap as energy storage. The only way to turn off power on production board would be to discharge that supercap - quite a bit complex to do
2023-03-08 11:54 AM
Hi @Community member,
Thanks for such a quick response!
Just to clarify, were you using this workaround to put the device into RDP Level 2?
I'm having trouble getting a device currently in RDP Level 2 back to Level 0, which may only be a feature for the STM32U5 series.
2023-03-08 01:59 PM
No. From 0 to 1 or from 0 to 2 after better testing - for my bootloader which then allowed encrypted firmware to be uploaded. bootloader itself could too be upgraded - by loading special "firmware" that just replaced bootloader after start and cleared itself then.
It wasn't meant to be downgraded and never been.
I'm 99% sure it will work same. This "feature" - hanging after reset if RDP is changed by program itself - is AFAIK common to all of series. Maybe they changed something in U series.
I never used U series. F, L, G and C.
2023-03-12 03:31 PM
The MCU locks shortly after setting the RDP protection, if the debugger is still connected. Going into Standby or Shutdown mode and disconnecting the debugger is the typical way to solve it. The wake-up source doesn't matter - it can be a wake-up pin, RTC or anything that works in those modes.
2023-03-14 08:46 PM
Can it be a watchdog reset, without standby/shutdown?