29.7 CLB Interrupts

The CLB module provides four interrupts which can be enabled using the Microchip CLB Synthesizer. The CLB Interrupt Selection latches are used to select one of 32 BLE outputs as the interrupt trigger source for each of the four interrupts (see Figure 29-12).

An interrupt will be generated when a positive edge is detected on the selected BLE output and the appropriate interrupt enables bits are set. The corresponding CLB Interrupt Flag (CLB1IFn) bit of the PIR registers is set if the CLB Interrupt Output is configured and a positive edge is detected. If the CLB Interrupt Enable (CLB1IEn) bit of the PIR registers is set and the corresponding CLB1IF flag bit is set, an interrupt event will occur.

To fully enable the interrupt, the following steps are required:
  • The CLB Interrupt Output (CLB_IRQn) is configured using the Microchip CLB Synthesizer
  • The CLB1IEn bit is set in the corresponding PIE register.
Figure 29-12. CLB Interrupt Selections