AnsweredAssumed Answered

I get both rising and falling flags on my CMP0 callback function (KL03Z)

Question asked by Filip Dossche on Apr 1, 2015
Latest reply on Apr 9, 2015 by Filip Dossche

Hi,

 

My application uses the CMP0 component.

When the callback function stops at the point where a rising edge is detected it invariably shows falling and rising flags simultaneously but there is at least 70 microseconds between the two events. (see screenshot).

 

 

I have enabled high hysteresis level and filtering but nothing helps. Any ideas or suggestions as to what may be wrong ?

 

More details:

 

I have added counters each time a rising or falling edge is detected: When I make it stop at the first rising edge the rising counter is correctly set to 1.

However, the falling counter is set to 7 or so. How can you get multiple falling edges (interrupts) without rising edges in between ?

I have worked out how to set up the KL03Z at 48 Mhz instead of the standard 8 Mhz which was used before hoping that might help but it makes no difference at all.

 

Message was edited by: Filip Dossche

Outcomes