cancel
Showing results for 
Search instead for 
Did you mean: 

Help troubleshooting stm32g431 board

aks1
Associate II

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

 

26 REPLIES 26
Karl Yamashita
Principal

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.

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.
CAN Jammer an open source CAN bus hacking tool
CANableV3 Open Source

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

From the image, the jumper JP1 is there.

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.
CAN Jammer an open source CAN bus hacking tool
CANableV3 Open Source

aks1_0-1761196599199.png

the image isnt very clear but there is no jumper there. Am i looking in the wrong location ??

Technically, JP1 is spelled "JP1", lol. But CN3 will also do. 

Can't tell which wire on the Disco connected at CN2-2 is going to your board. Not sure if both wires are white, or one of them is gray? So can't tell if SWCLK and SWDIO are swapped?  

I have an STM32F4 Discovery and I am able to remove JP1 or CN3 jumpers. STM32Cube Programmer can connect to an STM32F072 with no issues. I'm only using CN2-2, CN2-3 and CN2-4 connected to the STM32F072. The STM32F072 is powered by USB.

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.
CAN Jammer an open source CAN bus hacking tool
CANableV3 Open Source


@Karl Yamashita wrote:

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


I think that's just because @aks1 is using the ST-Link on the Discovery board?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
Andrew Neil
Super User

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.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
LCE
Principal II

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.

 


@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

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.