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.