15 16-BIT PWM TIMER (T16A5)
15-8
Seiko Epson Corporation
S1C33L26 TECHNICAL MANUAL
A T16A5 channel outputs a single interrupt signal shared by the above interrupt causes to the interrupt controller
(ITC). Read the interrupt flags in the T16A5 module to identify the interrupt cause that has been occurred.
Interrupts in comparator mode
Compare A interrupt
This interrupt request is generated when the counter matches the compare A register value during counting
in comparator mode. It sets the interrupt flag CAIF/T16A_IFLG
x
register in the T16A5 module to 1.
To use this interrupt, set CAIE/T16A_IEN
x
register to 1. If CAIE is set to 0 (default), interrupt requests for
this cause is not sent to the ITC.
Compare B interrupt
This interrupt request is generated when the counter matches the compare B register value during counting
in comparator mode. It sets the interrupt flag CBIF/T16A_IFLG
x
register in the T16A5 module to 1.
To use this interrupt, set CBIE/T16A_IEN
x
register to 1. If CBIE is set to 0 (default), interrupt requests for
this cause is not sent to the ITC.
Note: The intervals of the compare A and compare B interrupts must be four or more count clock cycles.
Otherwise, the second interrupt will be omitted by T16A5.
Interrupts in capture mode
Capture A interrupt
This interrupt request is generated when the counter value is captured in the capture A register by an exter-
nal trigger during counting in capture mode. It sets the interrupt flag CAPAIF/T16A_IFLG
x
register in the
T16A5 module to 1.
To use this interrupt, set CAPAIE/T16A_IEN
x
register to 1. If CAPAIE is set to 0 (default), interrupt re-
quests for this cause is not sent to the ITC.
Capture B interrupt
This interrupt request is generated when the counter value is captured in the capture B register by an exter-
nal trigger during counting in capture mode. It sets the interrupt flag CAPBIF/T16A_IFLG
x
register in the
T16A5 module to 1.
To use this interrupt, set CAPBIE/T16A_IEN
x
register to 1. If CAPBIE is set to 0 (default), interrupt re-
quests for this cause is not sent to the ITC.
Capture A overwrite interrupt
This interrupt request is generated if the capture A register is overwritten by a new external trigger when
the capture A interrupt flag CAPAIF has been set (a counter value has already been loaded to the capture A
register). It sets the interrupt flag CAPAOWIF/T16A_IFLG
x
register in the T16A5 module to 1.
To use this interrupt, set CAPAOWIE/T16A_IEN
x
register to 1. If CAPAOWIE is set to 0 (default),
interrupt requests for this cause is not sent to the ITC.
CAPAOWIF will be set if the capture A register is overwritten when CAPAIF has been set regardless of
whether the capture A register has been read or not. Therefore, be sure to reset CAPAIF immediately after
the capture A register is read.
Capture B overwrite interrupt
This interrupt request is generated if the capture B register is overwritten by a new external trigger when
the capture B interrupt flag CAPBIF has been set (a counter value has already been loaded to the capture B
register). It sets the interrupt flag CAPBOWIF/T16A_IFLG
x
register in the T16A5 module to 1.
To use this interrupt, set CAPBOWIE/T16A_IEN
x
register to 1. If CAPBOWIE is set to 0 (default),
interrupt requests for this cause is not sent to the ITC.
CAPBOWIF will be set if the capture B register is overwritten when CAPBIF has been set regardless of
whether the capture B register has been read or not. Therefore, be sure to reset CAPBIF immediately after
the capture B register is read.