Skip to main content
Associate
July 17, 2023
Solved

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

  • July 17, 2023
  • 6 replies
  • 6554 views

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

    This topic has been closed for replies.
    Best answer by Peter BENSCH

    This thread relates to a so-called Blue (and other) Pill, which uses illegally cloned STM32F103. ST resources are only dedicated to supporting genuine ST products. We are not committed to ensuring that clones/fakes products work properly with the firmware we provide.

    We recommend to purchase genuine products from STMicroelectronics and purchase them from known and trusted distributors.

    This thread will now be locked. However, if you face difficulties while using genuine ST products, we’re here to assist you. Please feel free to start a new thread, and our team, along with community members, will be ready to help you with any issues/questions you encounter.

    Thank you for your understanding.

    Regards
    /Peter

    6 replies

    Tesla DeLorean
    Guru
    July 17, 2023

    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 VenmoUp vote any posts that you find helpful, it shows what's working..
    OB_itAuthor
    Associate
    July 19, 2023

    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.

    Tesla DeLorean
    Guru
    July 20, 2023

    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 VenmoUp vote any posts that you find helpful, it shows what's working..
    RhSilicon
    Lead
    July 17, 2023

    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.
    Super User
    July 18, 2023

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

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

    OB_itAuthor
    Associate
    July 19, 2023

    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.

    Pavel A.
    Super User
    July 20, 2023

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

    RhSilicon
    Lead
    July 22, 2023

    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

    Peter BENSCH
    Peter BENSCHBest answer
    Technical Moderator
    April 25, 2025

    This thread relates to a so-called Blue (and other) Pill, which uses illegally cloned STM32F103. ST resources are only dedicated to supporting genuine ST products. We are not committed to ensuring that clones/fakes products work properly with the firmware we provide.

    We recommend to purchase genuine products from STMicroelectronics and purchase them from known and trusted distributors.

    This thread will now be locked. However, if you face difficulties while using genuine ST products, we’re here to assist you. Please feel free to start a new thread, and our team, along with community members, will be ready to help you with any issues/questions you encounter.

    Thank you for your understanding.

    Regards
    /Peter