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.

TMS320F28027: External interrupts unexpected triggering

Part Number: TMS320F28027
Other Parts Discussed in Thread: MOTORWARE

Hi,

I'm using motorware Hal object based on lab01 and have followed the motoware HAL tutorial. I'm tryin to trigger an interrupt from 2 push buttons, one connected to GPIO12 and one to GPIO33/32.

When I configure extInt1 on GPIO12 everything works fine, but when I change the extInt1 to GPIOs 33 or 32 the ISR seems to be triggered constantly every 11us (I'm toggling an LED inside the ISR to measure on the scope).

Is there something I'm missing? Are pins GPIO33/32 not meant for ext int functionality?

Code for my config extracted from hal.c:

void HAL_setupGpios(HAL_Handle handle)
{
// push button 1
GPIO_setMode(obj->gpioHandle,GPIO_Number_12,GPIO_12_Mode_GeneralPurpose);
GPIO_setDirection(obj->gpioHandle,GPIO_Number_12,GPIO_Direction_Input);
GPIO_setPullUp(obj->gpioHandle, GPIO_Number_12, GPIO_PullUp_Disable);

// Push button 2
GPIO_setMode(obj->gpioHandle,GPIO_Number_32,GPIO_32_Mode_GeneralPurpose);
GPIO_setDirection(obj->gpioHandle,GPIO_Number_32,GPIO_Direction_Input);
GPIO_setPullUp(obj->gpioHandle, GPIO_Number_32, GPIO_PullUp_Enable);

// Pin for scope measurements and debugging
GPIO_setMode(obj->gpioHandle,GPIO_Number_33,GPIO_33_Mode_GeneralPurpose);
GPIO_setLow(obj->gpioHandle,GPIO_Number_33);
GPIO_setDirection(obj->gpioHandle,GPIO_Number_33,GPIO_Direction_Output);
}

void HAL_enableExtInts(HAL_Handle handle)
{
HAL_Obj *obj = (HAL_Obj *)handle;

// Ext Int 1 on GPIO 12
PIE_enableInt(obj->pieHandle, PIE_GroupNumber_1, PIE_InterruptSource_XINT_1);
GPIO_setExtInt(obj->gpioHandle, GPIO_Number_32, CPU_ExtIntNumber_1);

PIE_setExtIntPolarity(obj->pieHandle, CPU_ExtIntNumber_1, PIE_ExtIntPolarity_RisingAndFallingEdge);
PIE_enableExtInt(obj->pieHandle, CPU_ExtIntNumber_1);

CPU_enableInt(obj->cpuHandle, CPU_IntNumber_1);

return;
}

Thanks,

David