esp32s2, SPI interfaces (VSPI, HSPI, FSPI...)?

kurtzweber
Posts: 64
Joined: Tue Jan 10, 2017 1:09 pm

esp32s2, SPI interfaces (VSPI, HSPI, FSPI...)?

Postby kurtzweber » Wed Jan 13, 2021 9:49 am

Hi!

I'm working on a project based on an esp32s2 board and I need to interface with an SD card, using the SPI peripheral.

The datasheet says:
ESP32-S2 family features four SPI interfaces (SPI0, SPI1, SPI2 and SPI3). SPI0 and SPI1 can only be configured
to operate in SPI memory mode; SPI2 can be configured to operate in SPI memory and general-purpose SPI
modes; SPI3 can only be configured to operate in general-purpose SPI mode

With esp32, we had two available interfaces in the Arduino core:
  • HSPI (SPI2)
  • VSPI (SPI3)
In the source code of the esp32s2 branch, I see somewhere a "new" name (FSPI), for example:

Code: Select all

#if CONFIG_IDF_TARGET_ESP32S2
        _sck = (_spi_num == FSPI) ? SCK : -1;
        _miso = (_spi_num == FSPI) ? MISO : -1;
        _mosi = (_spi_num == FSPI) ? MOSI : -1;
        _ss = (_spi_num == FSPI) ? SS : -1;
#else
and:

Code: Select all

#if CONFIG_IDF_TARGET_ESP32S2
#define VSPI FSPI
#endif
So which interfaces are available for this chip?
Thanks!

rubby456
Posts: 1
Joined: Wed Jan 13, 2021 10:55 am

Re: esp32s2, SPI interfaces (VSPI, HSPI, FSPI...)?

Postby rubby456 » Wed Jan 13, 2021 11:02 am

(moderator note: deleted spam)

chegewara
Posts: 1378
Joined: Wed Jun 14, 2017 9:00 pm

Re: esp32s2, SPI interfaces (VSPI, HSPI, FSPI...)?

Postby chegewara » Wed Jan 13, 2021 11:45 am

Admins, please mark it as spam and remove due to links in post ^UP

lbernstone
Posts: 124
Joined: Mon Jul 22, 2019 3:20 pm

Re: esp32s2, SPI interfaces (VSPI, HSPI, FSPI...)?

Postby lbernstone » Wed Jan 13, 2021 3:31 pm


Who is online

Users browsing this forum: No registered users and 20 guests