CLASSB_Startup_Tests

Function

static CLASSB_STARTUP_STATUS CLASSB_Startup_Tests(void);

Summary

This function executes all startup self-tests inserted into classb.c file by the MHC.

Description

This function is called from the '_on_reset' function which is the first function to be executed after a reset. If none of the self-tests are failed, this function returns 'CLASSB_STARTUP_TEST_PASSED'. If any of the startup self-tests are failed, this function will not return. The self-tests for SRAM, Clock and Interrupt are considered non-critical since it may be possible to execute a fail-safe function after detecting a failure. In such case, the CLASSB_SelfTest_FailSafe() function is called when a failure is detected. In the case of critical failures (CPU registers or internal flash), the corresponding self-test remains in an infinite loop to avoid unsafe execution of code.

Precondition

None.

Parameters

None.

Returns

Pass or Fail.

Example

CLASSB_STARTUP_STATUS startup_tests_status = CLASSB_STARTUP_TEST_FAILED;
startup_tests_status = CLASSB_Startup_Tests();

Remarks

This function does not return if any of the self-tests detects a failure.