2023-10-27 12:50 AM
Dear support team,
I need to activate and deactivate the readout protection on a fully automated CI enviroment and according to the RM0440 (Note: If the read protection is set while the debugger is still connected through JTAG/SWD, apply
a POR (power-on reset) instead of a system reset.) a POR cycle is required.
Is there a way to solve this without a POR? The used hardware for CI does not provide means to perform a POR. Is there any G3 register I can manipulate to have the desired result?
Why the behavior is different from STM32F3x? For F3 no POR is required.
Thanks in advance!
BR
Bruno
2023-10-27 02:50 AM
Welcome @bruno_mazzarotto, to the community!
Please have a look at this video (STM32 Security tips - 3 RDP without POR) and check if you can get on with the transition from standby state, the STM32G4 should behave identically. All materials (including sources of the examples) related to this video you can find using this link.
Hope that helps?
Good luck!
/Peter
2023-10-27 04:59 AM
Hi Peter, thanks for the support.
Unfortunately I can not add the code to trigger standy mode to our code.
Is there a way I can achieve the same results by writing registers with open_ocd?
2023-10-27 05:54 AM
I am not aware of any other way than the alternative mentioned.
Regards
/Peter
2023-10-30 12:12 PM
Maybe by manipulating FLASH_CR register, setting OBL_LAUNCH bit to 1 and wait a bit. Maybe you'll need to re-attach the openocd connection because it will reset the target.
2023-10-30 03:47 PM
This forum thread was marked by the moderator as needing a little more investigation, so a Support case was created in your name and will be handled off-line.
2023-10-30 11:50 PM
Hi, no, this does not work. Only thing that helps is to do a Power On cycle when the debugger cable is attached
2024-05-02 06:56 AM
2024-05-02 07:12 AM
Hi, I've added a power on cycle on the process and then it worked.
2024-05-03 03:31 AM