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

When can the PACKETPTR register be updated?

I am using the radio in the nRF52832 to support a custom protocol. I would like to send two packets in a row, each with different payloads, on the same frequency. When can I safely update the PACKETPTR register to point to the new packet contents? After the PAYLOAD event or after the END event?

After the PAYLOAD event would be ideal, as this would allow me to use the END->START shortcut, provided I can update the PACKETPTR register in the time it takes to transmit the CRC. The datasheet actually says to wait until after the DISABLED event, but I am hoping that is not the case.

Thanks!

Parents
  • Hi,

    @abkirchhoff : It should be ok to use END for RX as well as TX, as long as we have a CRC > 0 byte. If the CRC is 0 byte I do not think we can guarantee that the last byte received at END is moved to RAM before the END event has reached to the CPU. I assume that the PS has written DISABLED to make it simple and safe keeping BLE in mind and forgot that RADIO does not need to be disabled for every transaction.

    @Martijn: The PACKETPTR is latched (double buffered) on START task, i.e. the EasyDMA stores a copy of the register on START. So you were right, we can update it any number of times before TASK_START and value at the time of START task will be latched to be used by EasyDMA.

Reply
  • Hi,

    @abkirchhoff : It should be ok to use END for RX as well as TX, as long as we have a CRC > 0 byte. If the CRC is 0 byte I do not think we can guarantee that the last byte received at END is moved to RAM before the END event has reached to the CPU. I assume that the PS has written DISABLED to make it simple and safe keeping BLE in mind and forgot that RADIO does not need to be disabled for every transaction.

    @Martijn: The PACKETPTR is latched (double buffered) on START task, i.e. the EasyDMA stores a copy of the register on START. So you were right, we can update it any number of times before TASK_START and value at the time of START task will be latched to be used by EasyDMA.

Children
Related