29.6.1.1 Initialization
The EIC must be initialized in the following order:
- Enable CLK EICAPB.
- If required, configure the NMI by writing the Non-Maskable Interrupt Control (NMICTRL) register.
- Enable GCLK EIC or CLK ULP32K when
one of the following external interrupt, EIC_EXTINTx pins, modes is selected:
- EIC_EXTINT pin filtering
- EIC_EXTINT pin synchronous edge detection
- EIC_EXTINT pin de-bouncing
- GCLK EIC is used when a frequency higher than 32 kHz is required for filtering
- CLK ULP32K is recommended when power consumption is the priority
- For CLK ULP32K write a '1' to the Clock Selection bit in the Control A register (CTRLA.CKSEL).
- Configure the EIC input sense and filtering by writing the Configuration n register (CONFIG).
- Optionally, enable the Asynchronous mode.
- Optionally, enable the Debounce mode.
- Enable the EIC by writing a '1' to CTRLA.ENABLE.