ADSP-BF535 Blackfin Processor Hardware Reference
16-19
Timers
The
PERIOD_CNT
bit in
TIMERx_CONFIG
controls whether an enabled inter-
rupt is generated when the pulse width or pulse period is captured. If the
PERIOD_CNT
bit is set, the
IRQx
bit is set when the pulse period value is cap-
tured. If the
PERIOD_CNT
bit is cleared, the
IRQx
bit is set when the pulse
width value is captured.
If the
PERIOD_CNT
bit is cleared, the first interrupt is generated before the
first period value has been measured, so the period value is not valid. If the
ISR reads the period value in this case, the timer returns a period value of
0.
If enabled, a timer interrupt is also generated if the
TIMERx_COUNTER
regis-
ter reaches a value of 0xFFFF FFFF. At that point, the timer is disabled
automatically, and the
OVF_ERRx
status bit is set, indicating a count over-
flow.
IRQx
and
OVF_ERRx
are sticky bits, and software must clear them
explicitly.
Because of synchronizer latency, insert two NOP instructions between set-
ting WDTH_CAP and setting the
TIMENx
bit. The timer can be
subsequently disabled and re-enabled without additional NOP
instructions.
Autobaud Detection
Timer0 provides autobaud detection for UART0, and Timer1 and Timer2
provide autobaud detection for UART1. When
UARTx_RX_SEL
is set in
TIMERx_CONFIG
, the timer samples the appropriate UART port receive data
pin (
RX0
or
RX1
) instead of the
TMRx
pin while enabled for WDTH_CAP
mode. A software routine can measure the pulse widths of the bits received
on the serial data line (
RX
). Because the timers operate synchronously with
the UART operation (all are derived from the phase-locked loop (PLL)
clock), the pulse widths can be used to calculate the baud-rate divider for
the UART. To determine the UART baud rate, use this equation:
DIVISOR = TIMERx_WIDTH/(16 x (Number of captured UART bits))
Summary of Contents for ADSP-BF535 Blackfin
Page 80: ...Development Tools 1 26 ADSP BF535 Blackfin Processor Hardware Reference...
Page 312: ...Working With Memory 6 86 ADSP BF535 Blackfin Processor Hardware Reference...
Page 332: ...System Interfaces 7 20 ADSP BF535 Blackfin Processor Hardware Reference...
Page 360: ...Dynamic Power Management Controller 8 28 ADSP BF535 Blackfin Processor Hardware Reference...
Page 446: ...Beginning and Ending an SPI Transfer 10 40 ADSP BF535 Blackfin Processor Hardware Reference...
Page 522: ...Timing Examples 11 76 ADSP BF535 Blackfin Processor Hardware Reference...
Page 562: ...IrDA Support 12 40 ADSP BF535 Blackfin Processor Hardware Reference...
Page 608: ...PCI I O Issues 13 46 ADSP BF535 Blackfin Processor Hardware Reference...
Page 672: ...References 14 64 ADSP BF535 Blackfin Processor Hardware Reference...
Page 810: ...SDRAM Controller SDC 18 86 ADSP BF535 Blackfin Processor Hardware Reference...
Page 811: ...ADSP BF535 Blackfin Processor Hardware Reference 18 87 External Bus Interface Unit...
Page 812: ...SDRAM Controller SDC 18 88 ADSP BF535 Blackfin Processor Hardware Reference...
Page 860: ...DMA Bus Debug Registers 20 30 ADSP BF535 Blackfin Processor Hardware Reference...