Hi, I need to measure a pulse (see the image) so I config a TPM in capture mode, at the begin rising edge interrupt is active, when I enter in the ISR, falling edge interrupt is actived. When a falling edge comes I stay in the ISR for a certain delay (guard time) so I avoid to capture noise. But as soon as I exit from ISR a while after the ISR is called again. It is like there was a pending bit,but that's impossible because before to exit I reset the pending bit (TPM0_C0SC |= (0x80);). It doesn't happen if I disable the interrupt by TPM0_C0SC |= (0x40); but in theory it shouldn't be necessary and anyway interrupt flag keep on working.
What happening? Any idea?
Thank you very much