Hi
I am new to the NRF52840. I am trying to receive data from nrf24L01+ to the nrf52840 Development kit. I find some examples from the SDK radio receiver using PCAl0056. I think I need to match the transmitter address and receiver address and rf channel for receiving some packets. I find from the tutorial with base and prefix adddress. But I couldn't understand how I will add that in the program. my Nrf24l01+ is working in tx mode with address
unsigned char rxAddress[5] = { 0xA7, 0x5B, 0xCD, 0x14, 0x15 };
unsigned char txAddress[5] = { 0xA7, 0x5B, 0xCD, 0x14, 0x15 };
unsigned char nRFReceiveBuffer[32];
char InitializeNRF_1 (nrf24l01_dev* dev)
{
dev->BUSY_FLAG = 0;
dev->ADDR_WIDTH = NRF_ADDR_WIDTH_3;
dev->CRC_WIDTH = NRF_CRC_WIDTH_1B;
dev->DATA_RATE = NRF_DATA_RATE_250KBPS;
dev->NRF_CE_GPIO_PIN = GPIO_PIN_8;
dev->NRF_CE_GPIOx = GPIOA;
dev->NRF_CSN_GPIO_PIN = GPIO_PIN_4;
dev->NRF_CSN_GPIOx = GPIOA;
dev->NRF_IRQ_GPIO_PIN = GPIO_PIN_0;
dev->NRF_IRQ_GPIOx = GPIOA;
dev->NRF_IRQ_preempt_priority = 0;
dev->NRF_IRQ_sub_priority = 0;
dev->NRF_IRQn = EXTI0_1_IRQn;
dev->PayloadLength = 32;
dev->RetransmitCount = 0;
dev->RetransmitDelay = 0;
dev->RF_CHANNEL = 100;
dev->RX_ADDRESS = rxAddress;
dev->RX_BUFFER = nRFReceiveBuffer;
dev->spi = &spi;
dev->STATE = NRF_STATE_TX;
dev->TX_ADDRESS = txAddress;
dev->TX_BUFFER = (uint8_t*)cipherText;
dev->TX_POWER = NRF_TX_PWR_0dBm;
dev->RX_BUFFER_BYTE_COUNT = 0;
if (NRF_Init(dev) == NRF_OK)
return 1;
else
return 0;
}
Could you please help me to explain it little bit breifly?