Page 1 of 1

ESP32D2WD SPI and JTAG pin with MUX

Posted: Thu May 21, 2020 4:36 pm
by vlucio
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.

Re: ESP32D2WD SPI and JTAG pin with MUX

Posted: Thu May 21, 2020 8:03 pm
by SomeCallMeTim
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

Re: SPI and JTAG pins MUX

Posted: Thu May 21, 2020 11:29 pm
by ESP_Angus
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.

Re: ESP32D2WD SPI and JTAG pin with MUX

Posted: Fri May 22, 2020 7:33 am
by ESP_Sprite
Mod note: Merged two duplicate topics.

Re: ESP32D2WD SPI and JTAG pin with MUX

Posted: Mon May 25, 2020 7:56 pm
by vlucio
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?