TI Friend and Family,
Our customer needs some clarification on the (new) TivaWare API released just last month.
They use PWM to drive the DC stepper motor (PWM on PG0) and an optical switch to stop the motor when initial position is reached.
The optical switch is connected to input Pin 5 of GPIO Port P. The opto LED is connected to output Pin 4 of GPIO Port P.
When they use GPIOIntTypeSet( PORT_TA_OPTICAL_IN_BASE, PIN_TA_OPTICAL_IN, GPIO_LOW_LEVEL | GPIO_DISCRETE_INT) with GPIOIntRegisterPin( PORT_TA_OPTICAL_IN_BASE , PIN_INT_OPTICAL_IN, OpticalIntHandler ), there is no interrupt.
When they use GPIOIntTypeSet( PORT_TA_OPTICAL_IN_BASE, PIN_TA_OPTICAL_IN, GPIO_LOW_LEVEL) with GPIOIntRegister( PORT_TA_OPTICAL_IN_BASE , PIN_INT_OPTICAL_IN, OpticalIntHandler2 ), they stay in a loop inside the interrupt handler OpticalIntHandler2. SUrprisingly, even when they use GPIOIntClear( PORT_TA_OPTICAL_IN_BASE , ulStatus ) in the interrupt handler.
Maybe we misunderstood the documentation and the new API ? They currently use TivaWare_C_Series-2.2.0.295.
Is it possible to call PWMPulseWidthSet() procedure inside the GPIO interrupt h? We believe that to be true, but of course any pointers or info you can share is greatly appreciated.
TY,
CY