Other Parts Discussed in Thread: MOTORWARE
I am working on a motorware project and need to get interrupts working. The first order of business is for me to get external interrupts working. The following code snippet looks like it should get the job done but no joy. I am following the procedure in the TRM for the 28069 while using the motorware calls. Any help would be appreciated. I see the high to low transition on the pin but the ISR fails to toggle the test bit. If I shut off the ISR and poll the input pin the toggle the output bit on the transition all is well.
this is located in main.c
//setup external interrupts
GPIO_setExtInt(obj->gpioHandle, GPIO_Number_13, CPU_ExtIntNumber_1);
PIE_enableExtInt(obj->pieHandle, CPU_ExtIntNumber_1);
PIE_setExtIntPolarity(obj->pieHandle, CPU_ExtIntNumber_1, PIE_ExtIntPolarity_FallingEdge);
CPU_enableInt(obj->cpuHandle,CPU_IntNumber_4);
HAL_initIntVectorTable(halHandle);
CPU_enableGlobalInts(obj->cpuHandle);
this is how the vector table is set:
//! \brief Initializes the interrupt vector table
//! \details Points ADCINT1 to mainISR
//! \param[in] handle The hardware abstraction layer (HAL) handle
static inline void HAL_initIntVectorTable(HAL_Handle handle)
{
HAL_Obj *obj = (HAL_Obj *)handle;
PIE_Obj *pie = (PIE_Obj *)obj->pieHandle;
ENABLE_PROTECTED_REGISTER_WRITE_MODE;
//pie->ADCINT1 = &mainISR;
pie->XINT1 = &HallISR;
DISABLE_PROTECTED_REGISTER_WRITE_MODE;
return;
} // end of HAL_initIntVectorTable() function
I'll be the first to admit I'm not the sharpest tool in the shed but this ought to work. No?