Page 1 of 1

ESP32-S3 I2S problem using GPIO41

Posted: Wed Nov 27, 2024 2:28 am
by jesper
I have a new board, using the ESP32-S3-WROOM-2 module and have I2S connected to:

Code: Select all

#define GPIO_I2S_MCLK		GPIO_NUM_39
#define GPIO_I2S_SD		GPIO_NUM_40
#define GPIO_I2S_BCK		GPIO_NUM_41
#define GPIO_I2S_WS		GPIO_NUM_42
I2S is not working and there are signals on all pins, except GPIO_41.
I'm aware this is normally JTAG MTDI.

I have added the following 4 lines of code to reconfigure the JTAG pins to GPIO in the beginning of my code:

Code: Select all

	gpio_reset_pin(GPIO_I2S_MCLK);		// 39
	gpio_reset_pin(GPIO_I2S_SD);		// 40
	gpio_reset_pin(GPIO_I2S_BCK);		// 41
	gpio_reset_pin(GPIO_I2S_WS);		// 42
This worked on another board, where I couldn't get GPIO to work correctly until I remembered these pins are JTAG by default.
I did not use I2S on the pins then, only "regular" GPIO and for GPIO41 (MTDI) it was being used as an input.

So, it looks like my gpio_reset_pin doesn't work as intended.
Is it even possible to reconfigure the pins like this (or in some other way)?
I'm aware that it can be done in eFuse, but I don't want to go there, it's a one-way street and complicate production.

I tried mapping GPIO_I2S_BCK to my only free GPIO and I2S then worked as intended.

Something that tells me that JTAG is NOT turned off is that when I, initially, connected the new GPIO_I2S_BCK to GPIO41 and the trace to the codec, the board went nuts. I had to cut the trace so the signal didn't go back to the ESP32-S3.