3.3.4.2 DIAG_ClockLineFreq

The Clock Test Using Line Frequency implements independent-time-slot-monitoring. It verifies the reliability of the system clock (i.e., the system clock should neither be too fast nor too slow). This test uses the AC line frequency to verify proper CPU clock operation. The AC line frequency is measured by using a zero-cross-detection circuit that is connected to the input of the Timer1 Gate Module.

diag_clock_line_status_t DIAG_ClockLineFreq(
    uint32_t sysclock,    uint8_t linefreq,    uint8_t tolerance
)

Parameters

[in] sysclock

uint32_t

- CPU system clock frequency value

[in] linefreq

uint8_t

- Reference line frequency value

[in] tolerance

uint8_t

- Limit for deviation frequency value

Returns

diag_clock_line_status_t DIAG_CLOCK_TEST_PASS - Success, DIAG_CLOCK_TEST_FAIL - Failure, DIAG_CLOCK_TEST_IN_PROGRESS - In-Progress, DIAG_CLOCK_TEST_COMPLETE - Complete, DIAG_INVALID_INPUT_TOLERANCE - Invalid, DIAG_INVALID_LINE_FREQ - Invalid