ADuCM320 Hardware Reference Manual
UG-498
Rev. C | Page 171 of 196
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 0.
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 part should 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]).