Crash and Watchdog Diagnostics#

Crash and watchdog diagnostic functions.

See diagnostic.h for source code.

Functions#

uint32_t

Returns the number of bytes used in the main stack.

void
halPrintCrashSummary(uint8_t port)

Print a summary of crash details.

void
halPrintCrashDetails(uint8_t port)

Print the complete, decoded crash details.

void
halPrintCrashData(uint8_t port)

Print the complete crash data.

const HalAssertInfoType *

If last reset was from an assert, return saved assert information.

Macros#

#define
halResetWasCrash ()

Macro evaluating to true if the last reset was a crash, false otherwise.

Function Documentation#

halGetMainStackBytesUsed#

uint32_t halGetMainStackBytesUsed (void )

Returns the number of bytes used in the main stack.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • The number of bytes used in the main stack.


halPrintCrashSummary#

void halPrintCrashSummary (uint8_t port)

Print a summary of crash details.

Parameters
TypeDirectionArgument NameDescription
uint8_tN/Aport

Serial port number (0 or 1).


halPrintCrashDetails#

void halPrintCrashDetails (uint8_t port)

Print the complete, decoded crash details.

Parameters
TypeDirectionArgument NameDescription
uint8_tN/Aport

Serial port number (0 or 1).


halPrintCrashData#

void halPrintCrashData (uint8_t port)

Print the complete crash data.

Parameters
TypeDirectionArgument NameDescription
uint8_tN/Aport

Serial port number (0 or 1).


halGetAssertInfo#

const HalAssertInfoType* halGetAssertInfo (void )

If last reset was from an assert, return saved assert information.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • Pointer to struct containing assert filename and line.