10.14.1 Initialization

To configure an interrupt source, complete the following steps:

  1. If nested interrupts are not desired, set the NSTDIS control bit (INTCON1).
  2. Select the user application-assigned priority level for the interrupt source by writing to the control bits in the appropriate IPCx control register. The priority level depends on the specific application and type of the interrupt source. If multiple priority levels are not desired, the IPCx register control bits for all enabled interrupt sources can be programmed to the same non-zero value.
  3. Clear the interrupt flag status bit associated with the peripheral in the associated IFSx status register.
  4. Enable the interrupt source by setting the interrupt enable control bit associated with the source in the appropriate IECx control register.