Hi All,
In my application, I have switches connected to Port H pins. Requirement is whenever any switch is pressed, interrupt should occur.The problem is when I use GPIOPin interrupt related API like GPIOPinIntEnable(), code doesn't work. It seems control has reached to any undefined location. When I reset and the compile, I got error code 166(OS_ERR_CPU_STATE_ISR_ILLEGAL).
I had also used OS_EnterInterrupt()/OS_LeaveInterrupt() in ISR. but no success.
I am using embos ver 3.82K and controller is LM3S5K31 (Texas).
Please suggest me how I can use port pin interrupt. I am listing API below which I used for port configuration.
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOH);
GPIODirModeSet(GPIO_PORTH_BASE, GPIO_PIN_3|GPIO_PIN_4,GPIO_DIR_MODE_IN);
GPIOPinTypeGPIOInput(GPIO_PORTH_BASE, GPIO_PIN_3|GPIO_PIN_4);
GPIOPadConfigSet(GPIO_PORTH_BASE, GPIO_PIN_3|GPIO_PIN_4, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU);
GPIOPortIntRegister(GPIO_PORTH_BASE,PortHIntHandler);
GPIOIntTypeSet(GPIO_PORTH_BASE,GPIO_PIN_3 | GPIO_PIN_4,GPIO_BOTH_EDGES);
GPIOPinIntEnable(GPIO_PORTH_BASE,GPIO_PIN_3 | GPIO_PIN_4);
when I comment Interrupt related APIs, code compiles and works. But it doesn't work with interrupt API.
Please help.
Regards,
Harsh
In my application, I have switches connected to Port H pins. Requirement is whenever any switch is pressed, interrupt should occur.The problem is when I use GPIOPin interrupt related API like GPIOPinIntEnable(), code doesn't work. It seems control has reached to any undefined location. When I reset and the compile, I got error code 166(OS_ERR_CPU_STATE_ISR_ILLEGAL).
I had also used OS_EnterInterrupt()/OS_LeaveInterrupt() in ISR. but no success.
I am using embos ver 3.82K and controller is LM3S5K31 (Texas).
Please suggest me how I can use port pin interrupt. I am listing API below which I used for port configuration.
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOH);
GPIODirModeSet(GPIO_PORTH_BASE, GPIO_PIN_3|GPIO_PIN_4,GPIO_DIR_MODE_IN);
GPIOPinTypeGPIOInput(GPIO_PORTH_BASE, GPIO_PIN_3|GPIO_PIN_4);
GPIOPadConfigSet(GPIO_PORTH_BASE, GPIO_PIN_3|GPIO_PIN_4, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU);
GPIOPortIntRegister(GPIO_PORTH_BASE,PortHIntHandler);
GPIOIntTypeSet(GPIO_PORTH_BASE,GPIO_PIN_3 | GPIO_PIN_4,GPIO_BOTH_EDGES);
GPIOPinIntEnable(GPIO_PORTH_BASE,GPIO_PIN_3 | GPIO_PIN_4);
when I comment Interrupt related APIs, code compiles and works. But it doesn't work with interrupt API.
Please help.
Regards,
Harsh