Hi,
I'm new to the forums and to C programming and am attempting to create an interrupt when the signal on one of the GPIO pins goes high. Using some of the example code for writing external interrupts I was able to successful enter the ISR with a button push, however, when I change the GPIO # to monitor a low/high on a incoming signal the ISR does not execute.
This is the code I'm using to set up the interrupt for the switch. Then, I change the GPIO from #12 to #34 (input signal pin) and the code no longer works when a change from low to high occurs. Is there a different setup or interrupt I need to enable?
PIE_registerPieIntHandler(myPie, PIE_GroupNumber_1, PIE_SubGroupNumber_4, (intVec_t)&xint1_isr);
PIE_enableInt(myPie, PIE_GroupNumber_1, PIE_InterruptSource_XINT_1);
CPU_enableInt(myCpu, CPU_IntNumber_1);
GPIO_setMode(myGpio, GPIO_Number_12, GPIO_12_Mode_GeneralPurpose);
GPIO_setDirection(myGpio, GPIO_Number_12, GPIO_Direction_Input);
GPIO_setPullUp(myGpio, GPIO_Number_12, GPIO_PullUp_Disable);
GPIO_setExtInt(myGpio, GPIO_Number_12, CPU_ExtIntNumber_1);
PIE_setExtIntPolarity(myPie, CPU_ExtIntNumber_1, PIE_ExtIntPolarity_RisingEdge);
PIE_enableExtInt(myPie, CPU_ExtIntNumber_1);
In addition, I have 3 separate external interrupts I would like to use, is it possible to tie all 3 pins to one interrupt and monitor the interrupt flag for which GPIO pin was triggered? (I'm used to the MSP430 and monitoring the port flags)
Thanks in advance.
--Sean