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

@Sara BEN HADJ YAHYA​ can you look at this with the team, these seem to be recurrent issues.

I don't understand where the double slashes '\\' in the paths come from.

I don't really understand why the tools and the error messages can't work seamlessly, and test for failing conditions ahead of time with more helpful and specific reasoning.

You should be able to check if the file you're spawning exists.

You should be able to check if the file you're trying to open exists.

Perhaps fix some of the evident issues, and sanity check and fix problems manifesting in the project/workspace files.

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

Now I'll answer @Community member​ . Right now I was trying to create a new project with a new debug configuration, but nothing to do, it gives me other errors that I can't solve:

Open On-Chip Debugger 0.11.0+dev-00449-g53fa0f7 (2022-06-09-09:42) [https://github.com/STMicroelectronics/OpenOCD]
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : STLINK V2J40S7 (API v2) VID:PID 0483:3748
Info : Target voltage: 3.217824
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
Info : clock speed 4000 kHz
Info : stlink_dap_op_connect(connect)

and this:

0693W00000WJZX6QAP.png

@Community member​ I looked for the path with the two \\, which you pointed out to me and you asked me to verify that the path really existed, and indeed the path with the two \\ does not exist, but it could not be that STM32CubeIDE displays or uses the paths with double \\?

If someone were to tell me that it uses paths normally like Windows does, then there is a problem with the path, and therefore the question arises: how do I get rid of the extra slash \?

AScha.3
Chief II
  1. you set wrong speed: set it to 4MHz, 4000 kHz . (not 8000 .)
  2. set debug to : software system reset .
  3. debug : find no connection. try: stlink on USB , but no target connected. what message then ?
If you feel a post has answered your question, please click "Accept as Solution".

@AScha.3​ 

1-2) Nothing changed

3) The error messages with two different configurations are these:

With Debug Probe set to ST_LINK (OpenOCD)

Open On-Chip Debugger 0.11.0+dev-00449-g53fa0f7 (2022-06-09-09:42) [https://github.com/STMicroelectronics/OpenOCD]
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : STLINK V2J40S7 (API v2) VID:PID 0483:3748
Info : Target voltage: 3.242988
Info : clock speed 4000 kHz
Info : stlink_dap_op_connect(connect)

and

0693W00000WJZY9QAP.png 

With the Debug Probe set to ST-LINK (ST-LINK GDB server)

STMicroelectronics ST-LINK GDB server. Version 7.0.0
Copyright (c) 2022, STMicroelectronics. All rights reserved.
 
Starting server with the following options:
        Persistent Mode            : Disabled
        Logging Level              : 1
        Listen Port Number         : 61234
        Status Refresh Delay       : 15s
        Verbose Mode               : Disabled
        SWD Debug                  : Enabled
 
Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...
      -------------------------------------------------------------------
                       STM32CubeProgrammer v2.11.0                  
      -------------------------------------------------------------------
 
 
 
Log output file:   C:\Users\offic\AppData\Local\Temp\STM32CubeProgrammer_a04348.log
ST-LINK SN  : 56FF6F067878545228250567
ST-LINK FW  : V2J40S7
Board       : --
Voltage     : 3.21V
Error: No STM32 target found!
Encountered Error when opening C:\ST\STM32CubeIDE_1.10.1\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.0.301.202207041506\tools\bin\STM32_Programmer_CLI.exe
Error in STM32CubeProgrammer
Shutting down...
Exit.

and these two

0693W00000WJZYEQA5.png 0693W00000WJZYJQA5.png

AScha.3
Chief II

so on 1 : found no stm cpu to connect. on 2: found, but break to...1fffxxx

seem: the bootloader or watchdog is active .

boot0 is lo ?

get connection with STM32CubeProgrammer to cpu ?

If you feel a post has answered your question, please click "Accept as Solution".

My STM32Programmer can see the MCU.

I haven't any Watchdog active in this moment.

The pin boot0 is the same of SYS_SWCLK. I don't know if it is high or low

AScha.3
Chief II

is it secret , which cpu we talking abaut ? case, pins ...?

ah, ok, i see...what is the user option byte ? nboot-sel + nboot0 ?

0693W00000WJZegQAH.png

If you feel a post has answered your question, please click "Accept as Solution".

Is a STM32G050F6P6

STM32G050Fx TSSOP20 pinout and click here to see the Datasheet.

The user option byte:

0693W00000WJZgIQAX.png0693W00000WJZg8QAH.png