[ESP32-S2] Do I need to setup 2 different SPIs (SPI 2 and SPI 3) for 9 devices?
Posted: Tue Jul 06, 2021 11:16 pm
Hi, reading the documentation about the ESP32-S2 it says SPI 0 and 1 are used internally for flash, and SPI 2 and 3 (often refered as HSPI and VSPI) are for user purposes and each one has 3 CS, so each one can drive only 3 slaves.
I have two questions:
1) If I wanted to drive 9 slaves, do I have to setup two separate SPIs (the SPI 2 and 3) each one with it's own MOSI, MISO and SCK lines? Example: SPI 2 = MOSI (13), SCK (14), MISO (15) and 6 CS lines any other pin
SPI 3 = MOSI (35), SCK (36), MISO (37) and 3 CS lines at any other pin
2) There is a [great video](https://www.youtube.com/watch?v=LY-1DHTxRAk&vl=es) about which pins cannot be used in the ESP32 for general purposes. In the S2, for example, the GPIO 0 cannot be used (for CS) as is an input only, 19-20 are for USB and 15-16 are for XTAL (if used). Are there any more pins I can't use for the main SPI lines (MOSI/MISO/SCK) and for Chip Select?
Thanks in advance!
I have two questions:
1) If I wanted to drive 9 slaves, do I have to setup two separate SPIs (the SPI 2 and 3) each one with it's own MOSI, MISO and SCK lines? Example: SPI 2 = MOSI (13), SCK (14), MISO (15) and 6 CS lines any other pin
SPI 3 = MOSI (35), SCK (36), MISO (37) and 3 CS lines at any other pin
2) There is a [great video](https://www.youtube.com/watch?v=LY-1DHTxRAk&vl=es) about which pins cannot be used in the ESP32 for general purposes. In the S2, for example, the GPIO 0 cannot be used (for CS) as is an input only, 19-20 are for USB and 15-16 are for XTAL (if used). Are there any more pins I can't use for the main SPI lines (MOSI/MISO/SCK) and for Chip Select?
Thanks in advance!