T3.5 Using ADC-PDB-DMA question

Status
Not open for further replies.

uuryuu

Member
Hello,

I am trying to get the teensy 3.5 to record 1 ADC channel at 48khz using the PDB and then transferring the data using the DMA every 1 minute with a timestamp to SD card.

I've been successful in using the ADC,PDB,DMA and SD.It works sorta....which is nice!

FOR some reason im having trouble getting it to record 1 minute files.

After trying to debug I find that my ADC is recording at 126khz even though PDB is set to 96khz. And since im averaging every 2 samples I should have 48khz samplerate right?

Now how do I find my ADC samplerate?
-toggle digital pin high/low and use oscilloscope
-feed a 1khz sinewave using func. generator into ADC input......(if I had a 48khz samplerate w/ a 1khz sinewave being fed into it, I should have 48 samples per sinewave...but I dont, I have 126) why is this???? code below


And also note I got most of code from:
https://forum.pjrc.com/threads/24492-Using-the-PDB-on-Teensy-3
 

Attachments

  • teensy_adc_PDB_dma.ino
    7.5 KB · Views: 36
Status
Not open for further replies.
Back
Top