UG-549
ADuCM310 Hardware Reference Manual
Rev. C | Page 174 of 192
Interrupts/Wake-Up Signals
An interrupt is generated when the counter value corresponds to any of the compare points or full scale in free running mode. The timer
continues counting or is reset to zero.
The wake-up timer generates five maskable interrupts. They are enabled in the T4IEN register. Interrupts can be cleared by setting the
corresponding bit in the T4CLRI register.
Note that it takes two 32 kHz clock cycles for the interrupt clear to take effect when the 32 kHz internal oscillator is used.
Ensure that the register write has fully completed before returning from the interrupt handler. Use the data synchronization barrier (DSB)
instruction if necessary. The following is a code example showing how to implement the DSB ARM Cortex-M3 instruction in a C program.
void Ext_Int4_Handler ()
{
EiClr(EXTINT4);
__DSB();
}
During that time, the device must not be placed in any of the power-down modes. IRQCRY (T4STA[6]) indicates when the device can be
placed in power-down mode.
The timer is stopped and reset when clearing the timer enable bit in the T4CON register (T4CON[7]).
REGISTER SUMMARY: WAKE-UP TIMER
Table 253. Wake-Up Timer Register Summary
Address
Name
Description
Reset
Access
0x40002500
T4VAL0
Current count value—least significant 16 bits
0x0000
R
0x40002504
T4VAL1
Current count value—most significant 16 bits
0x0000
R
0x40002508
T4CON
Control register
0x0040
RW
0x4000250C
T4INC
12-bit interval for Wake-Up Field A
0x00C8
RW
0x40002510
T4WUFB0
Wake-Up Field B—least significant 16 bits
0x1FFF
RW
0x40002514
T4WUFB1
Wake-Up Field B—most significant 16 bits
0x0000
RW
0x40002518
T4WUFC0
Wake-Up Field C—least significant 16 bits
0x2FFF
RW
0x4000251C
T4WUFC1
Wake-Up Field C—most significant 16 bits
0x0000
RW
0x40002520
T4WUFD0
Wake-Up Field D—least significant 16 bits
0x3FFF
RW
0x40002524
T4WUFD1
Wake-Up Field D—most significant 16 bits
0x0000
RW
0x40002528
T4IEN
Interrupt enable register
0x0000
RW
0x4000252C
T4STA
Status register
0x0000
R
0x40002530
T4CLRI
Clear interrupt register
0x0000
W
0x4000253C
T4WUFA0
Wake-Up Field A—least significant 16 bits
0x1900
R
0x40002540
T4WUFA1
Wake-Up Field A—most significant 16 bits
0x0000
R
REGISTER DETAILS: WAKE-UP TIMER
Current Count Value—Least Significant 16 Bits Register
Address: 0x40002500, Reset: 0x0000, Name: T4VAL0
Table 254. Bit Descriptions for T4VAL0
Bits
Bit Name
Description
Reset
Access
[15:0]
T4VALL
Current count low. Least significant 16 bits of current count value.
0x0
R
Current Count Value—Most Significant 16 Bits Register
Address: 0x40002504, Reset: 0x0000, Name: T4VAL1
Table 255. Bit Descriptions for T4VAL1
Bits
Bit Name
Description
Reset
Access
[15:0]
T4VALH
Current count high. Most significant 16 bits of current count value.
0x0
R