SPI does not work on ESP32S3 Wroom-1U-N8R8

The SPI does not work on my self-layouted ESP32S3 Wroom-1U-N8R8 module.

My Arduino-Code works since I tested it successfully on a Seeed Xiao-ESP32S3.

But on the Wroom-module, I can't get the application to work. For now, I think it is purely software that causes the misfunction.

Here is my layouted ESP32S3 Wroom-1U-N8R8 module :

For my functionality (i.e. external peripherie) to work, I need the SPI pins CS / MOSI / SCK - and in addition my application also needs the BUSY / RES / DC pins as can be seen in the above layout.

Obviously, in comparison to the Xiao-ESP32S3, the Wroom-module has different pins for the SPI.

My Arduino pin-definition therefore looks like this:

#define CS_SS_PIN   SS    // 10 (CS SS)
#define HSPI_COPI   MOSI  // 11 (MOSI)
#define HSPI_SCLK   SCK   // 12 (SCK)

#define BUSY_PIN    A4    // 5  (BUSY)
#define RST_PIN     A5    // 6  (RST RES)
#define DC_PIN      A6    // 7  (DC)

Inside Arduino IDE, I choose the board ESP32S3 Dev Module :

From the pins_arduino.h file of this ESP32S3 Dev Module I find:

static const uint8_t SS    = 10;     // --> I refer in code
static const uint8_t MOSI  = 11;     // --> I refer in code
static const uint8_t MISO  = 13;
static const uint8_t SCK   = 12;     // --> I refer in code

static const uint8_t A0 = 1;
static const uint8_t A1 = 2;
static const uint8_t A2 = 3;
static const uint8_t A3 = 4;
static const uint8_t A4 = 5;     // --> I refer in code
static const uint8_t A5 = 6;     // --> I refer in code
static const uint8_t A6 = 7;     // --> I refer in code
static const uint8_t A7 = 8;
static const uint8_t A8 = 9;
static const uint8_t A9 = 10;
static const uint8_t A10 = 11;
static const uint8_t A11 = 12;
static const uint8_t A12 = 13;
static const uint8_t A13 = 14;
static const uint8_t A14 = 15;
static const uint8_t A15 = 16;
static const uint8_t A16 = 17;
static const uint8_t A17 = 18;
static const uint8_t A18 = 19;
static const uint8_t A19 = 20;

The ESP32S3 Wroom-1U-N8R8 module I use, has 8MB of Flash as well as 8MB of PSRAM.

Here is the datasheet of the ESP32S3 Wroom-1U-N8R8 module: https://www.espressif.com/sites/default/files/documentation/esp32-s3-wroom-1_wroom-1u_datasheet_en.pdf

When I run my Arduino code, I have the following settings:

As you can see, the most important settings I set as such:

  • USB CDC on Boot: "Enabled"
  • Flash Mode: "QIO 80 MHz"
  • Flash Size: "8MB (64Mb"
  • PSRAM: "OPI PSRAM"

Inside my Arduino code's setup() function, I do the following:

  pinMode(DC_PIN, OUTPUT);
  pinMode(RST_PIN, OUTPUT);
  pinMode(BUSY_PIN, INPUT);

  SPI.beginTransaction(SPISettings(10000000, MSBFIRST, SPI_MODE0));
  SPI.begin ();

Why is my SPI not working ????? Any idea ??

I think the ESP32-S3 has fixed SPI pins.

see the espressif document:
"GPIO & RTC GPIO - ESP32-S3 - — ESP-IDF Programming Guide v4.4.1 documentation

These SPIs are the pins from GPIO26 to GPIO37.

GPIO10, 11 and 12 pins do not appear to be part of this processor's SPI.

No I don't think so. Have you read the Note below in your link ? It sais:

Moreover, why would the ESP32S3 Dev Module's pins_arduino.h file show:

static const uint8_t SS    = 10;
static const uint8_t MOSI  = 11;
static const uint8_t MISO  = 13;
static const uint8_t SCK   = 12;

I think the pins 10-13 are o.k.

Maybe it is time that I inspect the hardware-layout more closely...

Those pins are OK for SD on a ESP32S3 Dev Kit board.

Much easier to test pinouts on a breadboard.

Does the Xiao-ESP32S3 use pins 10,11,12,13 for the SD card ?

Thank you all for your kind inputs.

I am not connecting any SD-card with the SPI (but a totally different application that is not relevant).

No, the working solution with the Xiao-ESP32S3 uses SPI-pins 7, 8, 9 and for SS I prefer to use A0.

// arduino_pins.h for Xiao ESP32S3:
static const uint8_t SS   = 44;   // --> I don't use this pin since I think it is not lead to the board's IOs
static const uint8_t MOSI = 9;  // --> I refer in code
static const uint8_t MISO = 8;  // --> I refer in code
static const uint8_t SCK  = 7;  // --> I refer in code

static const uint8_t A0 = 1;   // --> I use this for SS instead (works well)

For my Dev Module ESP32S3 Wroom-1U-N8R8, I still think 10-13 are ok.

// arduino_pins.h for Dev Module ESP32S3
static const uint8_t SS    = 10;
static const uint8_t MOSI  = 11;
static const uint8_t MISO  = 13;
static const uint8_t SCK   = 12;

Again, I need to check further my Hardware layout. Maybe I did a mistake on the SPI-via's....

I am sorry about any confusion - it was indeed a layout-mistake (i.e. a hardware issue).

A redesign/reorder of the PCB made everything work!

As for the ESP32-S3 Wroom-1U-N8R8, using the Arduino ESP32S3 Dev Module : I can definitively confirm the following SPI-pins:

static const uint8_t SS    = 10;
static const uint8_t MOSI  = 11;
static const uint8_t MISO  = 13;
static const uint8_t SCK   = 12;

Again, sorry for any confusion.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.