cancel
Showing results for 
Search instead for 
Did you mean: 

Which is Correct; 4-wire SWD without Reset OR 5-Wire SWD with Reset?

eewiz
Associate III

I see numerous examples of 4-wire SWD without a reset pin connection.

I come from the PIC world where there is always Data, Clock and Reset for a Pgm/Dbg interface.

I bought a Chinese STLink-V2 programmer/debugger and it has a reset pin as well as data, clock, GND and VSS.

Although, the Chinese STLink-V2 comes with a 4-conductor cable for attachment to my target.

Do I need to connect the Reset pin?

Also, anyone know of an Ap-Note that covers the electrical nature of the SWD interface.

Thank You

24 REPLIES 24
eewiz
Associate III

I just discovered that according to the F030 Reference Manual RM0360 in section 7.1.2 System Reset, the 5.6K pull up shown above will also not be required, it's internal on the F030.

So, I am down to three 0805 series 47 ohm series resistors.

They're main purpose is to limit peak snubber diode current and take a good portion of the surge energy away from the snubber diodes.

Series resistors also provide slew rate, overshoot and ring reduction which will aid in passing emissions testing.

I suppose if STLINKv2/v3 is twice as fast as a PICkit or ICD3, etc..., then I may have to think about going to 22 ohm.

I'll check it on a scope and report how it looks once I get some target hardware.

That's all for now.

I might be tempted to put in a pad for that resistor, then just not install it. I practice paranoid designing. Glad you got this sorted out.

Harvy

I just successfully upgraded my Chinese debugger.

Here's how I did it.

Plug in the debugger.

Start CubeIDE.

Go to the Debug View.

Select Run/Debug Configurations.

Double-Click STM32 C/C++ Application.

Select Debugger Tab.

Select AutoStart GDB Local Server.

Select Debug Probe = ST-LINK (ST-LINK GDB Server).

Select SWD.

Select ST-LINK S/N and click Scan button.

If what looks like hex serial number fails to populate the box then STOP, your debugger is kaput.

Mine populates with something like "121F14002E15374...."

Click the DEBUG button which leads the upgrade prompt.

Click to upgrade which starts the STLinkUpgrade dialog. Mine is v3.4.0.

Mine had some bogus ST-Link ID like "3030303030303030301".

If you click Refresh Device List, nothing happens.

If you click Open in Update Mode, you get a failure message something like "The Debugger is not in DFU Mode".

Simply unplug the debugger from it's USB port.

Take a deep breath and plug it back in to the same port.

Go back to STLinkUpgrade.

Click Refresh Device List.

It says that debugger "3030303030303030301" appears to be defective but I found debugger "121F14002E15374...." would you like to use it.

Say yes.

Click Open in Update Mode and the Upgrade button will light up.

Click the Upgrade button.

Here's the result:

0693W00000Su2tMQAR.jpgYou may wish to resurrect your door stop and see if this works.

That's all for now

Harvey

I just successfully upgraded my Chinese debugger.

Here's how I did it.

Plug in the debugger.

Start CubeIDE.

Go to the Debug View.

Select Run/Debug Configurations.

Double-Click STM32 C/C++ Application.

Select Debugger Tab.

Select AutoStart GDB Local Server.

Select Debug Probe = ST-LINK (ST-LINK GDB Server).

Select SWD.

Select ST-LINK S/N and click Scan button.

If what looks like hex serial number fails to populate the box then STOP, your debugger is kaput.

Mine populates with something like "121F14002E15374...."

Click the DEBUG button which leads the upgrade prompt.

Click to upgrade which starts the STLinkUpgrade dialog. Mine is v3.4.0.

Mine had some bogus ST-Link ID like "3030303030303030301".

If you click Refresh Device List, nothing happens.

If you click Open in Update Mode, you get a failure message something like "The Debugger is not in DFU Mode".

Simply unplug the debugger from it's USB port.

Take a deep breath and plug it back in to the same port.

Go back to STLinkUpgrade.

Click Refresh Device List.

It says that debugger "3030303030303030301" appears to be defective but I found debugger "121F14002E15374...." would you like to use it.

Say yes.

Click Open in Update Mode and the Upgrade button will light up.

Click the Upgrade button.

Here's the result:

0693W00000SuGClQAN.jpgYou may wish to resurrect your door stop and see if this works.

That's all for now

Harvey White
Senior III

Thanks. I'll try that after a while. For now, I'm busy rewriting and restructuring a large piece of software to use Azure (if I can), rather than FreeRTOS. I figured it's better to try the rewrite than use the FreeRTOS translation layer. Makes me get familiar with Azure, anyway.

Of course, now I have to find the doorstop.........