2025-10-22 2:20 PM - edited 2025-10-23 8:40 AM
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.
2025-10-23 8:37 AM
they're gray. The CN2-2 is going to SWDclk of the board and CN2-4 is going to SWDIO
2025-10-23 8:37 AM
yes that is correct
2025-10-23 8:39 AM
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.
2025-10-23 8:44 AM
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.
2025-10-23 8:45 AM
@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.
2025-10-23 9:36 AM
> 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.
2025-10-23 9:36 AM - edited 2025-10-23 9:39 AM
@aks1 wrote:standalone ST-link is not an option as mentioned above. I need to encapsulate the board in epoxy...
That doesn't make sense!
You just use the standalone ST-Link in place of the ST-Link on the Discovery board.
You also won't be encapsulating the Discovery board - will you?!
PS:
@LCE beat me to it!
2025-10-23 9:39 AM
@LCE wrote:Andrew's suggestion with the USB port
Not my suggestion. @aks1 made that up - I never mentioned a USB port!
2025-10-23 9:59 AM
> LCE beat me to it!
@Andrew Neil only by seconds! :D
2025-10-23 10:01 AM
> 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...