Skip to main content
Associate
Oct 27, 2023 7:50 AM UTC
Question

readout protection without power on reset

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

This topic has been closed for replies.

9 replies

Peter BENSCH
ST Technical Moderator
Oct 27, 2023 9:50 AM UTC

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

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Associate
Oct 27, 2023 11:59 AM UTC

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?

 

Peter BENSCH
ST Technical Moderator
Oct 27, 2023 12:54 PM UTC

I am not aware of any other way than the alternative mentioned.

Regards
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Associate
Oct 30, 2023 7:12 PM UTC

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.

Hagi_0-1698693016121.png

 

Associate
Oct 31, 2023 6:50 AM UTC

Hi, no, this does not work. Only thing that helps is to do a Power On cycle when the debugger cable is attached

Douglas MILLER
ST Employee
Oct 30, 2023 10:47 PM UTC

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.

waclawek.jan
Super User
May 2, 2024 1:56 PM UTC

Hi @bruno_mazzarotto ,

Have you been able to solve this problem?

Thanks,

JW

Associate
May 2, 2024 2:12 PM UTC

Hi, I've added a power on cycle on the process and then it worked.

waclawek.jan
Super User
May 3, 2024 10:31 AM UTC

@bruno_mazzarotto,

I see. That's the straighforward solution anyway.

Thanks.

JW