Connecting JTAG?
Connecting JTAG?
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.
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.
-
- Posts: 9764
- Joined: Thu Nov 26, 2015 4:08 am
Re: Connecting JTAG?
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.
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.
-
- Posts: 263
- Joined: Sun Jun 19, 2016 12:00 am
Re: Connecting JTAG?
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.
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?
Fantastic! SWD sounds like a nice plan, since I'm creating a tiny board. I'll try that.
Thanks!
Thanks!
-
- Posts: 131
- Joined: Tue May 17, 2016 8:12 pm
Re: Connecting JTAG?
Sorry to intrude.
Does SWD work in the ESP32? I read that it did not. Could you later please confirm this.
br
Robert
Does SWD work in the ESP32? I read that it did not. Could you later please confirm this.
br
Robert
Re: Connecting JTAG?
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.
SWD is very much an ARM thing; ESP32 uses JTAG as a debugging interface. It does not support SWD.
Re: Connecting JTAG?
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.
-
- Posts: 263
- Joined: Sun Jun 19, 2016 12:00 am
Re: Connecting JTAG?
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
Edit: WiFive got the idea
Re: Connecting JTAG?
That would work, just make sure pin 12 is not left NC
-
- Posts: 263
- Joined: Sun Jun 19, 2016 12:00 am
Re: Connecting JTAG?
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
SWD / JTAG / GPIO
SWDIO / TMS / 14
SWDCLK / TCLK / 13
SWO / TDO / 15
NC / TDI / 12
Who is online
Users browsing this forum: Google [Bot] and 153 guests