Skip to main content
Visitor II
December 17, 2024
Solved

I can't burn my STM32F103 CPU

  • December 17, 2024
  • 2 replies
  • 2980 views

Hi all,

I have the CPU STM32F103 on board. I am using STM32CubeIDE for SW development and STM32CubeProgrammer for burning.

On some point during development, I couldn't burn the CPU anymore - I get various types of error messages, like 'Can't erase the memory', 'Core is halted' or the green bar (which indicates burning process) runs goes and back endlessly.

Yet sometimes I succeeded to bun it by using tricks, such setting port BOOT0 to VCC and using option  OB --> Readout Protection to erase the memory and only then to program. Or alternatively pressing the on-board reset button and starting the programming immediately after releasing the button.

Unfortunately these trick are not always working, and off course are not acceptable as solution.

I wonder what happened to my design. Is there any solution?

Any help will be very appreciated.  

    This topic has been closed for replies.
    Best answer by Shony

    Hi Tesla,

    I checked in the Programmer and found the 'Connect under reset' option. I tried the use it with the option 'Software reset' and it worked.

    Thank you for your help.

    2 replies

    Super User
    December 17, 2024

    Welcome to the forum.

     


    @Shony wrote:

    I have the CPU STM32F103 on board.  


    What board?

    How to write your question to maximize your chances to find a solution

    ShonyAuthor
    Visitor II
    December 17, 2024

    My own design board.

    Super User
    December 17, 2024

    Then, as noted in the Posting Tips, please provide the schematic.

    Also tool versions, what programming hardware you're using, etc

    Graduate
    December 17, 2024

    Not enough information for any reasoning.

    The first guess: make sure that PA13 and PA14 pins are configured as SWD.

    ShonyAuthor
    Visitor II
    December 17, 2024

    Hi gbm,

    See the attached schematic of my CPU connectivity design. as you can see the SW signals are connected correctly.

    More information:

    I am using the ST-LINK-V2 as programmer.

    CubeIDE version - 1.16.1

    CubeProgrammer version - 2.18.0

    Attached my CPU schematic.

     

    Thanks,

     

    Graduate II
    December 17, 2024

    Schematics seems OK , SWD dont require pull ups, and STlink V2 preffered mode is SWD not JTAG. 

    Primary question : your loaded code use set MCU into low power STOP or STANDBY? When yes pregrammer cant connect it without use reset line and mode under reset... Same situation is if pins SWD is activated in code to other func.