Forums

GPIO Interrupts

Started by bobhopf July 29, 2003
I am processing 4 pulse inputs on port B of a 56827, each about
200nsec and somewhat random occurance. I had been losing interrupts
(missing pulses) when he pulses occurred within the interrupt
processing time. The cause appears to be reseting the IPR via IESR
with a BFSET vs a MOVE instruction.

Non-working Code
if (ArchIO.PortB.IntPendingReg & bit_1) {
// a fast process
ArchIO.PortB.IntEdgeSensReg |= bit_1;
// generates: bfset #bit_1,X:RegAddr
}
// more bits tested and processed with same code different bits

Working Code
if (ArchIO.PortB.IntPendingReg & bit_1) {
// a fast process
ArchIO.PortB.IntEdgeSensReg = bit_1;
// generates: movei #bit_1,X:RegAddr
}
// more bits tested and processed with same code different bits

hmmmmm..................