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

radio length field, and actual number of received bytes

Hi all

I am developing a proprietary radio protocol application using the nRF52805. I am not using a softdevice. Instead, this is all done by accessing the radio registers directly. This is not a BLE application.

Briefly, the application involves one Central device and up to 4 Peripheral devices. The Central only communicates with only one Peripheral at any given time. For testing purposes each Peripheral sends a fixed number of bytes to the Central when it is requested to do so. The bytes within this packet increment by one from one byte to the next so I can verify that 

a. I am receiving the correct amount of bytes

b. The count sequence within that byte packet is not corrupted.

During my development I have noticed that once in a while one of the Peripherals will send a short packet, i.e. I do not receive the correct amount of bytes. I can detect this and raise a flag. However, in the real life application the bytes can be any value.

Here are my questions:

1. After the radio has received the packet, does it update the LENGTH field to reflect the ACTUAL number of bytes received, or does it simply echo the value that was sent by the Peripheral?

2. For other peripherals like the SPI, it is possible to determine how many bytes the EasyDMA actually wrote to the RAM buffer by checking the MYPERIPHERAL->WRITER.AMOUNT value. When the radio uses the DMA there does not seem to be such an AMOUNT register that can be checked. Is there any other register that reflects how many bytes were ACTUALLY written to RAM?

Thanks in advance for your help and your time.

Sincerely

Rob

Parents Reply Children
No Data
Related