The attached model configures GPIO0 as external interrupt to trigger the blinking of LED. The custom code in the System Initialize block assigns GPIO0 as an input to trigger the XINT1 interrupt:
EALLOW;
GpioCtrlRegs.GPAMUX1.bit.GPIO0 = 0;
GpioIntRegs.GPIOXINT1SEL.bit.GPIOSEL = 0;
EDIS;
XIntruptRegs.XINT1CR.bit.ENABLE = 1;
XIntruptRegs.XINT1CR.bit.POLARITY = 1;
The ISR toggles the LED based on a rising edge of GPIO00. Connect GPIO to 3V and GND in order to blink the LED.
Best Answer