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

It doesn't look to be in RDP Level 2

When you write a .BIN, .HEX or .ELF file into memory are you getting some sort of error or failure message? Please show that.

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

I thought the accented blue color meant protected memory

I tried and I can program with a file .bin or .elf, but if I try to program the MCU with STM32CubeIDE it shows me this error below:

0693W00000WJGz1QAH.png 

So this is a problem if I want to debug or run the program..

Was STM32 Cube Programmer able to program the .ELF with some more specific error message?

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

it looks like you are running/debugging it as a C/C++ application...From menu select run/debug configurations, STM32 application and double-click in configurations list to make STM32 run/debug configuration (not C/C++ application, which is for running EXE on your computer).

Disappointed with crowdfunding projects? Make a lasting, meaningful impact as a Tech Sponsor instead: Visit TechSponsor.io to Start Your Journey!

This @Community member​  is everything that I see:

0693W00000WJLwlQAH.png

@Georgy Moshkin​ those are my configurations:

0693W00000WJM17QAH.png 

0693W00000WJM1CQAX.png

This is still from the IDE, and via GDB Server, etc.

Run the "STM32 Cube Programmer" as the stand-alone GUI application, and interact and program the STM32G0 with the .ELF or .HEX directly from that.

This will establish if the device itself is in fact visible, viable and programmable.

You can then check that off the list, and work backward through the maze of connectivity and interactions that are precluding the IDE from doing the exact same task, with the same hardware.

Perhaps the settings for GDB are wrong, perhaps something else already has ownership of the device / ST-LINK, ie a preexisting and live Connection via an STM32 Cube Programmer instance.

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

With STM32Programmer I can program MCU with .elf file, but I can't program it from STM32Cube.

I disconnect and close every time the STM32Programmer and any other program that is connected to the STM32, so it's not this one.

What could I change in the GDB settings, and also wondering where should I go to see these settings.

Thank you for your availability

FranzCreva
Senior

Hi @Community member​ and everyone else.

I'm still trying to debug and upload the code via STM32CubeIDE, but I always get the same error and I don't understand what settings I need to change. Do I have to make my own bootloader?

These are the errors I see:

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
        InitWhile                  : 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_a08760.log
ST-LINK SN  : 56FF6F067878545228250567
ST-LINK FW  : V2J40S7
Board       : --
Voltage     : 3.23V
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 this one:

0693W00000WJZPlQAP.pngI rely on you because I really don't know where to put my hands.

Thank you all for your availability