I can't burn my STM32F103 CPU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-12-17 1:55 AM - last edited on ‎2024-12-17 1:47 PM by Tesla DeLorean
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.
Solved! Go to Solution.
- Labels:
-
STM32CubeIDE
-
STM32F1 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-12-25 5:34 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-12-17 2:19 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-12-17 2:27 AM
My own design board.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-12-17 2:46 AM - edited ‎2024-12-17 2:53 AM
Then, as noted in the Posting Tips, please provide the schematic.
Also tool versions, what programming hardware you're using, etc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-12-17 3:41 AM
Not enough information for any reasoning.
The first guess: make sure that PA13 and PA14 pins are configured as SWD.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-12-17 7:28 AM
Hi Andrew,
I am using the ST-LINK-V2 as programmer.
CubeIDE version - 1.16.1
CubeProgrammer version - 2.18.0
Attached my CPU schematic.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-12-17 7:33 AM
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,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-12-17 8:02 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-12-17 11:49 AM
Hi MM..1,
I don't use STOP or STANDBY.
Regarding the SW signals - I checked them on scope and found them OK. I need to check if I am mistakenly activating them to other function, but I wonder if they could work at-all in such case even after reset?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-12-17 1:40 PM
There's a window for things to work, If you connect the NRST to the Debugger it can make "Connect Under Reset" viable.
Similarly with BOOT0 and BOOT1 pins on the F1 it's possible to have it run the Loader out of System Memory, so your broken code won't interfere with PA13/PA14
If you disable the SWD/JTAG or reassign the pin usage, it makes it more difficult to connect.
Review your code/project.
We only know what you choose to share..
Up vote any posts that you find helpful, it shows what's working..
