This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF2402G and nRF24L01+

Hi, I'm despair. I am trying to receive data from the device with nRF2402G with a nRF24L01 + module. The old receiver is destroyed. I believe that I have put all the notes from the nRF24L01 + datasheet.

nRF2402G works with these settings:

image description

  • RF channel -> 0x38
  • RF_PWR -> 0 dBm
  • XO_F -> 16 MHz
  • OD -> 1 Mbps data rate
  • Burst -> Shock Burst Tm mode
  • CRC_EN -> On-chip CRC generation enabled
  • CRC_L -> 16 bit CRC
  • PRE_EN -> Preamble generation enabled

nRF2402G sends the following data (recording on the nRF2402G lines):

image description

  • address: 0x54, 0x30, 0x30
  • data: 5 bytes

The software that I have been writing looks like this:

TX_ADR_WIDTH 3
TX_PLOAD_WIDTH 5

TX_ADDRESS[TX_ADR_WIDTH] = {0x54,0x30,0x30}; // Define a static TX address

RX_Mode()

{
nRF24L01_CEL;
DelayUs(10);
SPI_Write_Buf(WRITE_REG + RX_ADDR_P0, TX_ADDRESS, TX_ADR_WIDTH); // Use the same address on the RX device as the TX device

SPI_RW_Reg(WRITE_REG + SETUP_AW, 0x01);      		  			 // Setup of Address Widths: '01' - 3 bytes;'10' - 4 bytes;'11' – 5 bytes
SPI_RW_Reg(WRITE_REG + EN_AA,0x00);      						 // Disable Auto.Ack:Pipe0
SPI_RW_Reg(WRITE_REG + EN_RXADDR, 0x01);  						 // Enable Pipe0
SPI_RW_Reg(WRITE_REG + SETUP_RETR,0x00); 						 // Re-Transmit disabled
SPI_RW_Reg(WRITE_REG + RF_CH, 0x38);       				 		 // Select RF channel frequency
SPI_RW_Reg(WRITE_REG + RX_PW_P0, TX_PLOAD_WIDTH); 				 // Select same RX payload width as TX Payload width
SPI_RW_Reg(WRITE_REG + RF_SETUP, 0x06);   						 // Datarate:1Mbps; TX_PWR:'000' – -18dBm;'010' – -12dBm;'100' – -6dBm;'110' – 0dBm
SPI_RW_Reg(WRITE_REG + CONFIG, 0x0F);     						 // Set PWR_UP bit, enable CRC(2 bytes) & Prim:RX. RX_DR enabled
nRF24L01_CEH;
DelayUs(10);

} // end of RX_Mode

TX_Mode()

{
nRF24L01_CEL;
DelayUs(10);
SPI_Write_Buf(WRITE_REG + TX_ADDR, TX_ADDRESS, TX_ADR_WIDTH);    // Writes TX_Address to nRF24L01+
SPI_Write_Buf(WRITE_REG + RX_ADDR_P0, TX_ADDRESS, TX_ADR_WIDTH); // RX_Addr0 same as TX_Adr for Auto.Ack
SPI_Write_Buf(WR_TX_PLOAD, cTxbuf, TX_PLOAD_WIDTH); 			 // Writes data to TX payload

SPI_RW_Reg(WRITE_REG + SETUP_AW, 0x01);      		  			 // Setup of Address Widths: '01' - 3 bytes;'10' - 4 bytes;'11' – 5 bytes
SPI_RW_Reg(WRITE_REG + EN_AA,0x00);      						 // Disable Auto.Ack:Pipe0
SPI_RW_Reg(WRITE_REG + EN_RXADDR,0x01);  						 // Enable Pipe0
SPI_RW_Reg(WRITE_REG + SETUP_RETR,0x00); 						 // Re-Transmit disabled
SPI_RW_Reg(WRITE_REG + RF_CH, 0x38);        				 	 // Select RF channel frequency
SPI_RW_Reg(WRITE_REG + RF_SETUP,0x06);   						 // Datarate:1Mbps; TX_PWR:'000' – -18dBm;'010' – -12dBm;'100' – -6dBm;'110' – 0dBm
SPI_RW_Reg(WRITE_REG + CONFIG,0x0e);     						 // Set PWR_UP bit, enable CRC(2 bytes) & Prim:TX. MAX_RT & TX_DS enabled
nRF24L01_CEH;
DelayUs(10);

} // end of void TX_Mode

I can send and receive data with the software in the said format between two nRF24L01 + modules, unfortunately, of nRF2402G not.

What did I miss? Where is my mistake?

Best Regards

elektroniker54

  • Are you writing anything to the FEATURE register on the nRF24L01+? Are you sure that the nRF2402G is actually sending data? Make sure that the order you write LSB and MSB of the address is correct, try switching them around on the nRF24L01+ to make sure.

    I might have overlooked it, but make sure you set the address width on the nRF24L01+ receiver to 3 bytes as well.

    Copied from the nRF24l01+ product specification:

    > How to setup nRF24L01+ to receive from
    > an nRF2401/nRF2402/nRF24E1/nRF24E2:
    > 1. Use the same CRC configuration as the nRF2401/nRF2402/nRF24E1/nRF24E2.
    > 2. Set the PWR_UP and PRIM_RX bit to 1.
    > 3. Disable auto acknowledgement on the data pipe that is addressed.
    > 4. Use the same address width as the PTX device.
    > 5. Use the same frequency channel as the PTX device.
    > 6. Select data rate 1Mbps or 250kbps on both nRF24L01+ and
    > nRF2401/nRF2402/nRF24E1/ nRF24E2.
    > 7. Set correct payload
    
Related