2020-06-22 12:03 AM
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.
Solved! Go to Solution.
2020-06-29 12:19 AM
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
2020-06-22 04:52 AM
> 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.
2020-06-29 12:19 AM
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
2020-06-29 12:58 AM
Thanks for your help.
The problem only exists with RDP level set to 1, but at this level I cannot use a debugger.
2020-06-29 12:59 AM
I guess this is the problem I'm facing.
Your help is highly appreciated.