3.28.5 External Interrupt Controller (EIC)

The External Interrupt Controller (EIC) forwards external interrupt sources from two PIO lines to the interrupt controller by providing some pre-processing capabilities (filtering, polarity inversion, edge detection, enable).

Using The Library

The interrupt properties of the EIC pins can be configured using MCC GUI. At run time the EIC PLIB APIs can be used to:

  • Register interrupt callbacks for each EIC pins

  • Enable/Disable EIC interrupts for each EIC pins

  • Change the detection polarity for each EIC pin

  • Freeze the configurations for each pins so that no further changes will be allowed.

Library Interface

External Interrupt Controller peripheral library provides the following interfaces:

Functions

NameDescription
EIC_InitializeInitializes given instance of EIC peripheral
EIC_InterruptEnableEnable external interrupt on the specified pin
EIC_InterruptDisableDisable external interrupt on the specified pin
EIC_CallbackRegisterRegisters the function to be called when an interrupt condition has been sensed on the pin
EIC_SetPolaritySets the polarity of detection
EIC_FreezeConfigurationFreeze EIC configuration

Data types and constants

NameTypeDescription
EIC_PINEnumIdentifies the available EIC pins
EIC_POLARITYEnumIdentifies all possible EIC polarities
EIC_CALLBACKTypedefDefines the data type and function signature of the EIC peripheral callback function