7 Timers
69
CW6632B Bluetooth 3.0 Audio Player SOC
Version 1.0.0
Copyright ©2015, www.appotech.com. All Rights Reserved.
110 = Timer3 counts at every 64 counting source events
111 = Timer3 counts at every 128 counting source events
Register 7-16 TMR3CNT
– Timer3 Counter
Position
7
6
5
4
3
2
1
0
Name
T3CNT
Default
0
0
0
0
0
0
0
0
Access
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Note
: Timer3 will increase in proper condition while it is enabled. It overflows when TMR3CNT = TMR3PR,
TMR3
CNT will be clear to 0x00 when overflow occurs, and the interrupt flag will be set „1‟ by hardware.
Register 7-17 TMR3PR
– Timer3 Period
Position
7
6
5
4
3
2
1
0
Name
TMR3PR
Default
1
1
1
1
1
1
1
1
Access
WO
WO
WO
WO
WO
WO
WO
WO
Note:
The overflow period of the timer is: Tinc-source * T3PSR * (T3PR + 1).
Register 7-18 TMR3PWM
– Timer3 PWM duty
Position
7
6
5
4
3
2
1
0
Name
TMR3PWM
Default
x
x
x
x
x
x
x
x
Access
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Note:
TMR3PWM is reserved in timer/counter mode. In PWM mode, it is used as duty cycle setting. In capture
mode, the value of TMR3CNT will be captured to TMR3PWM when selected event occurs.
7.5
Watchdog Timer (WDT)
The Watchdog Timer (WDT) logic consists of a 20bit Watchdog Timer. The Watchdog Timer is clocked by internal
RC oscillator running at 32 KHz. When device resets, the WDT is disabled and user should enable the WDT if it is
needed.
In the default configuration, WDT overflows in 2ms. The
application program needs to write a „1‟ into WDTCON [5] at
least once 2 ms to prevent WDT time out. The lower 3 bits of the WDTCON register control the selection of overflow
time period.
7.5.1
Watchdog Wake up
WDT can be used to wake up CW6632B from Idle, Hold or Sleep mode. RSTEN bit (WDTCON [3]) is used to
determine the actions after WDT wake up. When RSTEN sets to 0, the watchdog will generate a non-reset wake up
after counter overflows. And When RSTEN sets to 1, the watchdog will wake up CW6632B by resetting the whole
chip. After non-reset wake up CW6632B will continue to execute next instruction.
During Idle mode, CW6632B can be wake up by WDT with interrupt or reset.
During Hold mode, CW6632B can be wakeup by WDT with interrupt or reset or just continue to execute the