4.15.25 diag_intr_freq.h File Reference

This file contains API prototypes for Interrupt frequency test.

Includes

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

Enums

This enumeration indicates if interrupt is being monitored or is being ignored for monitoring. In case if there is a failure detected for any interrupt monitoring, diagnostics test will stop monitoring that interrupt anymore by setting this variable to DIAG_INTR_OFF.

This enumeration holds the status of interrupt monitoring.

diag_interrupt_mon_status_t
DIAG_INTR_ON

0 - Interrupt is registered and being monitored

DIAG_INTR_OFF

1 - Interrupt is registered but not being monitored

diag_interrupt_test_status_t
DIAG_INTR_PASS

0 - Interrupt test is passed

DIAG_INTR_FAIL

1 - Interrupt test is failed

DIAG_INTR_INVALID

2 - Interrupt test is invalid

Functions

Table 4-51. boolDIAG_INTERRUPT_Register (diag_interrupt_id_t id, uint16_t refCount, uint16_t tolerance, uint16_t fttiCount)
Parameters

[in] id

diag_interrupt_id_t

- ID for interrupt to be monitored

[in] refCount

uint16_t

- The expected number of interrupts within monitoring period

[in] tolerance

uint16_t

- Limit for deviation in the counter

[in] fttiCount

uint16_t

- Count which when reaches zero checks the interrupt frequency. If fttiCount is non-zero, that means the interrupt frequency check should be skipped for that instance and intr_counter should not be incremented

Returns
bool bool
Table 4-52. voidDIAG_INTERRUPT_Initialize (void)
Parameters
void
Returns
void None
Table 4-53. voidDIAG_INTERRUPT_UpdateInterruptCounter (diag_interrupt_id_t interruptModule)
Parameters

[in] id

- ID for the interrupt to be updated

Returns
void None
Table 4-54. diag_interrupt_test_status_tDIAG_INTERRUPT_GetResult (diag_interrupt_id_t id)
Parameters
id diag_interrupt_id_t
Returns
diag_interrupt_test_status_t DIAG_INTR_PASS - Success, DIAG_INTR_FAIL - Failure, DIAG_INTR_INVALID - Indeterminate
Table 4-55. boolDIAG_INTERRUPT_Unregister (diag_interrupt_id_t id)
Parameters

[in] id

diag_interrupt_id_t

- ID for the interrupt to be unregistered

Returns
bool bool