2023-01-23 01:22 PM
Hello,
I am preparing a custom board and I am preparing the portion of the board to program and live debug it. I have been looking at the evaluation board schematic and some other online references and I'm getting some contradicting information, so I wanted to confirm:
PA13 (JTMS-SWDIO)
PA14(JTCK-SWCLK)
PB3 (JTDO-SWO)
NRST (NRST)
GND
Thank you in advance.
2023-01-24 03:18 AM
Hello @KMew,
Please refer to the AN4989 section 4.1 to know all the details
Hope that helps!
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-01-24 06:53 AM
Hello Sarra,
Thank you for the reply. So to confirm, based on this document:
2023-01-24 09:38 AM
NRST can be useful for some programming modes e.g. when you brick your MCU... Cube programmer has a mode "Under reset".
PB3=SWO is a debug tool: high speed UART like output. It is not mandatory but if you have this pin unused it may be worth routing it.
2023-01-24 11:01 AM
Hello Nikita91,
Thank you for your reply!
So to go through the list:
PA13 (JTMS-SWDIO) - MANDATORY
PA14(JTCK-SWCLK) - MANDATORY
PB3 (JTDO-SWO) - Optional, but recommended for debugging (Can I have it print messages in the debugger?)
NRST (NRST) - I have a physical push button for my custom board that resets it (similar to how the evaluation boards do it). For a proof of concept board, is this sufficient and I won't need the NRST pin to program?
GND - MANDATORY
2023-01-25 08:17 AM
Have a look at the pin-out of the ST-LINK connector for the used signals.
I always route the NRST to the programming/debugging connector because the CubeProgrammer or the CubeIDE may use it.
Or look at the schematics of a board like the NUCLEO_H743 and route the signals on CN5 and CN6 to your programming/debugging connector.
CN5 is for the Virtual COM port (VCP) supported by ST-LINK, very handy for debugging ( AN4989 section 7).
https://www.st.com/resource/en/schematic_pack/nucleo_144pins_sch.zip
Yes CubeIDE supports SWO and can displays messages.
Yes GND is mandatory.
You also need local VCC (most of the time 3.3V) if you use a ST-LINKV3SET
As said @Sarra.S the AN4989 is your friend!
2023-01-27 11:51 AM
Hello Nikita,
Thank you for the reply.
I fully agree that the AN4989 is helpful, but there are details missing that are important for some of my decisions.
2023-01-27 03:37 PM
Hello,
For the ST_LINKV3SET the natural connector to use is the CN1 (STDC14). Look at the manual chapter 9:
STDC14 connector (1.27 mm pitch) on target application: pinout detailed in Table 6. Reference Samtec FFSD-07-D-05.90-01-N-R
(The CN6 is obviously a 0.1" header).
The NRST pin is not pulled down. It is pulled up by an MCU internal pull up, and set to ground to activate the reset. You can keep the button for manual reset and also connect the reset pin to the debug connector.
2023-01-29 03:08 PM
Hello Nikita,
I am looking to optimize space on this board, so having to have a header connector on my board with that many pins will be problematic (This board is fitting in a tight space). That is why I was leaning towards CN6 and then just strictly use SWD.
When you say obviously CN6 is a 0.1" header, where are you basing your information off of? If that is the case, then that's preferred because I can more easily integrate the 0.1" pitch wire harnesses in our lab.
Thank you for confirming the NRST portion!