Esp32-s3 spi issue (won't work) help!

Hello, I am using esp32-s3-devkitc-1-n16r8v board to program a nrf24l01+pa+lna module. This module works as on the ESP32 Devkit V1 it works. The connections are done properly and the power supply is steady.
This is a code issue which I am unable to solve.
I need help configuring the SPI as it won't even read my module through this test as shown in the code below. I have no need for specific (FSPI,HSPI).
I have tried the code on multiple esp32-s3-devkitc-1-n16r8v board which is why it is a coding issue. Please end my suffering as I've spent countless hours trying to figure out how to make the SPI work.

/*
SCK -> GPIO 12 (pin 11)
MISO -> GPIO 13 (pin 12)
MOSI -> GPIO 11 (pin 10)
CE -> GPIO 10 (pin 9)
CSN -> GPIO 9 (pin 46)
*/

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#include <printf.h>
const int sck = 12;
const int miso = 13;
const int mosi = 11;
const int ss = 10;
const int ce = 9;
RF24 radio(ce, ss);
const byte thisSlaveAddress[5] = { 'R', 'x', 'A', 'A', 'A' };
SPIClass spi2(FSPI);
void setup() {
  Serial.begin(115200);
  printf_begin();
  spi2.begin(sck, miso, mosi, ss);


  Serial.println("CheckConnection Starting");
  Serial.println();
  Serial.println("FIRST WITH THE DEFAULT ADDRESSES after power on");
  Serial.println("  Note that RF24 does NOT reset when Arduino resets - only when power is removed");
  Serial.println("  If the numbers are mostly 0x00 or 0xff it means that the Arduino is not");
  Serial.println("     communicating with the nRF24");
  Serial.println();
  radio.begin();
  radio.printDetails();
  Serial.println();
  Serial.println();
  Serial.println("AND NOW WITH ADDRESS AAAxR  0x41 41 41 78 52   ON P1");
  Serial.println(" and 250KBPS data rate");
  Serial.println();
  radio.openReadingPipe(1, thisSlaveAddress);
  radio.setDataRate(RF24_250KBPS);
  radio.printDetails();
  Serial.println();
  Serial.println();
  if (radio.isChipConnected()) {
    Serial.println("Transmitter NF24 connected to SPI");
  } else {
    Serial.println("\n\nNF24 is NOT connected to SPI");
  }
}
void loop() {
}

Show us what is on the Serial monitor.

Attached is the output and the Settings from 'tools'
image

I see you are using a ver 3 processor. If you didn't know, the ver 3 boards is very broken at the moment, drop your esp32 boards back to 2.0.17

It works just fine. But many of the APIs have changed, so it may not work with legacy application code.

1 Like

Yes, he still needs to back level his boards until all the old libraries are updated which could take quite a while for the 3rd party libs.

I have reverted the version as you told me to 2.0.17
now I do have an output on the serial monitor but still having issues.
The pins Im using as I listed in the code of my post are still the same and I made sure that physically they're correct.

using ESP32 Ver 3.0.3 I ran the following code on a ESP32_S3_DevKit_1 Tools>Board set to ESP32S3 Dev Module

//  ESP32 > NRF24L01 receiver test using a text string


// ESP32_S3_DevKit_1 connections
// ESP32_S3 SCK pin GPIO12  to NRF24L10_pin SCK
// ESP32_S3 MISO pin GPIO13  to NRF24L10_pin MISO
// ESP32_S3 MOSI pin GPIO11  to NRF24L10_pin MOSI
// ESP32_S3 SS  pin GPIO 10   to NRF24L10 SS
// ESP32_S3 pin GPIO16   to NRF24L10 CE
// ESP32_S3 pin GPIO17 to NRF24L10 DCSN

#include <SPI.h>
#include <RF24.h>

#define CE_PIN 16
#define CSN_PIN 17

bool radioNumber = 1;
const uint8_t pipes[][6] = { "1Node", "2Node" };

RF24 radio(CE_PIN, CSN_PIN);

char dataReceived[10];  // this must match dataToSend in the TX
bool newData = false;

//===========

void setup() {
  Serial.begin(115200);
  delay(1000);
  Serial.println("\n\nESP32_S3 > NRF24L01 Receive text");
  radio.begin();
  if (radio.isChipConnected())
    Serial.println("Receiver NF24 connected to SPI");
  else {
    Serial.println("NF24 is NOT connected to SPI");
    while (1)
      ;
  }
  radio.setChannel(125);
  radio.setDataRate(RF24_1MBPS);
  //radio.setDataRate(RF24_250KBPS);
  radio.printDetails();
  if (!radioNumber) {
    radio.openWritingPipe(pipes[0]);
    radio.openReadingPipe(1, pipes[1]);
  } else {
    radio.openWritingPipe(pipes[1]);
    radio.openReadingPipe(1, pipes[0]);
  }
  radio.startListening();
  // radio.setPayloadSize(sizeof(Struct1));
}

//=============

void loop() {
  if (radio.available()) {
    char testString[10] = "";
    radio.read(testString, sizeof(testString));
    Serial.print("Test string:      ");
    Serial.println(testString);
  }
}

the serial monitor displays

ESP32_S3 > NRF24L01 Receive text
Receiver NF24 connected to SPI
SPI Speedz	= 10 Mhz
STATUS		= 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1	= 0x65646f4e32 0x65646f4e31
RX_ADDR_P2-5	= 0xc3 0xc4 0xc5 0xc6
TX_ADDR		= 0x65646f4e32
RX_PW_P0-6	= 0x20 0x20 0x20 0x20 0x20 0x20
EN_AA		= 0x3f
EN_RXADDR	= 0x03
RF_CH		= 0x7d
RF_SETUP	= 0x07
CONFIG		= 0x0e
DYNPD/FEATURE	= 0x00 0x00
Data Rate	= 1 MBPS
Model		= nRF24L01+
CRC Length	= 16 bits
PA Power	= PA_MAX
ARC		= 0

EDIT: changed to using

const int ss = 10;
const int ce = 9;
RF24 radio(ce, ss);

works OK - same output as above

Good to see the sketch is ;working' now, but that is as much as I can do. If you are using a breadboard there are two common errors, the first is many/most breadboards have connection issues, the second is it is easy to put the wire in the wrong hole, double check with a VOM. Good luck.

When running a pin check code (as shown in image, the output is:
MOSI: 11,MISO: 13,SCK: 12,SS: 10


I have adjusted my pins accordingly but my output still is the same as the last one..

can you upload a photo of your setup?
this is my setup

I solved it.
The problem was on the esp32-s3-devkitc-1-n16r8v (Specifically: YD-ESP32-22 2022-v1.3)

The GPIO no. is the Pin no. i.e: GPIO 12 is Pin 12.
I have no clue if this is due to the arduino library or the model itself, but it was solved by trying out same GPIO xx to PIN xx.

For any future members reading this, always give this dumb big brain move a go ;x

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