Dear All:
My NRF24L01+ use Dynamic PayLoad,What register need configure NRF51822?
NRF24L01+ Configuration as follow:
SPI_RW_Reg(WRITE_REG + DYNPD, 0x01);//Enable the dynamic payload length of pipe 0
SPI_RW_Reg(WRITE_REG + FEATURE, 0x04);//Enable the Dynamic Payload Length
SPI_RW_Reg(WRITE_REG + EN_AA, 0x00);//disable auto acknowledgement
how to configure NRF_RADIO->PCNF0 and NRF_RADIO->PCNF1?
i config as follow,but it can't recevice NRF24L01+ data
#define PACKET_S1_FIELD_SIZE (3UL) /< Packet S1 field size in bits. */ #define PACKET_S0_FIELD_SIZE (0UL) /< Packet S0 field size in bits. */ #define PACKET_LENGTH_FIELD_SIZE (6UL) /**< Packet length field size in bits. */
// Packet configuration
NRF_RADIO->PCNF0 = (PACKET_S1_FIELD_SIZE << RADIO_PCNF0_S1LEN_Pos) |
(PACKET_S0_FIELD_SIZE << RADIO_PCNF0_S0LEN_Pos) |
(PACKET_LENGTH_FIELD_SIZE << RADIO_PCNF0_LFLEN_Pos); //lint !e845 "The right argument to operator '|' is certain to be 0"
// Packet configuration
NRF_RADIO->PCNF1 = (RADIO_PCNF1_WHITEEN_Disabled << RADIO_PCNF1_WHITEEN_Pos) |
(RADIO_PCNF1_ENDIAN_Big << RADIO_PCNF1_ENDIAN_Pos) |
(PACKET_BASE_ADDRESS_LENGTH << RADIO_PCNF1_BALEN_Pos);