Achieving max ADC sampling rate on the K60

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Achieving max ADC sampling rate on the K60

1,718 Views
BernardSeller
Contributor I


I am trying to achieve the maximum sampling rate of 818.330 ksps for the K60

the "K60P144M100SF2 K60 Sub-Family Data Sheet" state that this is for the following conditions

  • ≤ 13 bit modes
  • No ADC hardware averaging
  • Continuous conversions enabled, subsequent conversion time


so I have 2 questions

1) Could you point me to a reference explaining clearly what the ADC continuous mode is?
    - trigger once and then it keeps going, generating an interrupt after each measurement is complete ? no hw average
    - how do you stop it?
    - if you start 2 channels at the same time, will the measurements stay "synchronized"?
    - ...   

2) Do you have a sample project that shows how to achieve this sampling rate?

 

thanks

 

Bernard

3 Replies

667 Views
hubje3
Contributor II

Have you found any information on this?  I have found in a couple of different places where it is stated that a couple of the ADC inputs are routed to both internal ADC's (on the K60) and the samples can be interleaved for a higher sample rate.  But other than stating that it can be done I have found no documentation reporting how it is done or if there is a way to synchronize the two ADC's with each other.

 

Thanks

0 Kudos

667 Views
dan_quist
Contributor III

Are you using MQX? The MQX A/D driver is worthless. Seems like there's a lot of issues with it and I've seen aboslutely no support for it on the forums.

0 Kudos

667 Views
hubje3
Contributor II

A couple things I have learned about the ADC, first, each channel is capable of the full speed stated in the manual and you do not need to interleave the samples in order to get that speed.  In order to actually retrieve the data that fast you will have to use DMA, even an ISR based driver isn't going to be fast enough.

Second, in order to get that full speed you need to have an 18 MHz clock driving the ADC, that means your system has to be running at a multiple of 18 MHz (i.e. 72 MHz).  I can't remember if there is an option for an external clock, but that might be an option to run the system at 100MHz and still have the full speed of the ADC.

Using a custom ADC driver with MQX the sample rate of my system is about 700ksps with the limiting factor being the clock driving the ADC (my system is running at 96MHz).

 

-Jeremy