Page 1 of 2
Connecting JTAG?
Posted: Mon May 15, 2017 10:04 pm
by Scalpel78
Hi, I'm working on the third revision of my ESP-WROOM-32 based board. This time around I want to add support for JTAG debugging. I haven't used JTAG before, so I wanted to run this by you guys before I produce the new board.
My googling has led me to believe these are the pins that are used by JTAG;
GPIO14 => JTAG TMS
GPIO12 => JTAG TDI
GPIO13 => JTAG TCK
GPIO15 =>JTAG TDO
I found the above by looking at
https://hydrabus.com/wp-content/uploads ... _Debug.jpg
Addtionaly I need to include GND and VCC.
I see they also mention GPIOL0, GPIOL1, GPIOL2, GPIOL3, but I don't know what those pins are?
When looking at the JTAG wikipedia page there also seems to be several variants of connectors. 10-, 14- and 20 pins. I assume the 10-pin variant will work?
Any input here is appreciated, since I'm so unfamiliar with JTAG.
Re: Connecting JTAG?
Posted: Tue May 16, 2017 1:29 am
by ESP_Sprite
That matches
http://www.espressif.com/sites/default/ ... ist_en.pdf so it should be correct.
GPIOL0-3 seem to be pins of the FT2232-based cable they use; they're not JTAG-related and can be ignored.
As a connector, anything will work, even something that you architect yourself. The important bit is that you have an easy way to connect it to your JTAG-adapter. If you have room to spare, you may want to pick a 20-pin interface because they're fairly common; if you have less room an 10-pin or maybe even something uncommon like a FPC-connector may be more useful.
Re: Connecting JTAG?
Posted: Tue May 16, 2017 1:21 pm
by BuddyCasino
Or you can go the SWD route if you want a small footprint using these adapters, thats what I use:
https://www.adafruit.com/product/2094
https://www.adafruit.com/product/2743
https://www.adafruit.com/product/1675
SWD signal to ESP32 pin routing would then be:
SWIO 14
CLK 13
SWO 15
NC 12
KEY and RST are unconnected.
Re: Connecting JTAG?
Posted: Tue May 16, 2017 2:09 pm
by Scalpel78
Fantastic! SWD sounds like a nice plan, since I'm creating a tiny board. I'll try that.
Thanks!
Re: Connecting JTAG?
Posted: Tue May 16, 2017 2:40 pm
by rsimpsonbusa
Sorry to intrude.
Does SWD work in the ESP32? I read that it did not. Could you later please confirm this.
br
Robert
Re: Connecting JTAG?
Posted: Tue May 16, 2017 2:54 pm
by ESP_igrr
BuddyCasino: where did you get information that ESP32 supports SWD?
SWD is very much an ARM thing; ESP32 uses JTAG as a debugging interface. It does not support SWD.
Re: Connecting JTAG?
Posted: Tue May 16, 2017 3:12 pm
by WiFive
I think he is saying use the smaller connectors traditionally used for SWD because they take up less board space than a full JTAG header. But still use JTAG signals.
Re: Connecting JTAG?
Posted: Tue May 16, 2017 3:15 pm
by BuddyCasino
Guess I could have worded that differently - the protocol SWD is of course not supported, but the connector works nicely. Comes in handy on a space-constrained breadboard - why waste space for unused pins?
Edit: WiFive got the idea
Re: Connecting JTAG?
Posted: Tue May 16, 2017 3:24 pm
by ESP_igrr
That would work, just make sure pin 12 is not left NC
Re: Connecting JTAG?
Posted: Tue May 16, 2017 3:44 pm
by BuddyCasino
OK NC might be confusing, it actually is connected, to be more clear the mapping is as follows:
SWD / JTAG / GPIO
SWDIO / TMS / 14
SWDCLK / TCLK / 13
SWO / TDO / 15
NC / TDI / 12