I have a drive working in instaspin technology for sensorless control. I am using trip zone input (TZ3) to trip the drive by using following code
in void HAL_setupPwms() function in hal.c file.
PWM_enableTripZoneSrc(obj->pwmHandle[cnt], PWM_TripZoneSrc_OneShot_TZ3_NOT);
The drive trips as expected when the TZ3 pin goes low, however, when I am polling the register TZFLG using following structure,
if (halHandle->pwmHandle[0]->TZFLG == 4) to see the cause of trip,
the drive trips by just comparing the register in the if loop even if the pin is not low.
Is there something that I am missing?