SWCU192 November 2021 CC1312R7 , CC1352P7 , CC2652P7 , CC2652R7
To stop a DMA transfer and abort the operation, the host disables a channel using the DMACHnCTL registers. When the EN bit of this register is set to 0, no new DMA transfer is requested by this channel and the current active transfer is finished. Alternatively, all active channels can be stopped by activating the DMAC soft reset with the DMASWRESET register.
When stopping the DMAC, the host must stop all active channels.
The state of the DMAC channel must be checked using the DMASTAT register. When the CHx_ACTIVE bit of this register for the disabled channel is set to 0, the DMAC channel stops.
To stop the DMAC in combination with the AES engine, the AES engine must be set in idle mode first, which is done by writing zeroes to the length registers, followed by disabling all modes in the AESCTL register.
Stopping the DMAC channels might leave the master control module in an unfinished state, due to pending events from the engines that will never occur. Therefore, to correctly recover the engine, the SWRESET register must issue the master control soft reset after all active DMAC channels are stopped.