cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to upload my code using Serial Wire Debug

vbk22398
Associate III

Screenshot 2024-08-05 163011.png

Screenshot 2024-08-05 162955.png

Screenshot 2024-08-05 162916.png

  I am trying to upload my code using ST Link(SWD)into a custom board with an STM32 Core. I am using serial wire debug for programming. So I am getting the above shown error messages. If anyone have come across this issue, please help me resolve it.

Screenshot 2024-08-05 163741.png



Screenshot 2024-08-05 165217.png

 I tried uploading the code using STM Cube Programmer also. I am getting the above error.!

23 REPLIES 23
TDK
Guru

Perhaps pins are not wired up correctly. Can you share a schematic? How is the board connected to the programmer specifically?

Looks like it's detecting a voltage. That's good.

If you feel a post has answered your question, please click "Accept as Solution".

Focus on your hardware implementation,  doesn't appear viable.

Check power, especially VDDA/VSSA

What STM32? The make a handful of different ones, with different expectations. 

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

 

 

I tried programming the custom designed board using

i.) an external ST-LINK and also

ii.) using the debugger IC in the evaluation board(STM32L496ZGT6).

Both gave the same error as i mentioned in the previous posts. 


NOTE: 
I am able to program an Evaluation board without using the On-chip debugger IC by using an external ST-LINK. But not able to do the same with the custom designed board. Not able to find the underlying cause.!

In the debugger configuration I am able to detect the IC of the custom board. I am using Evaluation version debugger IC of STM32L496ZG to program a STM32F423RH. I am able to detect this IC when I change the setting to Segger J Link. I dont know why this happens.

Screenshot 2024-08-06 125217.png

LCE
Principal

I think the SWD interface also needs NRST.

Not sure though... until now I only used the complete flash adapter, incl. VCC and "GND detect".

So, what's the minimum pinning to flash (any?) STM32 via SWD?

STM32 via SWD

I am also attaching the gdbserver_log. Kindly if anyone can infer from it and help the concern, it'll be very helpful. Thanks in advance

LCE
Principal

I just checked some other posts, just to make sure that my next STM32 design will be programmable with its 5-pin SWD connector...

It seems that ST-Link needs the STM's supply voltage, NRST is only needed if the SWD pins are used for other purposes.

TDK_0-1722947407072.png

What's going on here? VCAP should only have the capacitor to ground. If you don't load R2, this should work.

Why does VSS_3 have a resistor to ground? It'll probably work, but doesn't make a lot of sense to me.

I don't see any other issues, although you don't show VDDA generation. Assuming that's fine.

 

SWD does not need VCC or NRST, but they can be useful to have.

If you feel a post has answered your question, please click "Accept as Solution".

Screenshot 2024-08-06 184638.png

 sir what should i do?