2.15.10 CLOCK_FailStatusGet Function

C

inline static uint32_t CLOCK_FailStatusGet(void);

Summary

Returns clock generator failure status.

Description

This inline function returns clock generator failure status.

Precondition

None.

Parameters

None.

Returns

32-bit status value. use status masks in CLOCK_FAIL_STATUS_MASKS to derive individual status.

Example

void ClockFailCallback(uintptr_t context)
{
    bool status;
    status = CLOCK_FailStatusGet();
    //user can further use CLOCK_FAIL_STATUS_MASKS enum to deduce individual clock status
}
int main ( void )
{
    /* Initialize all modules */
    SYS_Initialize ( NULL );
    CLOCK_CombinedClockFailCallbackRegister(ClockFailCallback, NULL);

    while ( true )
    {
        SYS_Tasks ( );
    }

    /* Execution should not come here during normal operation */

    return ( EXIT_FAILURE );
}

Remarks

In interrupt mode this function has to be called inside CLOCK_CombinedClockFailCallbackRegister to know the status during failure event.