NRF24L01 + Teensy Potential power issue?

Status
Not open for further replies.

kdharbert

Well-known member
I am integrating an NRF24L01 into a project using the RF24 library in order to replace a bit-banging SPI implementation noted in this thread.
https://forum.pjrc.com/threads/61078-Drone-RC-Tx-code-for-Teensy

The NRF24L01\Teensy combo is failing to communicate over the air.
On Tx and Rx I get correct data back from the printDetails call, so I know the wiring is correct.
I have both Tx and Rx set to channel 0x02.
I believe the Tx\Rx addresses are configured correctly.
The Tx is set to send four bytes of 0xAA so that the signal will be easy to spot on an oscilloscope.
I can see with an oscilloscope that the 0xAA pattern is getting clocked out on the MOSI pin of the Tx (Teensy4.0).
LEDs on the NRF24l01 power boards are lit. On the Tx, I can see the LED flicker at the rate I'm sending the 0xAA sequence.

On the Rx, the radio.available() never returns true.
The radio.available() call takes 8303 CPU cycles at 180Mhz (Teensy 3.6). This seems like a very long time.
I can see repeating traffic on the MISO pin that matches the timing of the data return for printDetails call.
The scope shows nothing that looks like the 0xAA sequence sent from the transmitter being clocked in on on MISO pin.

I can't figure out what I'm doing wrong. Config code fragments are below along with printDetails output.

Could the LED flicker indicate that I may have a power issue?
The long wait for radio.available to return is suspicious...but I don't know what would cause it or how to correct my config.
I previously had this working on an Arduino Uno, so I'm not sure if it could be specific to Teensys or I'm just blind and missed something.



TRANSMITTER:
radio.begin();
radio.setDataRate(RF24_250KBPS);
radio.setChannel(0x02);
// Set the TX and RX addreses in the module
radio.openReadingPipe(1,pipes[1]);
radio.openWritingPipe(pipes[0]);
radio.stopListening();

//radio.enableDynamicPayloads() ;
//radio.setAutoAck( true ) ;
//radio.powerUp() ;


while(1){
radio.printDetails();
delay(50);
radio.write(&temp,4);

}


STATUS = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1 = 0xf0f0f0f0e1 0xf0f0f0f0d2
RX_ADDR_P2-5 = 0xc3 0xc4 0xc5 0xc6
TX_ADDR = 0xf0f0f0f0e1
RX_PW_P0-6 = 0x20 0x20 0x00 0x00 0x00 0x00
EN_AA = 0x3f
EN_RXADDR = 0x03
RF_CH = 0x02
RF_SETUP = 0x27
CONFIG = 0x0e
DYNPD/FEATURE = 0x00 0x00
Data Rate = 250KBPS
Model = nRF24L01+
CRC Length = 16 bits
PA Power = PA_MAX




RECEIVER:
radio.begin();
radio.setDataRate(RF24_250KBPS);
radio.setChannel(0x02);
//radio.setChannel(0x22);
radio.openWritingPipe(pipes[1]);
radio.openReadingPipe(1,pipes[0]);
radio.startListening();

radio.printDetails();



STATUS = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1 = 0xf0f0f0f0d2 0xf0f0f0f0e1
RX_ADDR_P2-5 = 0xc3 0xc4 0xc5 0xc6
TX_ADDR = 0xf0f0f0f0d2
RX_PW_P0-6 = 0x20 0x20 0x00 0x00 0x00 0x00
EN_AA = 0x3f
EN_RXADDR = 0x3c
RF_CH = 0x02
RF_SETUP = 0x23
CONFIG = 0x0f
DYNPD/FEATURE = 0x00 0x00
Data Rate = 250KBPS
Model = nRF24L01+
CRC Length = 16 bits
PA Power = PA_LOW
 
Status
Not open for further replies.
Back
Top