cancel
Showing results for 
Search instead for 
Did you mean: 

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

AAtou.1
Associate II

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Antoine Odonne
ST Employee

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

View solution in original post

4 REPLIES 4
TDK
Guru

> 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".
Antoine Odonne
ST Employee

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

Thanks for your help.

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

I guess this is the problem I'm facing.

Your help is highly appreciated.