AnsweredAssumed Answered

ADC hardware average with Timer trigger not counting all samples

Question asked by Vinay Kumar on Sep 4, 2018
Latest reply on Sep 13, 2018 by Kerry Zhou

Hello Community,

 

I have been working with Kinetis MK24FN1M0 microcontroller and performing ADC measurements. According to our requirement, the ADC has to perform measurements every 10µs. For this I have used the FTM timer 2 and configured it to trigger the ADC every 10µs. Then, we wanted to take an average every 32 measurements and generate an ADC Interrupt. To my surprise, the ADC with hardware averaging count of 32 is generating an interrupt every 175 µs . When I trigger and perform ADC measurements every 10µs and 32 ADC measurements should sum up to 320µs. But this is not working. Initially, I thought it was timer which was not working correctly, I disabled the hardware averaging and observed the interval betwen every ADC Interrupt. It is exactly 10µs. But as soon as I enable the Hardware Averaging, and check the interval between the Interrupts it is just 175µs.

 

I then changed the timer trigger interval to 1 ms, but the hardware averaging ADC interrupt shows up again after 175µs. I don't understand this behaviour.

 

I have even checked the ADC registers, if I have configured anything wrong but everything seems right with the configuration. I am very disappointed with the result and I would really appreciate if I could get the Hardware averaging working correctly.

 

Any suggestions in finding a solution to this problem would be of great help.

 

Thankyou!

Outcomes