
CMT2380F17
Rev0.1 | 60/347
www.cmostek.com
For examples on transfer count initial,
A
.
If DMA transfer size is 65536, the {TH5 + TL5} will be programmed to 0000H.
B
.
If DMA transfer size is 1, the {TH5 + TL5} will be written by FFFFH.
The Current Address implemented on {TH6 + TL6} register points the memory address for DMA access on
XRAM. Based on {TH6 + TL6} up counting function, the addresses generated will be increased. There is a
Base Address located on {THR6 + TLR6}. Each event on
“
End of DMA transfer” will reload the {THR6+ TLR6}
to {TH6 + TL6} to initialize the new Current Address for next DMA transfer. The Current Address covers the
entire XRAM memory space.
8.2.4
Start a DMA Transfer
It is an easy handling DMA controller in CMT2380F17.To starting a DMA transfer, software must issue the
following sequence to construct a DMA operation:
1. Configure DMADS0 to determine the DMA transfer type and DMA data path on source and
destination.
2. Configure DMA interrupt and its interrupt priority.
3. Configure the Current Transfer Count and Base Transfer Count
4. Configure the Current Address and Base Address if XRAM accessed by DMA is necessary
5. Configure the peripheral to ready state
6. Set DMAE0 to enable DMA FSM
7. Configure DMA trigger source and trigger DMA to start operation
-- If select software trigger, software sets DMAS0 to start DMA
-- If select external trigger, wait external active signal to start DMA
8. Software waits DMA Complete Flag (DCF0) that indicates the DMA transfer finished
9. Write 0 on DMAE0 to end DMA operation and configure DMADS0 to disable state.
。
In DMA external trigger operation, the external active signal will set DMAS0 automatically. Both of
internal and external trigger, the DMAS0 will be cleared automatically when DMA transfer is finished, End of
DMA transfer.
8.2.5
Suspend or Stop DMA Transfer
A DMA transaction can be suspended during the transfer (after DMAS0 set) by writing 0 on DMAS0. If the
channel is suspended when a DMA data transaction is ongoing, the channel is effectively disabled only once
the current data transaction is completed. Re-enabling the DMAS0 resumes the DMA transfer.
Software can write “0” on DMAE0 to stop current DMA transfer at any time or to end the DMA transfer
after End of DMA transfer. It is recommended software must also configure data path (DMADS0) to disable
state and clear DMAS0.
8.2.6
DMA Interrupt
DCF0 is set in any transfer mode or transfer type, when the corresponding Current Transfer Count
register {TH5 + TL5} counts to overflow. If the corresponding DIE0 and EDMA (IE.6) are set, a DMA interrupt
request is generated.
If the DMA function is disabled, the Timer 5 and Timer 6 of DMA module can be a general 16-bit timer.
Each timer has its own timer flag, TF5 and TF6 with corresponding interrupt enable bit. They share the DMA
interrupt with DAM complete flag. The following diagram shows the DMA interrupt architecture. If software
Содержание CMT2380F17
Страница 27: ...CMT2380F17 Rev0 1 27 347 www cmostek com 1 25 Phase Noise...
Страница 111: ...CMT2380F17 Rev0 1 111 347 www cmostek com INT2IS 1 0 Selected Port Pin of nINT2 00 P4 4 01 P3 0 10 P1 1 11 P1 6...
Страница 131: ...CMT2380F17 Rev0 1 131 347 www cmostek com Figure 16 1 Timer 0 Mode 0 Structure Figure15 2 Timer 1 Mode 0 Structure...
Страница 161: ...CMT2380F17 Rev0 1 161 347 www cmostek com Figure 16 32 Split Timer 3 Mode 1 Structure AR with Ex INT...
Страница 177: ...CMT2380F17 Rev0 1 177 347 www cmostek com Figure 17 3 PCA Interrupt System...
Страница 239: ...CMT2380F17 Rev0 1 239 347 www cmostek com Figure 19 5 8 bit Timer Mode Configuration for S1BRG S1TME 1...
Страница 246: ...CMT2380F17 Rev0 1 246 347 www cmostek com SnMIPS S0MI S1MI 1 P3 3 P4 7...
Страница 289: ...CMT2380F17 Rev0 1 289 347 www cmostek com...