2.1.2.5 DIAG_INT_FrequencyRegister()

diag_result_t DIAG_INT_FrequencyRegister (diag_int_id_t intId, uint16_t refCount, uint16_t tolerance, uint16_t fdtiCount)

Registers an interrupt source to monitor. When any interrupt is registered, diag_int_params_t parameters are initialized with user-defined values and are later updated or monitored by DIAG_INT_Frequency function.

Parameters:
in intId

- Unique ID for the interrupt to be monitored

in refCount

- The number of interrupts expected to occur within a given monitoring period

in tolerance

- The tolerance band for the number of interrupts that occur in the defined FDTI

in fdtiCount

- This is the count to derive Fault Detection Time Interval for the interrupt registered for monitoring. FDTI is the time interval between the occurrence of a fault and its detection. This count gets decreased every time reference ISR is called. When this counter reaches 1, its time to check the intr_counter with expected intr_ref_counter for interrupt under test with given intr_counter_tolerance.

Returns:

DIAG_PASS - Given interrupt source is registered successfully  

DIAG_FAIL - Given interrupt source is not registered  

DIAG_INVALID_ARG - Invalid input arguments when calling the function