Problem with programming
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-18 1:47 PM
Hello everyone,
I am kind of new to STM chips, i have a problem regarding programming the chip. I don't use any board, only chip on the SMD to DIP board. But when i want to program it using st-link, STM32cube can identify the programmer but not the chip, very few time it did find it but not most of the times.
But if i start it with bootloader (Boot=1) everything is find and i can program it.
Is this the only way or am i doing something wrong?
Thd Chip is:STM32F103C
- Labels:
-
Bootloader
-
STM32CubeMX
-
STM32F1 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-18 4:00 PM
show a wiring diagram. you haven't indicated what programmer you are using.
Don't worry, I won't byte.
TimerCallback tutorial! | UART and DMA Idle tutorial!
If you find my solution useful, please click the Accept as Solution so others see the solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-18 7:55 PM - edited ‎2025-04-18 7:58 PM
Do all these:
- Power all VDD+VDDA pins.
- Connect all VSS+VSSA pins to ground.
- Use a genuine programmer (and chip).
- Connect SWDIO, SWCLK, GND between programmer and chip.
If you still can't program it, post pictures of your setup. Might need a bulk capacitor near the chip, but probably not just to establish communication.
If the program on the board does any of the following, you will have difficulty programming and debugging it or connecting through SWD and may need to erase the chip to recover.
- Erasing/programming flash.
- Reassigning SWD pins to other functions.
- Going into low power modes.
If power (including decoupling caps) is insufficient, you may run into issues when running user code, particularly at fast cpu speeds.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-19 1:59 AM
Welcome to the forum.
Please see: How to write your question to maximize your chances to find a solution for best results.
@Mohade wrote:STM32cube can identify the programmer but not the chip,
Is that STM32CubeIDE or STM32CubeProgrammer?
How to solve connection errors when connecting and programming the STM32 target board
How to solve debugger connection issues
@TDK wrote:
- Connect SWDIO, SWCLK, GND between programmer and chip.
In addition to those (and all the other things), I would add
- Connect NRST between programmer and chip.
This can get you out of (some of) the "difficult" situations @TDK mentioned.
@TDK wrote:
- Use a genuine programmer (and chip)
See: How to recognize a genuine ST-LINK/V2 versus a cloned one;
In particular, this.
A complex system designed from scratch never works and cannot be patched up to make it work.
