Skip to main content
Visitor II
October 22, 2025
Question

Help troubleshooting stm32g431 board

  • October 22, 2025
  • 4 replies
  • 1385 views

Hi. I designed a stm32 board an am trying to program it with a stm32 development board. i am having issues with programming it. This is my board design and my programming setup. I have connected the stm32f4 to my laptop to program it and the Integrated Circuit I'm using on my board is the stm32 g431. I know i have not pulled boot0 to low which is a problem i tried to resolve using option bytes where i set the nBoot1 byte to 0. But i have my boards boot up and then after clearing flash storage, they are usually stable. The board isn't dead since current is being drawn but the stm32 status LED is blank and when i try to connect to it with the stm32 programmer, i get ' Unable to detect Core ID. No stm32 target found. If your product uses debug authentication, please enable debug authentication. Please help me figure out what is wrong. This is the second board that has gone this way. I only have 3 more left.

 

WhatsApp Image 2025-10-22 at 16.02.43_99bd9ff3.jpgScreenshot 2025-10-22 161018.pngScreenshot 2025-10-22 160147.png

aks1_0-1761233999598.png

 

    This topic has been closed for replies.

    4 replies

    Graduate II
    October 22, 2025

    STM32Cube Programmer shows you're connected to a STM32F4Discovery, not your custom STM32G4. 

    Pull the JP1 jumper so that the STM32F4 is no longer powered. Then you should be able to connect to the STM32G4.

    aks1Author
    Visitor II
    October 22, 2025

    The jumper is pulled. The reason that is showing is prolly because i am programming the stm32g431 though the debug pins of the stm32f4. 

    Graduate II
    October 23, 2025

    From the image, the jumper JP1 is there.

    Super User
    October 23, 2025

    You haven't shown the schematic of your custom board.

     

    To be honest, a standalone ST-Link isn't expensive - Why not just get one?

    Although it is technically possible to use the one in a Dev Board, using a standalone is a lot more straightforward!

    The thing about using the one from a Dev Board is that you need to be sure that the Dev Board's target processor is completely disconnected - so as not to interfere with the connection.

    aks1Author
    Visitor II
    October 23, 2025

    aks1_0-1761233877128.png

    Here you go. I have also updated the post description with the image The reason for not putting a USB port on the custom board is because it will be sealed with epoxy in an enclosure and it will destroy the USB port.

    Super User
    October 23, 2025

    @aks1 wrote:

    The reason for not putting a USB port on the custom board is...


    I didn't suggest putting a USB port on the board.

    I just suggested that you'd make your life easier by using a standalone ST-Link - rather than waste time faffing about with the one on your Discovery board.

    Graduate II
    October 23, 2025

    One more vote for a standalone ST-Link.

    I really like that they built into the ST-Link a USB-VCP so that you only have one connector for flashing and UART-debugging.

    Just working with it, I prefer the UART & LED debugging so much to the standard (?) debugging with CubeIDE, which I use only with really bad faults.

     

    Super User
    October 23, 2025

    @LCE wrote:

    I really like that they built into the ST-Link a USB-VCP


    Only in the ST-Link v3.

    But this would be an added advantage over a Dev Board - as they don't make external access to the VCP at all convenient!

    @aks1 : With an STLINK-V3SET you also get an extra SPI/UART/I2C/CAN/GPIO bridge.

    With an STLINK-V3PWR you also get power measurement.

    These options are obviously a bit more expensive!

    Full range here: https://www.st.com/en/development-tools/hardware-debugger-and-programmer-tools-for-stm32.html

    Graduate II
    October 23, 2025

    standalone ST-link is not an option as mentioned above. I need to encapsulate the board in epoxy
    > and it will be lowered into a trench for long periods of time. 

    We're talking about development and flashing here, we do not deliver our products which have an STM32 with an ST-Link! :D

    First step is to have it running in the lab, and that's where good tools make development much easier.

    As you are experiencing now, saving on tools can cause trouble...

    And even Andrew's suggestion with the USB port: for production you would not need to install these components.


    Even on one of our smallest PCBs, I have 5 pins for the prog. adapter and another 3 for the UART.
    And for the production guys I made an extra adapter PCB from ST-Link to these 2mm connectors.

    LCE_0-1761237376968.png

     

    Super User
    October 23, 2025

    @LCE wrote:

    Andrew's suggestion with the USB port


    Not my suggestion. @aks1 made that up - I never mentioned a USB port!

    Graduate II
    October 23, 2025

    > Not my suggestion. @aks1 made that up - I never mentioned a USB port!

    Oops, sorry!

    I guess aks1 misunderstood your suggestion to use an ST-Link-device to put a complete ST-Link circuit on his board...