I just wanna test the interrupt of psoc4, using CY8CKIT.
After power up, and pressed the button,it entered the int handler but it stucked in the handler and can't back to main()...
main:
#include <device.h>
void button_int(void)
{
isr_1_ClearPending();
green_Write(1);
CyDelay(1000);
}
void main()
{
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
isr_1_StartEx(button_int);
CyGlobalIntEnable; /* Uncomment this line to enable global interrupts. */
for(;;)
{
green_Write(1);
CyDelay(500);
green_Write(0);
CyDelay(500);
green_Write(1);
/* Place your application code here. */
}
}
/* [] END OF FILE */
A falling edge of button pin will cause an interrupt,