2021-12-20 04:34 AM
Hello,
I am trying to measure the adc cycle time with the help of an oscilloscope, what is the most precise and correct solution?, I would appreciate if you could help me what method should I follow to measure it.
2021-12-21 10:34 PM
let me talk about where 5.6 msps comes from.First, I set the resolution to 8 bits. Looking at the datasheet below, it appears to be 7.1 Msps at 50 MHz. My frequency is 40 mhz, so 5.6 msps. it seems there is nothing wrong with my settings but still i didn't get the result i wanted
2021-12-22 12:12 AM
Try DMA buffer that is larger than 1 sample, say 512 samples.
2021-12-22 12:38 AM
yes i did what you said and tried adc in continuous mode with dma for 100 samples. I really got the expected results.When I ran it for a single sample, I saw that it was slow again. What is the reason for this?
2021-12-22 01:07 AM
DMA and ADC are probably designed without considering case of using single sample and circular mode. Not sure if this case even covered in reference manual. I can only speculate that in circular mode something is not ready yet for overwriting the same memory area, so additional cycles are inserted. Or GPIO toggle operations takes some time. You may try set "optimize for size" or "optimize for speed" to see if sampling rate changes with optimization level, it would mean that interrupt processing is congested and some ADC interrupts are lost.