cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow to debug original blue pill (STM32F103C8T6) board using STLink V3 SET

OB
Associate II

Hi everyone,

beginning the embedded systems journey has been fun, thanks to starting out with Nucleo board STM32L412RB-P. It's got an on board debugger (like any other nucleo board) which certainly abstracts the hardware nitty gritties required to setting up. Again, thanks to the rich ST community, one could find tonnes of resources and help readily available when stuck. I decided to take a little step further by purchasing a bluepill (original) and an STLink V3 SET (original). To my surprise, there hasn't been useful resources (in my opinion) on how to set these two up. Wherever the bluepill is mentioned, some stlink V2 (original or clone) follows. So I'm turning to this rich ST community, as trivial as this may seem, help me out of this quagmire. How do I do a simple debug, flash etc on my bluepill using STLink V3 SET using SWD. Thanks

9 REPLIES 9

Shouldn't be rocket science..

The SWD interface mainly consists of SW(DIO), SW(CLK) and GND. Disassemble, add the backing plate with pin. Might want VCC and NRST, but read the manual.

v3set_pins.jpg

Programming via STM32 Cube Programmer, via SWD connection on ST-LINK/V3

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

I only use the STlink V2, but it's good to be careful and read the manuals for this V3,

UM2448:

Caution: Do not screw the B-STLINK-ISOL board to the STLINK-V3SET main module with a metal
screw. Any contact of the MB1440 adapter board with this screw short-circuits the grounds
and may cause damages.

UM2448:

The STLINK-V3SET product is designed around the STM32F723 microcontroller (176-pin in
UFBGA package).

https://www.st.com/en/development-tools/stlink-v3set.html

The STLINK-V3 is one of the best ways to debug and program an STM32 microcontroller. It transfers data faster than the previous generation and with much more flexibility, thanks in part to its STDC-14 connector and its support of a virtual COM port. Recently, ST announced the new STLINK-V3PWR, which should be available during the second quarter. Pronounced “ST LINK V3 Power”, it is the only source measurement unit with such a wide range of dynamic measurements, with a 2% accuracy across the entire range, and that is available for less than USD 200.

https://blog.st.com/stlink-v3/

Bluepill uses an MCU F1, it seems to me a little beyond the necessary to use an F7 to program bluepill, maybe that's why few people have been interested in this combination.

It might be interesting to see this sequence of videos about Debug:

STM32CubeIDE Advanced Debug Features

Pavel A.
Evangelist III

I decided to take a little step further by purchasing a bluepill 

Move from L4 to bluepill is a step back. a red pill))

In terms of performance, you're right. With regards to the pills, I only knew of the bluepill and blackpill by the way. Never heard of the redpill up until now. My interest however is to design a custom stm32 board which I could independently flash and debug using the STlinkV3 set, using the bluepill as test case. I was able to do the flash and debug on my nucleo board using the stlinkv3 set but there's something about the bluepill I'm just not getting.

It's quite simple. But not with the bluepill. I thought it was something I wasn't doing right. But the procedure I knew flashed and debugged my nucleo board successfully.  With the bluepill, this image is what I'm getting. So I wanted fresh ideas from this community.

Pavel A.
Evangelist III

"Debug authentication" is something from another world, unrelated to STM32F1 (and L4). Ignore it. This simply means some unidentified error connecting to the chip.

This is more likely a issue if you have a fake part, the ST looks for ID codes, and the ST-LINK's and software won't interact with fake devices.

Also if the part is not powered or connected properly the logic and scan chains won't be functional, like at all, so like having a conversation with a corpse.. Establish authentic parts are properly powered. Perhaps look at secondary signs-of-life like the ability of the USART to respond to basic connectivity for the System Boot Loader in ROM, ie BOOT0 = HIGH, and AN3155 and AN2606

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

I was able to flash the bluepill using CP2102 usb to uart bridge instead (unfortunately) using STM32CubeProgrammer. No luck with the STLink yet. Again, I magnified the image of the STM32 chip on my board and compared it to what's online; it checks out. That's a source of my confusion. But thanks for your prompt responses and the new perspective about the possibility of it being fake. 

RhSilicon
Lead

The red pill and blue pill represent a choice between the willingness to learn a potentially unsettling or life-changing truth by taking the red pill or remaining in the contented experience of ordinary reality with the blue pill. The terms originate from the 1999 film The Matrix.

https://en.wikipedia.org/wiki/Red_pill_and_blue_pill