cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G0 bought with level 2 protection

FranzCreva
Senior

Hi all, I'm new to this STM32 community.

I have a small problem: I bought some STM32G0P0.. for my project, also making the PCB and the rest. But after soldering the various components, I try to program one and see that the level 2 protection is active, I try to program another and there is the same thing.

What I see from the STM32 St-LINK program is that only some memory pages have protection, while others don't, but then going to view the memory areas I see that they have all been set to FFFFFFFF.

Below I can see that the memory on the address 0x08001400 is free, but..

0693W00000WIxGqQAL.png 

..here I see that is protected! How can I program it?

0693W00000WIxHFQA1.png 

My question now is: what the hell do I do? Do I ask for a return? Is this a normal thing of STM32G0...? Trying to write a bootloader that makes me jump from one address to another when the memory to read is full?

Thank you for your availability and attention

63 REPLIES 63

Just a recommendation... A month ago you said "I tried but nothing to do", which I suppose was meant that it didn't work. For your own clarity it would be good if you can analyze why it didn't work back then or whether you actually saved the modified option bytes back then.

mattias norlander
ST Employee

A thread containing 60 posts takes substantial time and energy to analyze... And many issues are comprised of several misconceptions on how tools can/should be used, the capabilities of the MCU, etc...

@FranzCreva​, feel free to post which of the many different proposals you received that solved the issue for you and whether you still think that there are room for improvements in tools related to this thread.

Maybe we can then mark your reply with best answer and the next unfortunate reader of this thread can quickly conclude whether it helps them or not.... 😉

Hi, sorry for not answering you sooner.

Anyway yes, I absolutely have to understand why weeks ago I couldn't debug having the nBOOT0 flagged.

Anyway, thanks again for your availability @Piranha​ 

Hi @mattias norlander​ .

You're right, I had already intended to select the best answer, but I think it's better to make a small summary with the answer as well?

We can say that the title "STM32G0 bought with level 2 protection" has nothing to do with the final solution, but I can explain that I thought the MCU has level 2 protection because the STM32 ST-LINK Utility" program is outdated, so using STM32CubeIDEProgrammer was able to connect to the MCU correctly.

After that I tried to debug with STM32CubeIDE, but I couldn't. This was due to the fact that the nBOOT0 entry (in the "user configuration option byte" section) had not been flagged (for your MCU look at the Boot Mode configuration even though almost all MCUs have the same configurations).

The nBOOT0 flag fixed the problem and it was thanks to the advice of @Piranha​ .

I also have to thank @Community member​ , @AScha.3​ and the others (@mattias norlander​ you are included).