ESP32-S3 failing to initialize NRF24L01+PA+LNA (radio.begin() fails with custom SPI)

Hi everyone,

I'm incredibly stuck trying to get an ESP32-S3 to talk to an NRF24L01+PA+LNA module. My goal is simply to get radio.begin() to return true and establish basic SPI communication so I can move on to sending data, but the radio absolutely refuses to initialize.

I have triple-checked my wiring and tried mapping custom SPI pins, but I'm just getting my failure message in the Serial Monitor.

My Hardware:

  • Microcontroller: ESP32-S3 Dev Board (Using the hardware "COM" port for uploading and Serial Monitor, with USB CDC On Boot set to Disabled).
  • Radio Module: NRF24L01+PA+LNA (The black version with the external antenna).
  • Power: I am using the NRF24L01 Voltage Regulator Baseboard Adapter. It is properly supplied with 5V, so the NRF24 should be getting a stable 3.3V.

My Wiring (ESP32-S3 -> NRF24):

  • VCC -> 5V (ESP32-S3)
  • GND -> GND (ESP32-S3)
  • CE -> GPIO 16 (or any digital pin)
  • CSN -> GPIO 17 (or any digital pin)
  • SCK -> GPIO 12
  • MISO -> GPIO 13
  • MOSI -> GPIO 11

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

#define CE_PIN 16
#define CSN_PIN 17

RF24 radio(CE_PIN, CSN_PIN);
const byte address[6] = "00001";

void setup() {
Serial.begin(115200);
radio.begin();

if (radio.isChipConnected()) {
Serial.println("nRF24L01 connected!");
} else {
Serial.println("nRF24L01 not responding!");
while (1); // Halt if not connected
}

radio.openReadingPipe(0, address);
radio.setPALevel(RF24_PA_MIN); // Use MIN for testing close together
radio.startListening();
}

void loop() {
if (radio.available()) {
char text[32] = "";
radio.read(&text, sizeof(text));
Serial.println(text);
}
}
What I've already tried / verified:

  1. Power is stable: Since I'm using the dedicated baseboard adapter, standard 3.3V brownout issues shouldn't be the culprit.
  2. Serial Monitor is working: I can see the "CHECKING RADIO" and "FAILED" text perfectly, so it's not a serial port issue.
  3. Wiring continuity: Checked that MISO is actually going to MISO, etc., and that there are no crossed jumper wires.
  4. Raw SPI test: I bypassed the library and did a raw SPI.transfer to read the CONFIG register, and it just returned 0x00 / 0xFF, meaning the ESP32 is basically talking to a brick wall.

My Suspicions: Since power is being handled by the adapter, I suspect this is strictly an SPI communication issue. Is there a specific quirk with the SPI.begin(SCK, MISO, MOSI) function on the ESP32-S3 that I am missing? Do I need to manually define the HSPI or FSPI bus for this specific board?

Any help or pointers would be massively appreciated!

UPDATE!!!

I try to diagnose and I discover that there is no power
ESP-ROM:esp32s3-20210327

Build:Mar 27 2021

rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)

SPIWP:0xee

mode:DIO, clock div:1

load:0x3fce2820,len:0x10cc

load:0x403c8700,len:0xc2c

load:0x403cb700,len:0x30c0

entry 0x403c88b8

--- TESTING CUSTOM SAFE PINS ---

FAILED: Radio not responding.

--- NRF24 DETAILED DIAGNOSTICS ---

SPI Speedz = 10 Mhz

STATUS = 0x00 RX_DR=0 TX_DS=0 TX_DF=0 RX_PIPE=0 TX_FULL=0
RX_ADDR_P0-1 = 0x0000000000 0x0000000000
RX_ADDR_P2-5 = 0x00 0x00 0x00 0x00
TX_ADDR = 0x0000000000
RX_PW_P0-6 = 0xff 0xff 0xf8 0x00 0x00 0x00
EN_AA = 0x00
EN_RXADDR = 0x00
RF_CH = 0x00
RF_SETUP = 0x00
CONFIG = 0x00
DYNPD/FEATURE = 0xff 0xff
Data Rate = 1 MBPS
Model = nRF24L01+
CRC Length = 16 bits
PA Power = PA_MIN
ARC = 0

I'd probably begin by printing out MOSI, MISO and SCK just to see if whatever board you've chosen actually uses the pins you're connecting to.

give a link to the specific ESP32S3 dev board you are using?

My new wiring

  • VCC (Adapter) -> 5V (Red wire)
  • GND (Adapter) -> GND (Black wire)
  • CE -> Pin 4 (Orange wire)
  • CSN -> Pin 10 (Yellow wire)
  • SCK -> Pin 12 (Green wire)
  • MISO -> Pin 13 (White wire)
  • MOSI -> Pin 11 (Blue wire)

then I try your suggestion
--- ESP32-S3 DEFAULT SPI PINS ---

MOSI : 11

MISO : 13

SCK : 12

SS : 10


this is my code
void setup() {
Serial.begin(115200);
}

void loop() {
Serial.println("\n--- ESP32-S3 DEFAULT SPI PINS ---");

Serial.print("MOSI : ");
Serial.println(MOSI);

Serial.print("MISO : ");
Serial.println(MISO);

Serial.print("SCK : ");
Serial.println(SCK);

Serial.print("SS : ");
Serial.println(SS);

Serial.println("---------------------------------");

delay(2000); // Wait 2 seconds and print it again!
}

how? In Arduino IDE I use the ESP32S3 Dev Module

there are multiple dev module based on the ESP32 - can you give a link or a photo?

your SPI GPIOs look OK

using a ESP32-S3-DevKitC-1 to communicate with a SX1262 LoRa module using Radiolib P2P Transmit_Interrupt I used the following

/* ESP32S3 GPIOs to SX1262 has the following connections:
MOSI: 11
MISO: 13
SCK: 12
SS: 10
*/

#define NSS  10
#define DIO1 17
#define NRST 18
#define BUSY 8
SX1262 radio = new Module(NSS, DIO1, NRST, BUSY);//18, 10, 12, 15);  // SS DIO1 NRST BUSY

the ESP32-S3-DevKitC-1 connected to the SX1262 OK serial monitor displayed

ESP32S3 [SX1262] Initializing ... success!
[SX1262] Sending first packet ... transmission finished!
[SX1262] Sending another packet ... 1 35 69 103 137 171 205 239 transmission finished!
[SX1262] Sending another packet ... 2 35 69 103 137 171 205 239 transmission finished!
[SX1262] Sending another packet ... 3 35 69 103 137 171 205 239 transmission finished!
[SX1262] Sending another packet ... 4 35 69 103 137 171 205 239 transmission finished!
[SX1262] Sending another packet ... 5 35 69 103 137 171 205 239 transmission finished!
[SX1262] Sending another packet ... 6 35 69 103 137 171 205 239 transmission finished!
[SX1262] Sending another packet ... 7 35 69 103 137 171 205 239 transmission finished!
[SX1262] Sending another packet ... 8 35 69 103 137 171 205 239 transmission finished!

a Heltec ESP32 Lora V2 SX1278 receiver displayed

Heltec LoRa V2  SX1276  [SX1276] Initializing ... success!
[SX1276] Starting to listen ... success!
[SX1276] Received packet! Data: 3 35 69 103 137 171 205 239  RSSI: -59.00 dBm SNR: 10.25 dB Frequency error:	-2803.89 Hz
Temperature = -10.37 *C  Pressure = 26437.00 hPa  Humidity = 439.13 %Gas = 613.89 KOhms  
[SX1276] Received packet! Data: 4 35 69 103 137 171 205 239  RSSI: -59.00 dBm SNR: 9.75 dB Frequency error:	-2799.70 Hz
Temperature = -10.36 *C  Pressure = 26437.00 hPa  Humidity = 439.13 %Gas = 613.89 KOhms  
[SX1276] Received packet! Data: 5 35 69 103 137 171 205 239  RSSI: -59.00 dBm SNR: 10.00 dB Frequency error:	-2799.70 Hz
Temperature = -10.35 *C  Pressure = 26437.00 hPa  Humidity = 439.13 %Gas = 613.89 KOhms  

photo of setup

1 Like

Well not really I have another goal. But I suceed with my problem it turns out there is a problem with the adapter so I direct the ESP32S3 connect to the NRF24L01+PA+LNA module I use 3x3 power so that it will not short circuit. It works somehow

then the code
#include <SPI.h>
#include <RF24.h>
#include <printf.h>

// These are the "Safe Pins" we picked for your ESP32
#define CE_PIN 15
#define CSN_PIN 4
#define SCK_PIN 6
#define MOSI_PIN 5
#define MISO_PIN 7

RF24 radio(CE_PIN, CSN_PIN);

void setup() {
Serial.begin(115200);

// No more infinite waiting! Just pause for 3 seconds to give
// you time to look at the Serial Monitor, then blast the text.
delay(3000);

printf_begin();

// This tells the ESP32 to use our custom pin layout for SPI
SPI.begin(SCK_PIN, MISO_PIN, MOSI_PIN, CSN_PIN);

Serial.println("\n--- NRF24L01 DIAGNOSTIC START ---");

if (radio.begin()) {
Serial.println("RESULT: SUCCESS! The radio is alive and talking.");

// CRITICAL SAFETY FOR BARE MODULE: Keep power low so the ESP32 doesn't crash!
radio.setPALevel(RF24_PA_MIN); 

} else {
Serial.println("RESULT: FAIL. No radio hardware found.");
}

Serial.println("--- Technical Details ---");
radio.printDetails();
}

void loop() {
// Do nothing, just keep the report on screen
}

So my next step is I tried to connect that setup to a stock RC Car wltoys K969 so that will be my remote. But yah it does not work. I try running it on KN Protocol and V2X2 Protocol still not work it suggest I try to use A7105.

here is my setup: