Skip to main content
AAtou.1
Associate
Jun 22, 2020 7:03 AM UTC
Solved

The MCU (STM32G030J6) doesn't execute the code sometimes when RDP level is set to 1.

I am working on STM32G030J6, and I programmed it using STMCubeProgrammer through BOOT0 pin. I have also changed the option bytes nboot_sel to 0 to boot from pin and NRST mode to GPIO. The code works fine when RDP level is set to 0. When RDP is set to 1, the MCU works randomly; it sometimes executes the code and sometimes doesn't. I was wondering if the problem is a hardware problem or a configuration mistake.

Would highly appreciate your help and suggestions.

This topic has been closed for replies.
Antoine OdonneBest answer
ST Employee
Jun 29, 2020 7:19 AM UTC

Hello,

Maybe you should check this bug description in G0 errata sheet: I think you might be running in this issue:

2.2.3 Under Level 1 read protection, booting from Main Flash memory selected through PA14‑BOOT0 pin is not functional 

Debugging issues under rdp lvl 1 are tricky, since by default lvl 1 deactivate debug features. Be sure to keep it unconnected to not have an undesired intrusion fault.

Best regards,

Antoine

4 replies

TDK
Jun 22, 2020 11:52 AM UTC

> the MCU works randomly

Unlikely that the MCU doesn't try to do the exact same thing every time it starts up. If it's crashing, it's probably stuck in a while loop somewhere or a hardfault handler. Attach a debugger and figure out where it is.

"If you feel a post has answered your question, please click ""Accept as Solution""."
AAtou.1
AAtou.1Author
Associate
Jun 29, 2020 7:58 AM UTC

Thanks for your help.

The problem only exists with RDP level set to 1, but at this level I cannot use a debugger.

Antoine OdonneBest answer
ST Employee
Jun 29, 2020 7:19 AM UTC

Hello,

Maybe you should check this bug description in G0 errata sheet: I think you might be running in this issue:

2.2.3 Under Level 1 read protection, booting from Main Flash memory selected through PA14‑BOOT0 pin is not functional 

Debugging issues under rdp lvl 1 are tricky, since by default lvl 1 deactivate debug features. Be sure to keep it unconnected to not have an undesired intrusion fault.

Best regards,

Antoine

AAtou.1
AAtou.1Author
Associate
Jun 29, 2020 7:59 AM UTC

I guess this is the problem I'm facing.

Your help is highly appreciated.