Energy Micro IEC60355 Library Example Project 1.0 (internal use only!) GCC-Version
Example project demonstrating POST and BIST library functions

Interrupt Test

The interrupt test checks functionality of NVIC. More...

Collaboration diagram for Interrupt Test:

Defines

#define IgnoreIRQHandler   0
#define CallIRQHandler   1

Functions

void IEC60335_IRQReplacementHandler (void)
 call the original vector
void IEC60335_ClassB_InitInterruptTest (IRQn_Type IRQn, uint8_t Mode, IRQTestData_t *CountSetup)
 Initialization of a specified interrupt test.
testResult_t IEC60335_ClassB_InterruptCheck (IRQn_Type IRQn)
 The interrupt check routine must be called once in known equidistant times.

Detailed Description

The interrupt test checks functionality of NVIC.

Providing an intermediate vector which is used to check the occurrence of an
interrupt the original vector can be configured, so interrupts can be simulated


Define Documentation

#define CallIRQHandler   1

original handler is called

Definition at line 45 of file iec60335_class_b_interrupt_test.h.

Referenced by main().

#define IgnoreIRQHandler   0

original handler is ignored

Definition at line 44 of file iec60335_class_b_interrupt_test.h.


Function Documentation

void IEC60335_ClassB_InitInterruptTest ( IRQn_Type  IRQn,
uint8_t  Mode,
IRQTestData_t CountSetup 
)

Initialization of a specified interrupt test.

Parameters:
IRQnnumber of the interrupt to test
if number smaller than "SysTick_IRQn" the function deactivates all tests
numbers bigger than "PendSV_IRQn" activates the test
calling a second time with the same IRQn will deactivate this test
Modeconfigure interrupt is calling the original handler
CountSetupcounters of interrupt occurrences
Note:
The interrupt test is deactivated when called with a exception number (< SysTick_IRQn) on the IRQn parameter. In this case the original vector table is restored and all flags are deleted.
Attention:
Ensure to place the function call #IEC60335_ClassB_InterruptOcurred into the corresponding interrupt service handler!
Interrupt_Init.jpg

Referenced by main().

Here is the caller graph for this function:

testResult_t IEC60335_ClassB_InterruptCheck ( IRQn_Type  IRQn)

The interrupt check routine must be called once in known equidistant times.

Attention:
If this function is disturbed by active tested interrupts, the result counter may be out of range.
Parameters:
IRQnnumber of the interrupt to test
Returns:
passed or failed. See testResult_t .
Interrupt_Check.jpg

Referenced by main().

Here is the caller graph for this function:

void IEC60335_IRQReplacementHandler ( void  )

call the original vector

Parameters:
vectIRQ index

Interrupt_call.jpg

Interrupt replacement handler to check interrupt occurrences

Note:
The interrupt test requires an intermediate call and work on the test data. To achieve this goal the replacement handler is called instead of the user handler. If the corresponding Mode flag is set the routine calls the original vector handler.
Interrupt_Replacement.jpg