SPRUI30H November 2015 – May 2024 DRA745 , DRA746 , DRA750 , DRA756
The EDMA_TPCC is responsible for generating transfer completion interrupts to the CPU(s) (and other EDMA masters). The EDMA generates a single completion interrupt per shadow region, as well as one for the global region on behalf of all 64 channels. The various control registers and bit fields facilitate EDMA interrupt generation.
The software architecture must either use the global interrupt or the shadow interrupts, but not both.
The transfer completion code EDMA_TPCC_OPT_n[17:12] TCC value is directly mapped to the bits of the interrupt pending register EDMA_TPCC_IPR / EDMA_TPCC_IPRH.
For example, if EDMA_TPCC_OPT_n[17:12] TCC = 10 0001b, EDMA_TPCC_IPRH[1] is set after transfer completion, and results in interrupt generation to the CPU(s) if the completion interrupt is enabled for the CPU. See Section 16.2.4.9.1.1 Enabling Transfer Completion Interrupts for details about enabling EDMA transfer completion interrupts.
When a completion code is returned (as a result of early or normal completions), the corresponding bit in EDMA_TPCC_IPR / EDMA_TPCC_IPRH registers is set if transfer completion interrupt (final/intermediate) is enabled in the channel options parameter (OPT) for a PaRAM set associated with the transfer.
TCC values in EDMA_TPCC_OPT_n[17:12] TCC (EDMA_TPCC_OPT_n[20] TCINTEN / EDMA_TPCC_OPT_n[21] ITCINTEN = 1) | EDMA_TPCC_IPR Bit Set | TCC values in EDMA_TPCC_OPT_n[17:12] TCC (EDMA_TPCC_OPT_n[20] TCINTEN / EDMA_TPCC_OPT_n[21] ITCINTEN = 1) | EDMA_TPCC_IPRH Bit Set(1) |
---|---|---|---|
0 | EDMA_TPCC_IPR[0] | 20h | EDMA_TPCC_IPR[32] / EDMA_TPCC_IPRH[0] |
1 | EDMA_TPCC_IPR[1] | 21h | EDMA_TPCC_IPR[33] / EDMA_TPCC_IPRH[1] |
2h | EDMA_TPCC_IPR[2] | 22h | EDMA_TPCC_IPR[34] / EDMA_TPCC_IPRH[2] |
3h | EDMA_TPCC_IPR[3] | 23h | EDMA_TPCC_IPR[35] / EDMA_TPCC_IPRH[3] |
4h | EDMA_TPCC_IPR[4] | 24h | EDMA_TPCC_IPR[36] / EDMA_TPCC_IPRH[4] |
... | ... | ... | ... |
1Eh | EDMA_TPCC_IPR[30] | 3Eh | EDMA_TPCC_IPR[62] / EDMA_TPCC_IPRH[30] |
1Fh | EDMA_TPCC_IPR[31] | 3Fh | EDMA_TPCC_IPR[63] / EDMA_TPCC_IPRH[31] |
The transfer completion code (TCC) can program to any value for a DMA/QDMA channel. A direct relation between the channel number and the transfer completion code value does not need to exist. This allows multiple channels having the same transfer completion code value to cause a CPU to execute the same interrupt service routine (ISR) for different channels.
If the channel is used in the context of a shadow region and it intends for the shadow region interrupt to be asserted, then ensure that the bit corresponding to the TCC code is enabled in EDMA_TPCC_IER / EDMA_TPCC_IERH and in the corresponding shadow region's DMA region access registers (EDMA_TPCC_DRAEM_k / EDMA_TPCC_DRAEHM_k).
Interrupt generation can be enabled at either final transfer completion or intermediate transfer completion, or both. Consider channel m as an example.
Table 16-69 shows the number of interrupts that occur in different synchronized scenarios. Consider channel 31, programmed with ABCNT_n[15:0] ACNT = 3, EDMA_TPCC_ABCNT_n[31:16] BCNT = 4, EDMA_TPCC_CCNT_n[15:0]CCNT = 5, and EDMA_TPCC_OPT_n[17:12] TCC = 30.
Options | A-Synchronized | AB-Synchronized |
---|---|---|
EDMA_TPCC_OPT_n[20] TCINTEN = 1, EDMA_TPCC_OPT_n[21] ITCINTEN = 0 | 1 (Last TR) | 1 (Last TR) |
EDMA_TPCC_OPT_n[20] TCINTEN = 0, EDMA_TPCC_OPT_n[21] ITCINTEN = 1 | 19 (All but the last TR) | 4 (All but the last TR) |
EDMA_TPCC_OPT_n[20] TCINTEN = 1, EDMA_TPCC_OPT_n[21] ITCINTEN = 1 | 20 (All TRs) | 5 (All TRs) |