Electronic – JTAG trace length affecting programming ability

jtagpcbprogrammingsignal integrity

I've recently had a design made that requires a programming port to be located quite far from the device I'm trying to program. This has meant that my cJTAG traces are around 13cm long. I think as a result of this the programming is a bit temperamental regardless of the programming clock frequency.

I had a similar problem in another design, and resolved it by using 22 ohm series resistors on the TMS and TCK lines near the microcontroller, but that doesn't seem to have worked so reliably with this design. That could be because the distance is greater, or because the lines switch layer a few times on their way from the programming port. There is also a UART Tx/Rx that runs along to the port beside the JTAG traces.

The photo below shows the route of the JTAG and UART traces (top to bottom: Tx, Rx, TCK, TMS)
enter image description here

At the bottom left you can see the series resistors, and an additional 10k pullup resistor on the TCK line which I was the datasheet advised to allow hot-plugging a programming connector.

Right now I'm hoping to find a way to make programming of the devices more reliable, so I'd really appreciate any insight or advice on running jtag over this distance.

Best Answer

"@analogsystemsrf When I probed the lines I didn't see much noise or coupling at all. Pretty clean looking to me. In fact, with the probes in place the programming worked better than without."

It sounds like your programming lines might be improperly terminated and that you've got some ringing on them originating from an impedance mismatch somewhere. Probing signals like that can often hide/fix the issue.