6 dma timer counters (dtcnn), 3 functional description, 1 prescaler – Motorola ColdFire MCF5281 User Manual
Page 400: 2 capture mode, 3 reference compare, 6 dma timer counters (dtcn, 3 functional description -8, 6 dma timer counters (dtcn n )
DMA Timers (DTIM0–DTIM3)
21-8
Freescale Semiconductor
21.2.6
DMA Timer Counters (DTCNn)
The current value of the 32-bit timer counter can be read at anytime without affecting counting. Writes to
DTCNn clear the timer counter. The timer counter increments on the clock source rising edge (internal bus
clock divided by 1, internal bus clock divided by 16, or DTINn).
21.3
Functional Description
21.3.1
Prescaler
The prescaler clock input is selected from the internal bus clock (f
sys
divided by 1 or 16) or from the
corresponding timer input, DTINn. DTINn is synchronized to the internal bus clock, and the
synchronization delay is between two and three internal bus clocks. The corresponding DTMRn[CLK]
selects the clock input source. A programmable prescaler divides the clock input by values from 1 to 256.
The prescaler output is an input to the 32-bit counter, DTCNn.
21.3.2
Capture Mode
Each DMA timer has a 32-bit timer capture register (DTCRn) that latches the counter value when the
corresponding input capture edge detector senses a defined DTINn transition. The capture edge bits
(DTMRn[CE]) select the type of transition that triggers the capture and sets the timer event register capture
event bit, DTERn[CAP]. If DTERn[CAP] and DTXMRn[DMAEN] are set, a DMA request is asserted. If
DTERn[CAP] is set and DTXMRn[DMAEN] is cleared, an interrupt is asserted.
21.3.3
Reference Compare
Each DMA timer can be configured to count up to a reference value. If the reference value is met,
DTERn[REF] is set.
•
If DTMRn[ORRI] is set and DTXMRn[DMAEN] is cleared, an interrupt is asserted.
•
If DTMRn[ORRI] and DTXMRn[DMAEN] are set, a DMA request is asserted.
IPSBAR
Offset:
0x00_040C
(
DTCN0
)
0x00_044C
(
DTCN1
)
0x00_048C
(
DTCN2
)
0x00_04CC
(
DTCN3
)
Access: User read/write
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10
9
8
7
6
5
4
3
2
1
0
R
CNT (32-bit timer counter value count)
W
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Figure 21-7. DMA Timer Counters (DTCNn)
Table 21-7. DTCNn Field Descriptions
Field
Description
31–0
CNT
Timer counter. Can be read at anytime without affecting counting and any write to this field clears it.
MCF5282 and MCF5216 ColdFire Microcontroller User’s Manual, Rev. 3