External Interrupt (PDL_EXINT)
The EXINT component makes it easy to set up interrupts from external sources and associate them with a dedicated callback function. Place a component instance on the project schematic and double-click to open the parameter editor. The parameters include the detection condition, NMI option, and the name of your callback function.
In addition to making the set-up process easy, the EXINT component eliminates pin selection errors by taking advantage of the PSoC™ Creator Guided Pin Selection feature. For example, the NMI parameter forces the EXINT component to use the NMIX pin on the device. Other interrupts can be mapped to pins you choose in the Design-Wide Resources Pin Editor, but the tool makes sure you choose a pin that supports the interrupt function. Pin selection takes seconds and is completely reliable.
This component automatically includes the required Peripheral Driver Library (PDL) module, which makes firmware development easier and less error-prone. The tool also generates a useful C-language macro for pin routing. Call the macro from your firmware to set up the pin and interrupt without worrying about the routing mux implementation inside the device. The macros are independent of the actual pin used, so pin choices can be changed and implemented with a simple re-build of the project - without changing a single byte of your firmware.