Skip to main content
AAtou.1
Associate
June 22, 2020
Solved

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

  • June 22, 2020
  • 2 replies
  • 1337 views

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.
Best answer by Antoine Odonne

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

2 replies

TDK
Super User
June 22, 2020

> 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
June 29, 2020

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
June 29, 2020

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
June 29, 2020

I guess this is the problem I'm facing.

Your help is highly appreciated.