This is probably a no-brain question, but I'm seeing some oddness I'm not sure about.
The application is brushless DC motor control. We have 3 Hall sensor inputs that let us determine things like the position of the shaft and the RPM. Each of these lines is connected, via a buffer, to 3 GPIO pins on PORT1. As a state changes, we flip the interrupt edge select so we catch HIGH-TO-LOW and LOW-TO-HIGH and can determine what to do based on these transitions.
I started seeing multiple, repeating interrupts when the state hasn't changed, and this puzzled me. I was assuming that, once I had processed a transition, toggled interrupt edge selection, and cleared the interrupt flag bits I'd not be bothered again until the next rising/falling edge on one of the monitored lines.. but this appears not to be true..
Breaking in the debugger in CCS 6 right before I clear the interrupt flags and single-stepping, I see some flags NOT being set to zero! So, I do in and clear the flags by hand and they IMMEDIATELY come back! Thus the interrupt re-triggers even though the input bit values haven't changed.
This seems downright wrong. I changed te interrupt edge, I can see it in P1IES, but it's acting as if the interrupt state hasn't been cleared.
Is this "working as designed"? Do I need to disable interrupts for any "stuck" lines and only enable interrupts for those I expect to transition?
All help appreciated, I'm running out of haair to tear out...
Ed Averill