User`s manual

BL1600 Memory, I/O Map, and Interrupt Vectors s 123
Do not forget the interaction between the watchdog timer and the power-
failure interrupt. If a brownout causes an extended stay in the power-
failure interrupt routine, the watchdog can time out and cause a system
restart.
A few milliseconds of computing time remain when the +5 V supply falls
below 4.5 V, even if power is abruptly cut off from the board. The amount
of time depends on the size of the capacitors in the power supply. The
standard wall transformer provides about 10 ms. If the power cable is
abruptly removed from the BL1600 side, only the capacitors on the board
are available and the computing time is reduced to a few hundred micro-
seconds. These times can vary considerably depending on the system
configuration and loads on the 5 V or 9 V power supplies.
The interval between the power-failure detection and entry to the power-
failure interrupt routine is approximately 100 µs, or less if Dynamic C
NMI communications is not in use.
Testing power-failure interrupt routines presents some problems. Nor-
mally, a power-failure interrupt routine disables interrupts. Probably the
best test method is to leave messages in battery-backed memory to track
the execution of the power-failure routines. Use a variable transformer to
simulate brownouts and other types of power-failure conditions.
The power-failure interrupt must be disabled if an external +5 V power
supply is used.
Jump Vectors
These special interrupts occur in a different manner. Instead of loading the
address of the interrupt routine from the interrupt vector, these interrupts
cause a jump directly to the address of the vector, which will contain a
jump instruction to the interrupt routine. This example illustrates a jump
vector.
0x66 nonmaskable power-failure interrupt
Since nonmaskable interrupts (NMI) can be used for Dynamic C communi-
cations, an interrupt vector for power failure is normally stored just in front
of the Dynamic C program. Use the command
#JUMP_VEC NMI_VEC name
to store the vector here.
The Dynamic C communication routines relay to this vector when the NMI
is caused by a power failure rather than by a serial interrupt.