Please confirm my header debug  - Page 1
Forum section: electronics / general

author: lawrence11
author_rank: Frequent Contributor
timestamp: September 29, 2019, 05:54:28 am
content: This good? Yay or Nay? These are pins with these acronyms attached to pins on Cubemx.thx. ST-Link V3 mini swd header will be coming in.

author: ataradov
author_rank: Super Contributor
timestamp: September 29, 2019, 06:07:15 am
content: You don't need SWO for basic programming and debugging. Other resistors are also optional for a basic configuration.

author: lawrence11
author_rank: Frequent Contributor
timestamp: September 29, 2019, 02:25:21 pm
content: This pin is not needed anyways.So there will be debugging.See any mistakes?

author: SiliconWizard
author_rank: Super Contributor
timestamp: September 29, 2019, 03:23:29 pm
content: SWO is basically an async serial output (from MCU -> whatever you want). I find it pretty handy for development, but it's indeed not required, it's just a plus.Your wiring looks correct, I checked the official Cortex debug connector for the pin-out.The series resistors are probably already part of your debug probe, so you don't need to add them to your cable. (And if not, it's not a huge deal here. They are mainly to calm down EMI.)

author: ataradov
author_rank: Super Contributor
timestamp: September 29, 2019, 03:30:12 pm
content: Yes, you still need the rest of the pins. But don't put any resistors, it would be a waste of time.

author: lawrence11
author_rank: Frequent Contributor
timestamp: September 29, 2019, 03:53:18 pm
content: Quote from: SiliconWizard on September 29, 2019, 03:23:29 pmBut isnt SWDIO bi-directionnal?Shouldnt resistor be close as possible to the "talking chip" ?Thus I wold need a resistors on SWO and SWDIO as shown to satisfy the requirements?Also, the internal pull-ups are said to be "weak", and can sometimes catch noise and its recommended, when possible, to add them. For me its possible, so I add them.

author: ataradov
author_rank: Super Contributor
timestamp: September 29, 2019, 03:55:26 pm
content: Pull-ups, sure, keep them. But for the series termination - you will not get anywhere close to the clocks where it actually matters. Here they are for current limiting, but again, this is not necessary. Don't overthink it.

author: lawrence11
author_rank: Frequent Contributor
timestamp: September 29, 2019, 04:01:50 pm
content: Quote from: ataradov on September 29, 2019, 03:55:26 pmAHA, but I think I can clock out SWO at 24mhz? if I remember correctly. Wouldnt 24 mhz through a 6 inch long ribbon be at thos speed limits?I have the mother load, the st-link V3.

author: ataradov
author_rank: Super Contributor
timestamp: September 29, 2019, 04:04:42 pm
content: Yes, and 24 MHz for reasonably short wires will not be a problem. Also, for pure programming SWD clock does not matter. It will not increase the speed of programming, since the slowest part of the chain is Flash memory. For debugging higher clock will make a difference, but again, don't overthink it.

author: SiliconWizard
author_rank: Super Contributor
timestamp: September 29, 2019, 04:25:04 pm
content: You'll be using an ST-Link V3 won't you? It should have already everything required on it. You just need to make an adapter cable. Nothing else IMO.As to clock rate, SWD on small MCUs will never be meant to be clocked at such high speeds. The typical max rates are in the order of 1Mbps to 2MBps or so... same for SWO.Call me when you can use SWD @24MHz on an STM32 MCU, especially with a ST-Link probe?The clock rate of SWD and SWO signals is absolutely NOT the system clock rate.

author: lawrence11
author_rank: Frequent Contributor
timestamp: September 29, 2019, 07:01:50 pm
content: OK guys, you win, you win.No series resistor, but only pullupsBasically my circuit, but replace 33ohm resistor by a trace. Got it.