Fastest accurate sampling rate on teensy 3.2

Status
Not open for further replies.

Fjburgosf

New member
Hi everyone. This is my first post. Currently I'm using a teensy LC to sample an analog signal with frequency between 1 and 10Khz for the purpose of performing a FFT and calculate phase and magnitude at the defined frequency bin. For it, I use the interval timer library and am able to accurately sample with a 30 microsecond timer, with FASTRUN, 0 priority, and SCB_SHPR3 = 0x20200000, and using the Adc library example with interval timer made by pedvide. However, I now need to sample ac signals with frequencies up to 30Khz, and, when I lower the sampling period, i.e. myTimer.begin(function, 20 or 10 microseconds) a higher variance is induce in the phase calculation. I should note that I am not averaging adcs adquisitions for each sample. Only one sample point is taken for each value of my FFT array. For this reason, I would like to know if anyone knows if I will be able to sample at 60Kz (15 microsenconds timer interrupt) or more for oversampling purposes (at least 10 microsecons) on a teensy 3.2 without problems.

Thanks!
 
Make this call in setup() and see if it completes any faster: analogReadAveraging(1);

IIRC by default the internal hardware averaging does 4 reads per returned sample.
 
Hi. Yes. I am already using that instruction. I can sample at ten microsenconds with the teensy lc, but the results are not accurate. That is why I wanted to know if perhaps using a teensy 3.2 could solve that problem.
 
Status
Not open for further replies.
Back
Top