Merge branch 'contrib/github_pr_10722' into 'master'

Add ESP32-S3 to the default GPIOs used (GitHub PR)

Closes IDFGH-9344

See merge request espressif/esp-idf!22265
This commit is contained in:
Wan Lei
2023-02-14 18:22:21 +08:00
2 changed files with 21 additions and 19 deletions

View File

@@ -9,18 +9,18 @@
### Connections ### Connections
For different chip and host used, the connections may be different. For different chip and host used, the connections may be different. Here show a example diagram of hardware connection, you can freely change the GPIO defined in start of `main/spi_eeprom_main.c` and change the hardware relatively.
| | ESP32 | ESP32 | ESP32S2 | ESP32C2 | ESP32C3 | ESP32C6 | ESP32S3 | ESP32H2 | | | ESP32 |
| ---- | ----- | ----- | ------- | ------- | ------- | ------- | ------- | ------- | | ---- | ----- |
| Host | SPI1 | HSPI | SPI2 | SPI2 | SPI2 | SPI2 | SPI2 | SPI2 | | Host | SPI1 |
| VCC | 3.3V | 3.3V | 3.3V | 3.3V | 3.3V | 3.3V | 3.3V | 3.3V | | VCC | 3.3V |
| GND | GND | GND | GND | GND | GND | GND | GND | GND | | GND | GND |
| DO | 7 | 18 | 37 | 2 | 2 | 2 | 13 | 0 | | DO | 7 |
| DI | 8 | 23 | 35 | 7 | 7 | 7 | 11 | 5 | | DI | 8 |
| SK | 6 | 19 | 36 | 6 | 6 | 6 | 12 | 4 | | SK | 6 |
| CS | 13 | 13 | 34 | 10 | 10 | 10 | 10 | 1 | | CS | 13 |
| ORG | GND | GND | GND | GND | GND | GND | GND | GND | | ORG | GND |
### Notes ### Notes

View File

@@ -5,15 +5,17 @@
These two projects illustrate the SPI Slave driver. They're supposed to be flashed into two separate Espressif chips connected to eachother using the SPI pins defined in app_main.c. Once connected and flashed, they will use the spi master and spi slave driver to communicate with eachother. The example also includes a handshaking line to allow the master to only poll the slave when it is actually ready to parse a transaction. These two projects illustrate the SPI Slave driver. They're supposed to be flashed into two separate Espressif chips connected to eachother using the SPI pins defined in app_main.c. Once connected and flashed, they will use the spi master and spi slave driver to communicate with eachother. The example also includes a handshaking line to allow the master to only poll the slave when it is actually ready to parse a transaction.
For different chip and host used, the connections may be different. Here show a example diagram of hardware connection, you can freely change the GPIO settings by editing defines in the top of `main/app_main.c` in the master/slave source code. and change the hardware relatively.
The default GPIOs used in the example are the following: The default GPIOs used in the example are the following:
| Signal | ESP32 | ESP32-S2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | | Signal | ESP32 |
|-----------|--------|----------|----------|----------|----------| |-----------|--------|
| Handshake | GPIO2 | GPIO2 | GPIO3 | GPIO15 | GPIO2 | | Handshake | GPIO2 |
| MOSI | GPIO12 | GPIO12 | GPIO7 | GPIO20 | GPIO5 | | MOSI | GPIO12 |
| MISO | GPIO13 | GPIO13 | GPIO2 | GPIO19 | GPIO0 | | MISO | GPIO13 |
| SCLK | GPIO15 | GPIO15 | GPIO6 | GPIO18 | GPIO4 | | SCLK | GPIO15 |
| CS | GPIO14 | GPIO14 | GPIO10 | GPIO9 | GPIO1 | | CS | GPIO14 |
Please run wires between the following GPIOs between the slave and master to make the example function: Please run wires between the following GPIOs between the slave and master to make the example function:
@@ -26,4 +28,4 @@ Please run wires between the following GPIOs between the slave and master to mak
| SCLK | SCLK | | SCLK | SCLK |
| CS | CS | | CS | CS |
Be aware that the example by default uses lines normally reserved for JTAG on ESP32. If this is an issue, either because of hardwired JTAG hardware or because of the need to do JTAG debugging, feel free to change the GPIO settings by editing defines in the top of main.c in the master/slave source code. Be aware that the example by default uses lines normally reserved for JTAG on ESP32. If this is an issue, either because of hardwired JTAG hardware or because of the need to do JTAG debugging, feel free to change the GPIO settings.