Chengdu Ebyte Electronic Technology Co.,Ltd. E73-TBX User Manual
Copyright ©2012–2019
,
Chengdu Ebyte Electronic Technology Co.,Ltd.
27
3)
Timing/counting mode selection. Used to configure whether TIMER works in timer mode or counter mode.
4)
Timing/counter digits. 8-bit, 16-bit, 24-bit, 32-bit selectable.
5)
CC[n] register. CC is an abbreviation for capture and comparison. There’s 6 CC registers. When the CAPUTURE TASK
is executed, the current internal counter value is immediately copied to the CC register.
6)
Tasks, events, etc.
TIMER has two modes of operation: timing mode and counting mode. When in timing mode, we call it a timer. When in
the counting mode, we call it a counter. Both modes can be started with the START task and stopped with the STOP task.
The timer after stopped by the STOP task can be started by re-executing the START task. When TIMER is in timed mode,
the TIMER internal counter counts once every pulse of the FTIMER clock. The frequency of the FTIMER clock can be
calculated as follows:
The corresponding COMPARE[n] event is triggered when the value of the internal counter is equal to the value set
in CC[n] (n=1-5). If we enable the interrupt, an interrupt will be generated.
When TIMER is in count mode, the TIMER internal counter counts once every pulse on the COUNT pin.
tasks:
1)
START: Start timing/counter
2)
STOP: stop timing / counter
3)
SHUTDOWN: The timer/counter is powered down, and cannot be started by START unless reset.
Notice:
1)
Timers/counters can only be configured when they have been stopped, otherwise unpredictable consequences
can be resulted in.
2)
When in timed mode, if <=1MHZ, for power saving, the timer will automatically acquire the count pulse from
the PCLK1M clock source instead of the PCLK16M clock source.