brianmichalk
Active member
I want to know if there is a way to check an interrupt pending flag while in an interrupt.
My circuit board is getting interrupts on a signal that's going to my board, and this has been verified by a practicing electrical engineer. They have tried several methods to clamp down on the noise, but it seems to be coming through the ground plane, and I can see it on my scope, on the order of 5nano seconds of noise.
I would like to debounce this, but by the time I am in the interrupt, the pin state has already changed. I have to trigger on the leading edge of this pulse for proper timing with the machinery. If I could measure the pulse width, I could debounce that way.
I can't find a way to check for pending interrupts while inside the ISR. What I'd like to do is enter the IRQ, check pin status, then check for pending.
My current solution is to throw out interrupts that happen out of sequence with other signals, but sometimes this doesn't work, in maybe .05% of the cases.
My circuit board is getting interrupts on a signal that's going to my board, and this has been verified by a practicing electrical engineer. They have tried several methods to clamp down on the noise, but it seems to be coming through the ground plane, and I can see it on my scope, on the order of 5nano seconds of noise.
I would like to debounce this, but by the time I am in the interrupt, the pin state has already changed. I have to trigger on the leading edge of this pulse for proper timing with the machinery. If I could measure the pulse width, I could debounce that way.
I can't find a way to check for pending interrupts while inside the ISR. What I'd like to do is enter the IRQ, check pin status, then check for pending.
My current solution is to throw out interrupts that happen out of sequence with other signals, but sometimes this doesn't work, in maybe .05% of the cases.