Hi,
I want to communicate with a legacy device nrf24l01p+ based using a nrf52840 DK.
Firmware of legacy device setup the card in this way:
uint8_t rx_address[5] = {0xc7, 0xa6, 0x37, 0xc7, 0xa6};
nRF24L01P_disableAutoAcknowledge();
nRF24L01P_disableAutoRetransmit();
nRF24L01P_setRfOutputPower(NRF24L01P_TX_DEFAULT_PWR);
nRF24L01P_setRfFrequency(2446);
nRF24L01P_setAirDataRate(1000);
nRF24L01P_setCrcWidth(16);
nRF24L01P_setTxAddress(rx_address, 5);
nRF24L01P_setRxAddress(rx_address, 5, 0);
nRF24L01P_setAddressNull();
nRF24L01P_setTransferSize(13, 0);
I take the esb_ptx esample from nrf52 SDK and I change setup in this way:
uint8_t base_addr_0[4] = {0xa6, 0x37, 0xc7, 0xa6};
uint8_t base_addr_1[4] = {0xa6, 0x37, 0xc7, 0xa6};
uint8_t addr_prefix[8] = {0xc7, 0xc2, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5};
nrf_esb_config_t nrf_esb_config = NRF_ESB_LEGACY_CONFIG;
nrf_esb_config.protocol = NRF_ESB_PROTOCOL_ESB;
nrf_esb_config.bitrate = NRF_ESB_BITRATE_1MBPS;
nrf_esb_config.mode = NRF_ESB_MODE_PTX;
nrf_esb_config.event_handler = nrf_esb_event_handler;
nrf_esb_config.selective_auto_ack = true;
nrf_esb_config.payload_length = 13;
nrf_esb_config.crc = NRF_ESB_CRC_16BIT;
nrf_esb_init(&nrf_esb_config);
nrf_esb_set_rf_channel(46);
nrf_esb_set_address_length(5);
nrf_esb_set_base_address_0(base_addr_0);
nrf_esb_set_base_address_1(base_addr_1);
nrf_esb_set_prefixes(addr_prefix, 1);
But it doesn't work. Can you help me?