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 Martijn,

    This is what is written in PS If the PACKETPTR is not pointing to the Data RAM region, an EasyDMA transfer may result in a HardFault or RAM corruption.

    So it may or may not result in hardfault and the test is not very reliable way to test what you are saying. Also when the engineers have specially written specially that we should wait for DISABLED event, then I am sure they must have some concerns or possible race conditions that could happen if we do not do so. It is possible that the way you update PACKETPTR works for you in your use case possibly because of the size of smaller payload? or maybe because of other factors. But the question what do you gain by updating the PACKETPTR earlier than what I am recommending? Does it result in better throughput?

Reply
  • Hi Martijn,

    This is what is written in PS If the PACKETPTR is not pointing to the Data RAM region, an EasyDMA transfer may result in a HardFault or RAM corruption.

    So it may or may not result in hardfault and the test is not very reliable way to test what you are saying. Also when the engineers have specially written specially that we should wait for DISABLED event, then I am sure they must have some concerns or possible race conditions that could happen if we do not do so. It is possible that the way you update PACKETPTR works for you in your use case possibly because of the size of smaller payload? or maybe because of other factors. But the question what do you gain by updating the PACKETPTR earlier than what I am recommending? Does it result in better throughput?

Children
No Data
Related