Specifications

7.5. RELIABILITY
7.5.1 Software
Watchdog timer A watchdog timer resets the device should a software
error occur, or the program get stuck in a loop. This operates as follows:
the watchdog peripheral runs an independent timer which (under normal
operating conditions) is periodically reset by software. If the timer were to
overflow (for whatever reason) it automatically performs a hardware reset of
the microprocessor. Thus, should the software fail at any stage, or the device
become stuck in an ISR or other loop, the timer will not be reset and it will
overflow, thereby resetting the device.
The watchdog reset statement has been placed at the beginning of the
main loop and the timer is set for approximately 1 second, which is enough
time to ensure that there is truly a fault condition and that we are not simply
waiting for a peripheral to respond.
Brown out reset The brown out reset (or BOR)’s function is to reset
the microprocess or should the supply voltage drop below a pre-set threshold.
This is performed autonomously by a dedicated hardware peripheral in the
microprocessor. Microchip’s PIC 18F series offer selectable threshold levels
of 2.0V, 2.7V, 4.2V or 4.5V. The BOR has been set to 2.7V since all digital
logic is still able to operate reliably at this voltage, with the exception of
the I
2
C EEPROM. However, communication failures with the I
2
C bus are
managed by that FSM.
Power On Self Test Upon power-up, the system checks all settings and
voltage levels for sensible values. Should these fail, appropriate action is
taken.
For example, if the peripheral settings are found to be corrupt or illogical
(for instance, 12 de vices installed when there is a possible maximum of only
8), then the system will default to zero peripherals installed and signal the
user of the error so that it may be corrected. Peripherals are also polled to
check for their presence and correct operation. Should they fail to respond
or return incorrect values, they are disabled and the user notified. Normal
device operation continues thereafter.
86