This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Interrupt in CC3200 using TI_RTOS Not working as expected.

Hi,

I have tried implementing External GPIO interrupt using the "email" example as a reference in my application. However, there is some unexpected behavior when I run my application, with the code getting stuck in some functions of " Hwi_asm.sv7M", even when there is no interrupt that has occurred. This happens more if greater than one GPIO Interrupts are configured.

I have followed the steps described below:

1. Configure the corresponding pin as GPIO_Input in the pinmux file.

2. Configure the ports variable and configure the interrupt on that pin:

GPIO_IF_GetPortNPin(ACC_INT,
&g_uiACCINTPort,
&g_ucACCINTPin);

GPIO_IF_ConfigureNIntEnable(g_uiACCINTPort,g_ucACCINTPin, GPIO_RISING_EDGE, Acc_Interrupt_Hdl);

3. In the Acc_Interrupt_Hdl function:

void Acc_Interrupt_Hdl()
{
unsigned long ulPinState = GPIOIntStatus(g_uiACCINTPort,1);
if(ulPinState & g_ucACCINTPin)
{
MAP_GPIOIntDisable(g_uiACCINTPort,g_ucACCINTPin);
MAP_GPIOIntClear(g_uiACCINTPort,g_ucACCINTPin);
MAP_IntDisable(GetPeripheralIntNum_Local(g_uiACCINTPort));

Acc_Interrupt_Fn();
}
}

4. In the Acc_Interrupt_Fn:

void Acc_Interrupt_Fn (void){

//Other basic commands, which do not take too much Instruction cycles

MAP_GPIOIntClear(g_uiACCINTPort,g_ucACCINTPin);
MAP_IntPendClear(GetPeripheralIntNum_Local(g_uiACCINTPort));
MAP_IntEnable(GetPeripheralIntNum_Local(g_uiACCINTPort));
MAP_GPIOIntEnable(g_uiACCINTPort,g_ucACCINTPin);

}

Is it to do with the INT_PRIORITY_LVL_1 that is set for multiple GPIO Interrupt in the GPIO_IF_ConfigureNIntEnable function? If  yes, how do we change the priority levels of these?

Thank you.

Abhay

  • When you use TI-RTOS,  use the Hwi module to create the interrupt.  You can look at any of the drivers in TI-RTOS to see how it is done. Note the drivers actually use a thin shim HwiP so they can work with TI-RTOS or FreeRTOS.