
ADSP-BF59x Blackfin Processor Hardware Reference
8-7
General-Purpose Timers
at the system level. If enabled by
IRQ_ENA
, interrupt requests are also gen-
erated by error conditions as reported by the
TOVF_ERR
bits.
The system interrupt controller enables flexible interrupt handling. All
timers may or may not share the same CEC interrupt channel, so that a
single interrupt routine services more than one timer. In PWM mode,
multiple timers may run with the same period settings and issue their
interrupt requests simultaneously. In this case, the service routine might
clear all
TIMIL
latch bits at once by writing 0x000F 000F to the
TIMER_STATUS
register.
If interrupts are enabled, make sure that the interrupt service routine
(ISR) clears the
TIMIL
bit in the
TIMER_STATUS
register before the RTI
instruction executes. This ensures that the interrupt is not reissued.
Remember that writes to system registers are delayed. If only a few
instructions separate the
TIMIL
clear command from the RTI instruction,
an extra
SSYNC
instruction may be inserted. In
EXT_CLK
mode, reset the
TIMIL
bit in the
TIMER_STATUS
register at the very beginning of the inter-
rupt service routine to avoid missing any timer events.
Illegal States
Every timer features an error detection circuit. It handles overflow situa-
tions but also performs pulse width vs. period plausibility checks. Errors
are reported by the
TOVF_ERR
bits in the
TIMER_STATUS
register and the
ERR_TYP
bit field in the individual
TIMER_CONFIG
registers.
Table 8-1
pro-
vides a summary of error conditions, using these terms:
•
Startup
. The first clock period during which the timer counter is
running after the timer is enabled by writing
TIMER_ENABLE
.
•
Rollover
. The time when the current count matches the value in
TIMER_PERIOD
and the counter is reloaded with the value "1".
Summary of Contents for ADSP-BF59x Blackfin
Page 64: ...Development Tools 1 22 ADSP BF59x Blackfin Processor Hardware Reference...
Page 74: ...Processor Specific MMRs 2 10 ADSP BF59x Blackfin Processor Hardware Reference...
Page 244: ...Programming Examples 6 40 ADSP BF59x Blackfin Processor Hardware Reference...
Page 700: ...Programming Examples 16 78 ADSP BF59x Blackfin Processor Hardware Reference...
Page 738: ...Boundary Scan Architecture B 8 ADSP BF59x Blackfin Processor Hardware Reference...