This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF51x22, Rx determine payload length

We start to migrate our equipment from nrf14L01 receiver to nrf51422 receiver in order to serve more equipment. I am using nrf51822 to receive propietary protocols from heart beat monitors using normal shock burst protocols (not extended shockburst). I am following the examples in main_rx.c found in c:\Nordic Semiconductor\nRF51 SDK_v5.2.0.39364\Nordic\nrf51422\Board\nrf6310\radio_example
When: // Write received data to port 1 on CRC match. if (NRF_RADIO->CRCSTATUS == 1U) { nrf_gpio_port_write(NRF_GPIO_PORT_SELECT_PORT1, packet[0]);

How much bytes are available in packet[]?

The nrf24L01 had a register information RX_PW_P0 to tell how many bytes received.

Regards, Adib.

  • hm, I assume that in the example there are fixed length protocols defined.

    if the S0, Length and S1 segments are 0-size, then in the protocol there is no size information. I assume RADIO_PCNF1_MAXLEN is then for sending and RADIO_PCNF1_STATLEN is for receiving?

    Am I right? But how does this work for variable sized protocols?

    Regards, Adib.

Related