ESP32 GPIO Muxing Function posssibilities: I2S, I2C, SPI, UART, int RAM/ROM, touch and some GPIOs
Posted: Tue Jun 04, 2019 8:16 am
Hello ESP developers,
My company and I are defining a System with the following interface needs:
- WiFI/BT (as wireless frontends), both 2.4GHz CoEx
- I2C (System config)
- I2S (or PDM) (ESP32 Audio output to Amplifier/DAC)
- touch button Matrix 2x3 (user input)
- SPI (to config and feed a small LCD/TFT, controllers ST7789H2 or NT7534 or similar)
- UART (debugging mainly)
- some GPIOs for static control (Backlight, audio Amp on/off /mute etc.)
Currently I am planing to use the WROVER Module for this (suggestions welcome)
I am a bit puzzled by the pin mux of the ESP32. Checking the WROVER KIT for the LCD SPI connection and Lyra T Schematics for the I2S interface the IOs seem to spread a bit.
My intent is to use:
- I2C on GPIO 2(SCL), 15 (SDA)
- I2S on GPIO 0 (MCLK), 26 (SDIN), 25 (LR CLK), 5 (SCLK) (unidirectional Audio, no slave audio return)
- VSPI for the display on GPIO 5 (VSPICS0), 18 (VSPICLK), 23 (VSPIData), 19 (VSPIQ(clk)), 22 (VSPIWP), 21 (VSPIHD)
- UART on GPIO 3 (RX), 1 (TX)
- Touch button matrix 2x3 on GPIO 32, 33, 27, 14, 12, (reserve 4 if i need to use 6 buttons directly for simplicity)
- Remaining GPIOs 36 (PA on/off), 13 (LCD Backlight PWM control)
Maybe you can see that come pins are clashing :
- GPIO 5 is used by VSPICS0 and I2S0SCLK
As I plan to use the WROVER Module with RAM and Flash option I need to keep all SDIO pins (GPIO 6-11) and GPIO 16 +17 (PSRAM and Flash clocks) clear as they are used on the module.
Could you support me in assigning the functions I need correctly to the Module?
A Link to VSPI Display Use and I2S Audio IF use and Documentation will probably help a lot.
PS: Display is currently unclear but plan is 128x64 dor matrix monochrome or 170x320 RGB SPI type IPS TFT....a bit of bandwidth needed on SPI.
Thanks!!
Christian
My company and I are defining a System with the following interface needs:
- WiFI/BT (as wireless frontends), both 2.4GHz CoEx
- I2C (System config)
- I2S (or PDM) (ESP32 Audio output to Amplifier/DAC)
- touch button Matrix 2x3 (user input)
- SPI (to config and feed a small LCD/TFT, controllers ST7789H2 or NT7534 or similar)
- UART (debugging mainly)
- some GPIOs for static control (Backlight, audio Amp on/off /mute etc.)
Currently I am planing to use the WROVER Module for this (suggestions welcome)
I am a bit puzzled by the pin mux of the ESP32. Checking the WROVER KIT for the LCD SPI connection and Lyra T Schematics for the I2S interface the IOs seem to spread a bit.
My intent is to use:
- I2C on GPIO 2(SCL), 15 (SDA)
- I2S on GPIO 0 (MCLK), 26 (SDIN), 25 (LR CLK), 5 (SCLK) (unidirectional Audio, no slave audio return)
- VSPI for the display on GPIO 5 (VSPICS0), 18 (VSPICLK), 23 (VSPIData), 19 (VSPIQ(clk)), 22 (VSPIWP), 21 (VSPIHD)
- UART on GPIO 3 (RX), 1 (TX)
- Touch button matrix 2x3 on GPIO 32, 33, 27, 14, 12, (reserve 4 if i need to use 6 buttons directly for simplicity)
- Remaining GPIOs 36 (PA on/off), 13 (LCD Backlight PWM control)
Maybe you can see that come pins are clashing :
- GPIO 5 is used by VSPICS0 and I2S0SCLK
As I plan to use the WROVER Module with RAM and Flash option I need to keep all SDIO pins (GPIO 6-11) and GPIO 16 +17 (PSRAM and Flash clocks) clear as they are used on the module.
Could you support me in assigning the functions I need correctly to the Module?
A Link to VSPI Display Use and I2S Audio IF use and Documentation will probably help a lot.
PS: Display is currently unclear but plan is 128x64 dor matrix monochrome or 170x320 RGB SPI type IPS TFT....a bit of bandwidth needed on SPI.
Thanks!!
Christian