ESP32D2WD SPI and JTAG pin with MUX

vlucio
Posts: 2
Joined: Thu May 21, 2020 3:21 pm

ESP32D2WD SPI and JTAG pin with MUX

Postby vlucio » Thu May 21, 2020 4:36 pm

I am performing a project in PCB in which I must use the SPI pins of the Esp32 D2WD to communicate with an ILI9341 screen, the problem is that the only available port is the one that shares with JTAG. I would like to keep both options available, that is, you can communicate through SPI and if necessary to use the JTAG pins to debug. What is the best option to get a type of mux that allows me to select between the two options.

SomeCallMeTim
Posts: 12
Joined: Fri Sep 01, 2017 3:50 pm

Re: ESP32D2WD SPI and JTAG pin with MUX

Postby SomeCallMeTim » Thu May 21, 2020 8:03 pm

Hi Vlucio -

Take a look at the GPIO matrix within the TRM. Most internal signals can be mapped to any external pin. There are some more "direct" paths, which are what are documented in the hardware reference manual, but you can get SPI signals out of any of the pins.

See Figure 7 in the TRM - "IO_MUX, RTC IO_MUX and GPIO Matrix Overview". I think there are some latency penalties for using the GPIO matrix instead of a direct mux in the IO_MUX - someone from espressif could probably speak to that.

- Tim

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: SPI and JTAG pins MUX

Postby ESP_Angus » Thu May 21, 2020 11:29 pm

Hi vlucio,

You can use the GPIO Matrix to remap the SPI bus to any free GPIO pins. (This is possible for almost every peripheral in the ESP32, the JTAG & SD peripherals are the notable exceptions.)

The SPI driver in the software environment you're using should give a way to set the pins on initialization.

ESP_Sprite
Posts: 9761
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32D2WD SPI and JTAG pin with MUX

Postby ESP_Sprite » Fri May 22, 2020 7:33 am

Mod note: Merged two duplicate topics.

vlucio
Posts: 2
Joined: Thu May 21, 2020 3:21 pm

Re: ESP32D2WD SPI and JTAG pin with MUX

Postby vlucio » Mon May 25, 2020 7:56 pm

In case there is no difference, it is possible to use the clk signal from one of the spi ports (where I have a flash) and connect it to the clk signal required by the screen, while the rest of the pins are needed in the screen am I redefining them?

Who is online

Users browsing this forum: No registered users and 48 guests