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

Problem with NRF24L01 and bit RX_DR

Hi,

I'm trying ti communicate two 18F26K22 Pics with NRF24L01. I wrote an library nrf24l01_ix4.h based on the nAN24-12 app note of Nordic. I don't use AutoACK and I set No Retries.

I executed the Trx program and I think it works fine. In fact, I logged the registers and it had the expected values.

[i]========================= = = = Emisor Nrf Ix4 3.10 = = =

Registro: 02, VALOR = 00, DATO = 00 CloseAllPipes: OK Registro: 02, VALOR = 01, DATO = 01 OpenPipe0: OK Registro: 01, VALOR = 00, DATO = 00 DisableAutoACK: OK Registro: 00, VALOR = 0E, DATO = 0E SetCRCMode16bits: OK Registro: 04, VALOR = 00, DATO = 00 DisableAutoRetry: OK Registro: 03, VALOR = 03, DATO = 03 SetAddressWidth: OK SetDeviceTxAddress: OK SetDeviceRxAddressP0: ERROR SetModeTrx: OK Registro: 05, VALOR = 7E, DATO = 7E SetChannel: OK Registro: 06, VALOR = 07, DATO = 07 SetDataRate1Mbit: OK SetMaskIRQ: OK SetPowerUP: OK CONFIG (0x00).......0E EN_AA (0x01)........00 EN_RXADDR (0x02)....01 SETUP_AW (0x03).....03 SETUP_RETR (0x04)...00 RF_CH (0x05)........7E RF_SETUP (0x06).....07 STATUS (0x07).......2E OBSERVE_TX (0x08)...00 CD (0x09)...........00 RX_ADDR_P0 (0x0A)...22:33:44:55:01 RX_ADDR_P1 (0x0B)...C2:C2:C2:C2:C2 RX_ADDR_P2 (0x0C)...C3 RX_ADDR_P3 (0x0D)...C4 RX_ADDR_P4 (0x0E)...C5 RX_ADDR_P5 (0x0F)...C6 TX_ADDR (0x10)...22:33:44:55:01 RX_PW_P0 (0x11).....00 RX_PW_P1 (0x12).....00 RX_PW_P2 (0x13).....00 RX_PW_P3 (0x14).....00 RX_PW_P4 (0x15).....00 RX_PW_P5 (0x16).....00 FIFO_STATUS (0x17)..11 DYNPD (0x1C)........00 FEATURE (0x1D).....00 TX_FIFO (0x17):....01 TX_FIFO (0x17):....11 Enviando paquete.... radioStatus = 01 STATUS = 2E ...Paquete enviado radioStatus = 00 TX_FIFO (0x17):....01 TX_FIFO (0x17):....11 Enviando paquete.... radioStatus = 01 STATUS = 2E ...Paquete enviado

[/i]

I checked the STATUS and TX_FIFO bits on every sending packet and they changed as i expected.

But, in the RCx side, and don't get any packet. In fact, I check the RX_DR bit and doesn't change at all.

I programmed the register of the RCx as follows:

[i]=========================== = = = Receptor Nrf Ix4 3.11 = = =

Registro: 02, VALOR = 00, DATO = 00 CloseAllPipes: OK Registro: 02, VALOR = 07, DATO = 07 OpenPipes0To2: OK Registro: 01, VALOR = 00, DATO = 00 DisableAutoACK: OK Registro: 00, VALOR = 0F, DATO = 0F SetCRCMode16bits: OK Registro: 04, VALOR = 00, DATO = 00 DisableAutoRetry: OK Registro: 03, VALOR = 03, DATO = 03 SetAddressWidth: OK SetDeviceTxAddress: OK SetDeviceRxAddressP0: OK SetDeviceRxAddressP1: OK SetDeviceRxAddressP2: ERROR SetModeRcx: OK Registro: 11, VALOR = 0A, DATO = 0A SetRxPayloadWidthP0: OK Registro: 12, VALOR = 0A, DATO = 0A SetRxPayloadWidthP1: OK Registro: 13, VALOR = 0A, DATO = 0A SetRxPayloadWidthP2: OK Registro: 05, VALOR = 7E, DATO = 7E SetChannel: OK Registro: 06, VALOR = 07, DATO = 07 SetDataRate1Mbit: OK SetPowerUP: OK CONFIG (0x00).......0F EN_AA (0x01)........00 EN_RXADDR (0x02)....07 SETUP_AW (0x03).....03 SETUP_RETR (0x04)...00 RF_CH (0x05)........7E RF_SETUP (0x06).....07 STATUS (0x07).......0E OBSERVE_TX (0x08)...00 CD (0x09)...........00 RX_ADDR_P0 (0x0A)...22:33:44:55:01 RX_ADDR_P1 (0x0B)...22:33:44:55:01 RX_ADDR_P2 (0x0C)...01 RX_ADDR_P3 (0x0D)...C4 RX_ADDR_P4 (0x0E)...C5 RX_ADDR_P5 (0x0F)...C6 TX_ADDR (0x10)...22:33:44:55:01 RX_PW_P0 (0x11).....0A RX_PW_P1 (0x12).....0A RX_PW_P2 (0x13).....0A RX_PW_P3 (0x14).....00 RX_PW_P4 (0x15).....00 RX_PW_P5 (0x16).....00 FIFO_STATUS (0x17)..11 DYNPD (0x1C)........00 FEATURE (0x1D).....00 STATUS = 0E Waiting...FIFO_STATUS = 11 STATUS = 0E [/i]

The STATUS bit always has 0x0E (RX_DR = 0).

Please, can u give an idea what I'm doing wrong?

Thanks in advice and excuse my english.

nrf24l01_ix4.h

  • Hi,

    It seems like you are using the same address on Pipe0 and Pipe1. Also, Pipe2 must have a different value than 01 if the LSB in any other address is 01.

    Please refer to page 40 in the nRF24L01+ Product Specification where it says: "Each pipe can have up to a 5 byte configurable address. Data pipe 0 has a unique 5 byte address. Data pipes 1-5 share the four most significant address bytes. The LSByte must be unique for all six pipes."

    -Jon Gunnar

  • Hi,

    I've changed the address of the pipes but i doesn't receive any packet. Now, the registers of the emitter are as follows:

    ========================= = = = Emisor Nrf Ix4 3.13 = = =

    Registro: 02, VALOR = 00, DATO = 00 CloseAllPipes: OK Registro: 02, VALOR = 07, DATO = 07 OpenPipe0To2: OK Registro: 01, VALOR = 00, DATO = 00 DisableAutoACK: OK Registro: 00, VALOR = 0E, DATO = 0E SetCRCMode16bits: OK Registro: 04, VALOR = 00, DATO = 00 DisableAutoRetry: OK Registro: 03, VALOR = 03, DATO = 03 SetAddressWidth: OK SetDeviceTxAddress: OK SetDeviceRxAddressP0: OK SetDeviceRxAddressP1: OK SetDeviceRxAddressP2: OK Registro: 11, VALOR = 0A, DATO = 0A SetRxPayloadWidthP0: OK Registro: 12, VALOR = 0A, DATO = 0A SetRxPayloadWidthP1: OK Registro: 13, VALOR = 0A, DATO = 0A SetRxPayloadWidthP2: OK SetModeTrx: OK Registro: 05, VALOR = 28, DATO = 28 SetChannel: OK Registro: 06, VALOR = 07, DATO = 07 SetDataRate1Mbit: OK Registro: 00, VALOR = 0E, DATO = 0E SetMaskIRQ: OK SetPowerUP: OK CONFIG (0x00).......0E EN_AA (0x01)........00 EN_RXADDR (0x02)....07 SETUP_AW (0x03).....03 SETUP_RETR (0x04)...00 RF_CH (0x05)........28 RF_SETUP (0x06).....07 STATUS (0x07).......2E OBSERVE_TX (0x08)...00 CD (0x09)...........00 [b]RX_ADDR_P0 (0x0A)...77:66:55:44:33 RX_ADDR_P1 (0x0B)...77:66:55:44:34[/b] RX_ADDR_P2 (0x0C)...35 RX_ADDR_P3 (0x0D)...C4 RX_ADDR_P4 (0x0E)...C5 RX_ADDR_P5 (0x0F)...C6 TX_ADDR (0x10)...55:44:33:22:11 RX_PW_P0 (0x11).....0A RX_PW_P1 (0x12).....0A RX_PW_P2 (0x13).....0A RX_PW_P3 (0x14).....00 RX_PW_P4 (0x15).....00 RX_PW_P5 (0x16).....00 FIFO_STATUS (0x17)..11 DYNPD (0x1C)........00 FEATURE (0x1D).....00

    TX_FIFO (0x17):....01 TX_FIFO (0x17):....11 Sending Packet.... radioStatus = 01 STATUS = 2E ...Packet Sent

    and the Receiver Registers are:

    =========================== = = = Receptor Nrf Ix4 3.12 = = =

    Registro: 02, VALOR = 00, DATO = 00 CloseAllPipes: OK Registro: 02, VALOR = 07, DATO = 07 OpenPipes0To2: OK Registro: 01, VALOR = 00, DATO = 00 DisableAutoACK: OK Registro: 00, VALOR = 0F, DATO = 0F SetCRCMode16bits: OK Registro: 04, VALOR = 00, DATO = 00 DisableAutoRetry: OK Registro: 03, VALOR = 03, DATO = 03 SetAddressWidth: OK SetDeviceTxAddress: OK SetDeviceRxAddressP0: OK SetDeviceRxAddressP1: OK SetDeviceRxAddressP2: OK SetModeRcx: OK Registro: 11, VALOR = 0A, DATO = 0A SetRxPayloadWidthP0: OK Registro: 12, VALOR = 0A, DATO = 0A SetRxPayloadWidthP1: OK Registro: 13, VALOR = 0A, DATO = 0A SetRxPayloadWidthP2: OK Registro: 05, VALOR = 28, DATO = 28 SetChannel: OK Registro: 06, VALOR = 07, DATO = 07 SetDataRate1Mbit: OK SetPowerUP: OK CONFIG (0x00).......0F EN_AA (0x01)........00 EN_RXADDR (0x02)....07 SETUP_AW (0x03).....03 SETUP_RETR (0x04)...00 RF_CH (0x05)........28 RF_SETUP (0x06).....07 STATUS (0x07).......0E OBSERVE_TX (0x08)...00 CD (0x09)...........00 [b]RX_ADDR_P0 (0x0A)...55:44:33:22:11 RX_ADDR_P1 (0x0B)...55:44:33:22:12 RX_ADDR_P2 (0x0C)...13[/b] RX_ADDR_P3 (0x0D)...C4 RX_ADDR_P4 (0x0E)...C5 RX_ADDR_P5 (0x0F)...C6 TX_ADDR (0x10)...55:44:33:22:11 RX_PW_P0 (0x11).....0A RX_PW_P1 (0x12).....0A RX_PW_P2 (0x13).....0A RX_PW_P3 (0x14).....00 RX_PW_P4 (0x15).....00 RX_PW_P5 (0x16).....00 FIFO_STATUS (0x17)..11 DYNPD (0x1C)........00 FEATURE (0x1D).....00 STATUS = 0E Waiting...FIFO_STATUS = 11

    The RX_DR stays off without changing.

Related