Hi,
I want to use 51822 to communication with 24l01,the 24l01 module is transmit temperature data, the 51822 is used to read the data from the 24l01.I set the parameters of the communication as follows:
In the 24l01p, they all work in the radio module.the address is:
addrofch[0] = 0xe7;
addrofch[1] = 0x7e;
addrofch[2] = 0xe3;
addrofch[3] = 0x0;
addrofch[4] = 0x0;
the transfer data is 8 bytes long, the rate is 1M ,the power is 0dbm,the CRC is 2 Bytes.the frequncy is 9.
In the 51822,I set the same parameters as follows.
NRF_RADIO->TXPOWER = (RADIO_TXPOWER_TXPOWER_0dBm << RADIO_TXPOWER_TXPOWER_Pos);
NRF_RADIO->FREQUENCY = 9UL;
NRF_RADIO->MODE = (RADIO_MODE_MODE_Nrf_1Mbit << RADIO_MODE_MODE_Pos);
NRF_RADIO->PREFIX0 =
((uint32_t)swap_bits(0xC3) << 24)
| ((uint32_t)swap_bits(0xC2) << 16)
| ((uint32_t)swap_bits(0xC1) << 8)
| ((uint32_t)swap_bits(0xE7) << 0);
NRF_RADIO->PREFIX1 =
((uint32_t)swap_bits(0xC7) << 24)
| ((uint32_t)swap_bits(0xC6) << 16)
| ((uint32_t)swap_bits(0xC4) << 0);
NRF_RADIO->BASE0 = bytewise_bitswap(0x7ee30000UL);
NRF_RADIO->BASE1 = bytewise_bitswap(0x89ABCDEFUL);
Now ,I configure the same address, the 51822 can receive data and the data can be output by UART. However,there is still a problem confused me,in the 51822 ,I set like this:
if (NRF_RADIO->CRCSTATUS == 1U)
{ nrf_gpio_pin_set(11);
for(i=0;i<8;i++)
{
rbuf[i]=packet[i];
}
simple_uart_putstring(rbuf);
}
I find that,in the whole progress, the NRF_RADIO->CRCSTATUS==0 all the time.why the CRCSTATUS==0?If they can communicate, the CRCSTATUS==1 is right, is it ture?
please give me an explanation, thank you!