AnsweredAssumed Answered

ADC interrupt / compare function

Question asked by Pascal Schröer on Jan 17, 2015
Latest reply on Jan 20, 2015 by Pascal Schröer

Hi to everybody,


I'm using a Kinetis MK10DX128VLH7 uC and would like to monitore an ADC value in bachground.

If the value is not in the calculated area, I would like to generate an interrupt.


To do this, I initialised the internal ADC0 with continous mode and the specific sample parameters.

Well, the initialisation and the interrupt works but I can only generate an interrupt when the calculated

value is reached, NOT if the value is beyond my calculated borders. (The datasheet says the same)


//Now I generate an interrupt when my calculated value is reached

ADC0_CV1 = 0x6000;

ADC0_CV2 = 0x5000;


So, am I right just to switch the two values like this??

//Now I would like to generate an interrupt only when the ADC value is beyond my calculated area

ADC0_CV2 = 0x6000;

ADC0_CV1 = 0x5000;


That seems to work but I'm not able to verify it in the moment...

Maybe someone can say me the rules for generating an interrupt

based on the two CV values.