First post I've made in my life, I hope it can help me.
I am working with the esp32-S3 board, I need to use SPI and I2C communication, but I cannot find the pins related to these.
I understand that in GPIO35-36-37 there is SPI communication (of the two available), but it does not explain the MOSI, MISO and CLK pin.
On the other hand, I do not identify the SDA and SCL pins anywhere.
I hope you can help me, thank you very much!
Pins for I2C and SPI communication on ESP32-S3-DevKitC-1
-
- Posts: 9772
- Joined: Thu Nov 26, 2015 4:08 am
Re: Pins for I2C and SPI communication on ESP32-S3-DevKitC-1
Congrats on your first post!
Most digital peripherals on the ESP32 series are generally connected to IO pins via two systems: the IOMUX and the GPIO matrix. The IOMUX offers a tiny bit less latency, but only allows connecting to specific IO pins; the GPIO matrix has some extra latency but allows any signal of a digital peripheral to be connected to any GPIO pin.
The SPI peripheral can be connected via both the IOMUX and the GPIO matrix. The pins indicated are for the IOMUX, but for 99% of the use cases you can actually use any (not otherwise used) GPIO for this using the GPIO matrix.
Because I2C is generally quite slow, it doesn't have an IOMUX connection, and does not have 'standard' pins for it. Still, the GPIO matrix allows you to use any pin for any I2C signal.
Hope that clarifies it a bit.
Most digital peripherals on the ESP32 series are generally connected to IO pins via two systems: the IOMUX and the GPIO matrix. The IOMUX offers a tiny bit less latency, but only allows connecting to specific IO pins; the GPIO matrix has some extra latency but allows any signal of a digital peripheral to be connected to any GPIO pin.
The SPI peripheral can be connected via both the IOMUX and the GPIO matrix. The pins indicated are for the IOMUX, but for 99% of the use cases you can actually use any (not otherwise used) GPIO for this using the GPIO matrix.
Because I2C is generally quite slow, it doesn't have an IOMUX connection, and does not have 'standard' pins for it. Still, the GPIO matrix allows you to use any pin for any I2C signal.
Hope that clarifies it a bit.
Re: Pins for I2C and SPI communication on ESP32-S3-DevKitC-1
Thank you very much for your answer.
I'm a little new to this and would like to go deeper, but from what I understand you're telling me that by using the GPIO matrix, can I assign functions to any pin?
If so, how would the programming be, for example, if I want a pin to be MOSI, how would I do it?
I also take the opportunity to ask: Is it possible and how can I use VSPI?
Thank you so much!!!!!
I'm a little new to this and would like to go deeper, but from what I understand you're telling me that by using the GPIO matrix, can I assign functions to any pin?
If so, how would the programming be, for example, if I want a pin to be MOSI, how would I do it?
I also take the opportunity to ask: Is it possible and how can I use VSPI?
Thank you so much!!!!!
-
- Posts: 9772
- Joined: Thu Nov 26, 2015 4:08 am
Re: Pins for I2C and SPI communication on ESP32-S3-DevKitC-1
For most peripherals, yes. How to do this depends on your SDK: for instance, with ESP-IDF, you'd pass the GPIO pins to the function that initializes the SPI bus.Yohani wrote: ↑Thu Jan 11, 2024 2:11 pmI'm a little new to this and would like to go deeper, but from what I understand you're telling me that by using the GPIO matrix, can I assign functions to any pin?
If so, how would the programming be, for example, if I want a pin to be MOSI, how would I do it?
Yes, you can, using the same programming interface.I also take the opportunity to ask: Is it possible and how can I use VSPI?
Who is online
Users browsing this forum: No registered users and 45 guests