Merge branch 'feature/support_spi_example_on_s3' into 'master'

spi: support spi example on s3

See merge request espressif/esp-idf!14517
pull/7365/head
Armando (Dou Yiwen) 2021-07-30 03:51:26 +00:00
commit f5266c1066
4 zmienionych plików z 34 dodań i 18 usunięć

Wyświetl plik

@ -8,16 +8,16 @@
For different chip and host used, the connections may be different.
| | ESP32 | ESP32 | ESP32S2 | ESP32C3 |
| ---- | ----- | ----- | ------- | ------- |
| Host | SPI1 | HSPI | FSPI | SPI2 |
| VCC | 3.3V | 3.3V | 3.3V | 3.3V |
| GND | GND | GND | GND | GND |
| DO | 7 | 18 | 37 | 2 |
| DI | 8 | 23 | 35 | 7 |
| SK | 6 | 19 | 36 | 6 |
| CS | 13 | 13 | 34 | 10 |
| ORG | GND | GND | GND | GND |
| | ESP32 | ESP32 | ESP32S2 | ESP32C3 | ESP32S3 |
| ---- | ----- | ----- | ------- | ------- | ------- |
| Host | SPI1 | HSPI | FSPI | SPI2 | SPI2 |
| VCC | 3.3V | 3.3V | 3.3V | 3.3V | 3.3V |
| GND | GND | GND | GND | GND | GND |
| DO | 7 | 18 | 37 | 2 | 13 |
| DI | 8 | 23 | 35 | 7 | 11 |
| SK | 6 | 19 | 36 | 6 | 12 |
| CS | 13 | 13 | 34 | 10 | 10 |
| ORG | GND | GND | GND | GND | GND |
### Notes

Wyświetl plik

@ -52,6 +52,14 @@
# define PIN_NUM_MOSI 7
# define PIN_NUM_CLK 6
# define PIN_NUM_CS 10
#elif CONFIG_IDF_TARGET_ESP32S3
# define EEPROM_HOST SPI2_HOST
# define PIN_NUM_MISO 13
# define PIN_NUM_MOSI 11
# define PIN_NUM_CLK 12
# define PIN_NUM_CS 10
#endif

Wyświetl plik

@ -63,16 +63,20 @@ Pins in use. The SPI Master can use the GPIO mux, so feel free to change these i
#define GPIO_SCLK 6
#define GPIO_CS 10
#elif CONFIG_IDF_TARGET_ESP32S3
#define GPIO_HANDSHAKE 2
#define GPIO_MOSI 11
#define GPIO_MISO 13
#define GPIO_SCLK 12
#define GPIO_CS 10
#endif //CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2
#ifdef CONFIG_IDF_TARGET_ESP32
#define RCV_HOST HSPI_HOST
#elif defined CONFIG_IDF_TARGET_ESP32S2
#define RCV_HOST SPI2_HOST
#elif defined CONFIG_IDF_TARGET_ESP32C3
#else
#define RCV_HOST SPI2_HOST
#endif

Wyświetl plik

@ -64,16 +64,20 @@ Pins in use. The SPI Master can use the GPIO mux, so feel free to change these i
#define GPIO_SCLK 6
#define GPIO_CS 10
#elif CONFIG_IDF_TARGET_ESP32S3
#define GPIO_HANDSHAKE 2
#define GPIO_MOSI 11
#define GPIO_MISO 13
#define GPIO_SCLK 12
#define GPIO_CS 10
#endif //CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2
#ifdef CONFIG_IDF_TARGET_ESP32
#define SENDER_HOST HSPI_HOST
#elif defined CONFIG_IDF_TARGET_ESP32S2
#define SENDER_HOST SPI2_HOST
#elif defined CONFIG_IDF_TARGET_ESP32C3
#else
#define SENDER_HOST SPI2_HOST
#endif