Is it possible to remap the SPI pins (/use any pins) on the ESP32-S3 for SPI without a performance hit? I only need to connect MOSI, MISO, SS (Slave Select / CE / CS), and CLK. So far I have been using GPIO11 for MOSI, GPIO13 for MISO, GPIO10 for SS, and GPIO12 for SCK, it works but I need to use different pins due to a PCB layout requirement. Would it be possible to do so without complicated configuration in program settings, or is it as simple as changing the pin numbers when initialising SPI?
Similarly, would I only be able to change the SPI pin numbers I will use to other SPI pins (in the box marked 5e) or to absolutely any GPIO pins?
ESP32-S3 SPI pin remapping
-
- Posts: 9583
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP32-S3 SPI pin remapping
Normally you can use any (not otherwise occupied) GPIO, just pass them to the initialization function. Using the GPIO matrix as such adds a slight delay to the signals, but unless you run SPI at its absolute maximum speed, that likely doesn't matter.
Re: ESP32-S3 SPI pin remapping
Thank you, I will test this out and provide an update
-
- Posts: 1
- Joined: Tue Sep 05, 2023 7:05 pm
Re: ESP32-S3 SPI pin remapping
It worked for me.
Note that:
Unfortunately I don't know if I am using GPIO matrix or IO MUX, but I don't need high SPI speeds so this is okay for me.
I am not directly using ESP-IDF. I just put different pin numbers in the SPI setup function.
Note that:
https://docs.espressif.com/projects/esp ... e_handle_tWhile in general, speeds up to 80MHz on the dedicated SPI pins and 40MHz on GPIO-matrix-routed pins are supported, full-duplex transfers routed over the GPIO matrix only support speeds up to 26MHz.
Unfortunately I don't know if I am using GPIO matrix or IO MUX, but I don't need high SPI speeds so this is okay for me.
I am not directly using ESP-IDF. I just put different pin numbers in the SPI setup function.
Who is online
Users browsing this forum: GeoffL and 121 guests