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

1 ACCEPTED SOLUTION

Accepted Solutions

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).

View solution in original post

63 REPLIES 63

It does not look like RDP2 to me. Please show option bytes page.

Possible solution:

1) Try to uncheck write protection

or

2) From option bytes page set "RDP level 1" and then "RDP level 0".

Don't use the ST-LINK Utilities, been deprecated for years.

F​or G0 parts use STM32 Cube Programmer

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

good one, im afraid untill some windows update f***s up STlink utility crashing it, is going to continue to be used.

And maybe then people downgrades windows only to use stlink utility.

Try convincing a plant manager that has been using same the tool for 10 years XD

we dont need to firmware by ourselves, lets talk

This is my Option Byte page:

0693W00000WJ9E8QAL.png 

I can't uncheck the write protection

What would change if I installed the STM32 programmer?

ST-LINK Utility does not support your MCU, because the MCU is newer than that software tool!

>>What would change if I installed the STM32 programmer?

It will work properly, and show you have usable parts instead of permanently locked ones?

Imagine you have a 5 year old map, that doesn't show roads and homes built last year...

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

I used it but nothing has changed, in fact what I see is different but the memory is always protected.

The RDP settings:

0693W00000WJBVBQA5.png 

The PCROP settings:

0693W00000WJBVGQA5.png 

The Write and Flash settings:

0693W00000WJBVLQA5.png 

But the memory is always like this:

0693W00000WJBVQQA5.png 

Do you have any idea?

Idea about what? That memory range is erased. What do you not understand?