14.27 diag_intr_freq.h File Reference

This file contains data structures and API prototypes for Interrupt Frequency Test.

Includes

  1. stdbool.h
  2. stdint.h
  3. ../../diag_common/config/diag_config.h

Enums

This enumeration holds the status of interrupt frequency test.

This enumeration contains the constants to indicate if interrupt is being monitored or is being ignored from monitoring. When faulire is detected for any registered interrupt, diagnostic test will stop monitoring that interrupt by assigning DIAG_INTR_OFF to intr_mon_status.

diag_interrupt_test_status_t
DIAG_INTR_INVALID

0 - Interrupt test is invalid

DIAG_INTR_PASS

1 - Interrupt test is passed

DIAG_INTR_FAIL

2 - Interrupt test is failed

diag_interrupt_mon_status_t
DIAG_INTR_ON

0 - Interrupt is registered and being monitored

DIAG_INTR_ERROR

1 - Interrupt is registered but in error state and not being monitored

DIAG_INTR_OFF

2 - Interrupt is registered but not being monitored

Functions

Table 14-57. boolDIAG_INTERRUPT_Register (diag_interrupt_id_t intrId, uint16_t refCount, uint16_t tolerance, uint16_t fdtiCount)
Parameters

[in] intrId

diag_interrupt_id_t

- Unique ID for the interrupt to be monitored

[in] refCount

uint16_t

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

[in] tolerance

uint16_t

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

[in] fdtiCount

uint16_t

- 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 decremented 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
bool bool
Table 14-58. boolDIAG_INTERRUPT_Unregister (diag_interrupt_id_t intrId)
Parameters

[in] intrId

diag_interrupt_id_t

- ID for the interrupt to be unregistered

Returns
bool bool
Table 14-59. voidDIAG_INTERRUPT_Initialize (void)
Parameters
void
Returns
void None
Table 14-60. voidDIAG_INTERRUPT_UpdateInterruptCounter (diag_interrupt_id_t intrId)
Parameters

[in] intrId

diag_interrupt_id_t

- ID for the interrupt being diagnosed.

Returns
void None
Table 14-61. diag_interrupt_test_status_tDIAG_INTERRUPT_GetStatus (diag_interrupt_id_t intrId)
Parameters

[in] intrId

diag_interrupt_id_t

- ID of the interrupt for which test status to be obtained.

Returns
diag_interrupt_test_status_t DIAG_INTR_PASS, DIAG_INTR_FAIL, DIAG_INTR_INVALID - Indeterminate