@interrupt void tpm1_ch1_intr( void ) /* hall2 */
{
TPM1C1SC;
TPM1C1SC = 0x4C;
timeStampHS1 = TPM1C1V;
Icu_TimestampNotifyHallSensor_1();
}
Now here is some more important information. I only get the unexpected interrupts when the hall sensor is high. Also, during other processing in the temporal loop, the interrupts are disabled, some processing is done, then the interrupts are enabled again, with the following functions.
void disable_hall_effects( void )
{
INTERRUPTS_OFF();
TPM1C0SC;
TPM1C0SC = 0; /* timer 1 chan 0 status/ctrl */ /*Input capture for Hall effects*/
TPM1C1SC;
TPM1C1SC = 0; /* timer 1 chan 1 status/ctrl */ /*Input capture for Hall effects*/
INTERRUPTS_ON();
}
void
enable_hall_effects( void )So I am wondering if the disable/enable actions are causing an interrupt to be sent. Any other ideas? Thanks!
Dave