View Full Version : XMC1000 TIP of the day: Generating Interrupt from Port Pin

Oct 3rd, 2013, 11:52 PM
Have you ever wonder how to generate an interrupt by triggering the port pin?
In XMC1000, there are no dedicated pin to be use to received signal from the external to trigger an interrupt.
But it is possible to setup a certain pin to be use to trigger an interrupt depending on the signal received.

This can be done by connecting the port pin (as input) to the Event Request Unit (ERU).
ERU can be configured to detect falling edge or raising edge signal from the port pin.
When ERU detect such signal, it can send a trigger signal to the Nested Vectored Interrupt Controller (NVIC) to trigger an interrupt.
With this implementation, interrupt can be generated from the port pin input signal.
Please refers to the Port I/O Function table in Ports Chapter from the Reference Manual to see which pin can be used as the input pin for ERU module.