2022-11-20 04:41 PM
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..
..here I see that is protected! How can I program it?
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
Solved! Go to Solution.
2023-01-06 03:34 PM
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).
2022-11-20 05:50 PM
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".
2022-11-20 07:16 PM
Don't use the ST-LINK Utilities, been deprecated for years.
For G0 parts use STM32 Cube Programmer
2022-11-21 01:31 AM
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
2022-11-21 03:21 PM
This is my Option Byte page:
I can't uncheck the write protection
2022-11-21 03:24 PM
What would change if I installed the STM32 programmer?
2022-11-21 05:35 PM
ST-LINK Utility does not support your MCU, because the MCU is newer than that software tool!
2022-11-21 06:42 PM
>>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...
2022-11-22 12:00 AM
I used it but nothing has changed, in fact what I see is different but the memory is always protected.
The RDP settings:
The PCROP settings:
The Write and Flash settings:
But the memory is always like this:
Do you have any idea?
2022-11-22 12:29 PM
Idea about what? That memory range is erased. What do you not understand?