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

Does the nrf52 radio EasyDMA write a bit or byte at a time to PACKETPTR?

Hello:

Does the nrf52 radio peripheral EasyDMA write to PACKETPTR on byte boundaries or does it write "bits"? Suppose I have the ADDRESS_BCSTART shortcut enabled and the radio is all set up to receive. Lets say I have the BCC set to 4 (4 bits). Upon receiving 4 bits I should get the BCMATCH event. At this point, can I read the first byte of the RAM where PACKETPTR is pointing or do I need to wait until a whole byte is received? I presume I can read the RAM where PACKETPTR is pointing during reception of a frame.

One other question: assume I have started BCSTART (shortcut ADDRESS_BCSTART was set) and the radio is receiving a packet. Assume that when the reception started the bit counter was programmed to some large value (say 2048 bits). After receiving 100 bits I go ahead and set BCC to 48. Will this generate the BCMATCH event immediately or not at all? Asssume that the packet length is much greater than 100 bits (in case that matters).

Thanks!

  • Sorry for the late answer.

    The DMA transfers are full bytes only. There is normally a delay between an event recognized inside the hardware and actions taken for it. Those delays are not constants and differ for every event. Regarding to any event that is related to EasyDMA, there is no guarentee that something is complete unless you get DISABLED event.

    quote from PS "The DISABLED event indicates that the EasyDMA has finished accessing the RAM"

    So even you get a BCMATCH does not mean that the data is ready in RAM, you need to wait for DISABLED event.

    UPDATE 09.03.2016

    There has been interesting discussion with abkirchhoff and Martijn and the conclusion there are more definitive after contacting the engineers who designed it. As long as CRC > 0 , END event should be enough to make sure that the EasyDMA has finished accessing the RAM.

Related