BCM1250/BCM1125/BCM1125H
User Manual
10/21/02
B r o a d c o m C o r p o r a t i o n
Page
58
Section 4: System Control and Debug Unit
Document
1250_1125-UM100CB-R
G
ENERAL
T
IMERS
The part has four general timers. Each has a 23 bit counter and is clocked by a 1 MHz clock derived from the
100 MHz reference clock. This allows a maximum count of 8388608, giving the maximum one-shot timeout of
8.388608 s, and a maximum periodic interrupt every 8.388608 s. The timers can be either set to count down
from the initial count to zero and stop, or repeatedly count down. A timer should always be disabled before its
operating mode is changed.
When the timer is enabled in the one-shot mode the counter is loaded from the initial count register and will
decrement to zero. When the count reaches 0, the next clock tick causes an interrupt to be generated and the
timer is disabled. The count will remain at 0 until the timer is re-enabled by software. The interrupt is cleared
by any write to the configuration register, regardless of whether the timer is kept in the disabled state or
enabled. If the timer is re-enabled before its counter reaches 0, its counter is reloaded with the initial count and
will restart decrementing.
In the second mode, the counter is loaded from the initial count and will decrement to zero. When the counter
reaches zero the next clock tick cause an interrupt to be generated and the counter to be reloaded with the
initial count and start counting down again. When the counter is in this mode it will not be reloaded if it is re-
enabled (but it will if it is disabled and then enabled again). The interrupt is cleared by any write to the
configuration register, if regular interrupts are required this write should re-enable the counter. There is no
detection of missed interrupts, once the interrupt has asserted it will only be raised again after it has been
cleared and then the counter reaches zero.
T
IMER
S
PECIAL
C
ASES
If the initial count of any timer (regardless of mode) is set to zero and the timer is enabled then an interrupt will
be signalled every clock tick. It is UNPREDICTABLE if writing the configuration register will cause the interrupt
to deassert. It is UNPREDICTABLE how many ticks a watchdog timer will take to assert reset.
If the initial count register is updated or the mode is changed between one-shot and continuous while the
counter is enabled the behavior is UNPREDICTABLE.
ZB
BUS
C
YCLE
C
OUNT
AND
C
OMPARE
There is an additional read only counter that is initialized to zero and increments every ZBbus cycle. Even in
the fastest parts it will take more than 1000 years for the counter to wrap. It can therefore be used to provide
a sequence number that is unique and monotonically increasing through the runtime of the system. This is
useful for software that needs to assign an order to events. The counter may also be used as a high resolution
clock for timing. The read only
zbbus_cycle_count
register is placed at the start of a 64KB memory range, if
additional registers are added in this range they will be Read Only with no side effects. This range can therefore
be safely mapped into user address space. There are two comparison registers which will raise an interrupt
when the count matches the comparison value. The interrupt will remain asserted until the compare register is
written. Note that the interrupt is only raised on equality, so writing the compare register with a value lower than
the current count will ensure the interrupt is never raised. Since cycle 0 is guaranteed to have passed by the
time the CPU executes the first instruction, writing the compare register with zero is always a safe way to clear
the interrupt and disable it.
Содержание BCM1125
Страница 18: ...BCM1250 BCM1125 BCM1125H User Manual 10 21 02 Broadcom Corporation Page xviii Document 1250_1125 UM100CB R ...
Страница 28: ...BCM1250 BCM1125 BCM1125H User Manual 10 21 02 Broadcom Corporation Page xxviii Document 1250_1125 UM100CB R ...
Страница 515: ...BCM1250 BCM1125 BCM1125H User Manual 10 21 02 Broadcom Corporation Page vii Index Document 1250_1125 UM100CB R ...