Mark Butcher

Selective ADC sampling on Kinetis

Discussion created by Mark Butcher on May 14, 2015

Hi All

 

I have noticed that this has never been discussed in any forum post so thought it worth mentioning in case it is not generally known/used.

 

The Kinetis ADC contains value comparators which allow it to selectively sample input data depending on its input value. This means that the user can define that only samples above a certain analoge level should be recognised or values below a certain level. Furthermore, the same can be done for input values outside or inside of a range (eg. only values between 2.00V and 2.50V should be recognised, or only samples outside of this range).

 

If such a mode is configured the ADC is in fact operating autonomously but will only actually save the value if it is within range, meaning that it will also only inform the processor that the conversion is ready (interrupt) in this case.

 

The ADC operation, monitoring analoge values and/or ranges, can also continue when the processor is in a low power mode, which allows the processor to only be worken when an input in a certain range is sampled.

For example, if an analoge input is to be monitored which the procssor is only interested in when it exceeds a threshold the ADC can be configured to autonomously monitor this and only interrupt the processor when the threshold has actually been exceeded. This removes the need for the processor to poll the value and check against a limit condition (or a range) but provides immediate interruption as soon as the condition is detected by the ADC as being true.

 

The use of selective ADC triggering is documented also in the following uTasker user's document (chapter 2), showing how it can be very simply used:

http://www.utasker.com/docs/uTasker/uTaskerADC.pdf

The uTasker simuator alows the use of selective ADC triggering to be accurately simulated in complete project code.

 

Regards

 

Mark

 

P.S. There is a reference application for the standard TWR-K60N512 showing selective ADC trigger opertion at µTasker Kinetis TWR-K60N512 support

 

Kinetis: µTasker Kinetis support

ADC/DAC: http://www.utasker.com/docs/uTasker/uTaskerADC.pdf

For the complete "out-of-the-box" Kinetis experience and faster time to market

Outcomes