SWCU194 March 2023 CC1314R10 , CC1354P10 , CC1354R10 , CC2674P10 , CC2674R10
A CCM operation can be interrupted during the AAD and crypto data processing phase at 128-bit aligned boundaries and the Host can store the intermediate processing state of the engine. The data to be stored for this consists of the intermediate IV, the TAG value, the internal block counter and for the situations where the AAD phase is interrupted also the AES-CCM alignment information need to be stored. The keys and mode settings are also part of the state, but these are not changed during operation.
To request the interruption of a CCM operation the ‘get_digest’ bit has to be set in the CRYPTO:AESCTL register, after writing the last data word of a 128-bit aligned crypto data part.
To continue a CCM operation that was previously interrupted, the intermediate processing state has to be restored:
The intermediate IV must be written to the AESIVn registers.
The intermediate TAG must be written to the AESKEY3_n registers (TAG accumulation is internally done in the AESKEY3_n registers).
The intermediate block counter value must be written to the AESBLKCNTn registers.
For AAD continuation, the AES-CCM alignment information must be written to the CRYPTO:AESCCMALNWRD register.
The static part of the context, such as the AES keys, length registers and mode for the operation must also be loaded with their original values to ensure correct continuation. When writing the mode, make sure that the CRYPTO:AESCTL.GCM_CCM_CONTINUE bit and, depending on the data phase to continue from, the CRYPTO:AESCTLG.CM_CCM_CONTINUE_AAD bit are set to notify the engine it has to continue processing from the loaded state.