3.1.2.3.1 DIAG_ClockLineFreq()

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

The Clock Test Using Line Frequency implements the independent-time-slot-monitoring H.2.18.10.4 defined in the IEC60370 standard. 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.

Parameters:
in sysclock

- CPU system clock frequency value

in linefreq

- Reference line frequency value

in tolerance

- Limit for deviation frequency value