Electronics > Beginners

Forgot to add SWCLK and SWDIO to pin layout on STM32

(1/2) > >>

D4no0:
Hello,
So I wanted to start developing on STM32.
I am using STM32CubeIDE that uses STM32CubeMX as layout by default.
The development board is a generic blue pill STM32F103C8T6.
The problem appeared when I tried to make a blink sketch and upload it to the device using ST-LINK V2. It uploaded, however after that I was unable to upload anymore. Later I found out that you need to specifically set the SWCLK and SWDIO in MX. My BOOT0 mode is still working so I tried to upload STMduino to it, however from what I've read this dev board has an wrong value resistor that needs to be replaced (I don't really want to solder a smd resistor with soldering iron), so I'm stuck here. I wanted to know if there is a way to flash a new firmware?

capt bullshot:

--- Quote from: D4no0 on June 06, 2019, 10:03:52 am ---Hello,
So I wanted to start developing on STM32.
I am using STM32CubeIDE that uses STM32CubeMX as layout by default.
The development board is a generic blue pill STM32F103C8T6.
The problem appeared when I tried to make a blink sketch and upload it to the device using ST-LINK V2. It uploaded, however after that I was unable to upload anymore. Later I found out that you need to specifically set the SWCLK and SWDIO in MX. My BOOT0 mode is still working so I tried to upload STMduino to it, however from what I've read this dev board has an wrong value resistor that needs to be replaced (I don't really want to solder a smd resistor with soldering iron), so I'm stuck here. I wanted to know if there is a way to flash a new firmware?


--- End quote ---
Connect the STM32 reset input to the ST-Link reset output, and use "connect under reset" with the ST-Link tool.

ogden:

--- Quote from: capt bullshot on June 06, 2019, 10:06:20 am ---Connect the STM32 reset input to the ST-Link reset output, and use "connect under reset" with the ST-Link tool.

--- End quote ---

Right. Other way around:

1. Press & hold reset button on the pill.
2. Start programming (it will seemingly hung while reset pushed).
3. Release reset button (programming supposedly will commence).

D4no0:
I suppose you are using the ST-Link utility from windows? I am currently on linux with a limited version of this tool and it shows an error when I release the reset button.

capt bullshot:
Usually I'm using linux and openocd with an ST-Link, and have the reset line connected to the target.
Using openocd and ST-Link, the "hold the reset button" works for me, if you release the button at the right moment.

But as you've pointed out, I've mentioned the windows ST-Link utility and it's "connect under reset" setting as the last resort.
Never tried the Linux version of that utility, but afaik it provides the same functionality.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod