Olimex Support Forum

Microcontrollers => ESP32 => Topic started by: MZL on January 21, 2024, 07:33:28 PM

Title: ESP32-Gateway Rev. F and up: GPIO 16, 33 and 34 usable for SPI CS?
Post by: MZL on January 21, 2024, 07:33:28 PM
Hi there,

I´m using an ESP32-Gateway Rev. F as a SPI master with following GPIOs:
miso: 12
mosi: 13
sclk: 14
cs1: 15
cs2: 4
cs3: 2

I know that I "should" not use more than three slaves but i read that it still could work.
In the PDF doc here https://www.olimex.com/Products/IoT/ESP32/ESP32-GATEWAY/resources/ESP32-GATEWAY-GPIOs-Rev.F-up.pdf
is written which GPIOs are free to use but there is no information about GPIO 16.
So is GPIO 16 also free to use?
What is with GPIO 33 and 34? If I define these pins as output, can I also use these as GPIOs for SPI chip select?

thanks in advance
Title: Re: ESP32-Gateway Rev. F and up: GPIO 16, 33 and 34 usable for SPI CS?
Post by: LubOlimex on January 23, 2024, 11:06:35 AM
GPIO16 is free to use.

GPIO33 is connected to the LED. You can try if it would work the way you want - set as output and try.

GPI34 is only input. The name is GPI on purpose (as opposed to GPIO). It can't be output.

For ESP32 SPI lines it is recommended to start from here:

https://docs.espressif.com/projects/esp-idf/en/release-v3.0/api-reference/peripherals/spi_master.html
Title: Re: ESP32-Gateway Rev. F and up: GPIO 16, 33 and 34 usable for SPI CS?
Post by: MZL on February 01, 2024, 07:57:28 PM
thanks a lot.
I tested it and it works well.