<< Previous | Next >> | |
|
root char* errlogGetHeaderInfo( void );
Description
- Reads the error log header and formats the output.
- When running stand alone (not talking to Dynamic C), this function reads the header directly from the log buffer. When in debug mode, this function reads the header from the copy in flash.
- When a Dynamic C cold boot takes place, the header in RAM is zeroed out to initialize it, but first its contents are copied to an address in the BIOS code before the BIOS in RAM is copied to flash. This means that on the second cold boot, the data structure in flash will be zeroed out. The configuration of the log buffer may still be read, and the log buffer entries are not affected.
- Because the exception mechanism resets the processor by causing a watchdog time-out, the number of watchdog time-outs reported by this functions is the number of actual WDTOs plus the number of exceptions.
Return value
- A null terminated string containing the header information:
Status Byte: 0
#Exceptions: 5
Index last exception: 5
#SW Resets: 2
#HW Resets: 2
#WD Timeouts: 5
- The string will contain "Header checksum invalid" if a checksum error occurs. The meaning of the status byte is as follows:
bit 0 - An error has occurred since deployment
bit 1 - The count of SW resets has rolled over.
bit 2 - The count of HW resets has rolled over.
bit 3 - The count of WDTOs has rolled over.
bit 4 - The count of exceptions has rolled over.
bit 5-7 - Not used
- The index of the last exception is the index from the start of the error log entries. If this index does not equal the total exception count minus one, the error log entries have wrapped around the log buffer.
Library
- ERRORS.LIB
Dynamic C Functions | << Previous | Next >> | rabbit.com |