When CCM decrypts a packet on-the-fly while RADIO is receiving it, CCM must read the encrypted packet from the same memory location that RADIO is writing to.
The pointer INPTR in CCM must therefore point to the same memory location as the PACKETPTR pointer in RADIO.
In order to match RADIO's timing, the KSGEN task must be triggered early enough to allow the keystream generation to complete before the decryption of the packet starts.
For short packets (MODE.LENGTH = Default), the KSGEN task must be triggered no later than when the START task in RADIO is triggered. In addition, the CRYPT task must not be triggered earlier than when the ADDRESS event is generated by RADIO. If the CRYPT task is triggered exactly at the same time as the ADDRESS event is generated by RADIO, CCM will guarantee that the decryption is completed no later than when the END event in RADIO is generated. This use case, using a PPI connection between the ADDRESS event in RADIO and the CRYPT task in CCM, is illustrated in figure below.
The KSGEN task is triggered from the READY event in RADIO, through a PPI connection.
For long packets (MODE.LENGTH = Extended) the keystream generation will need to start even earlier, such as when the RXEN task in RADIO is triggered.
Refer to Timing specification for information about the time needed for generating a keystream.