How to get the exact time of ADC samples while using I2S DMA?

lockfield
Posts: 3
Joined: Wed Feb 24, 2021 10:12 am

How to get the exact time of ADC samples while using I2S DMA?

Postby lockfield » Sat Feb 27, 2021 10:10 am

Hi guys,

I'm trying to use ADC to sample a pulse signal with about 200kHz. It seems that the only way is to use I2S with DMA in such a high frequency.
However, in my understanding, ADC will continuously writing the DMA buffer automatically, and then we call I2s_read() to read the DMA buffer. So actually we don't know the exact time stamp of each ADC sample.
In fact, I want to get the exact start time of my pulse signal, is there any method?

By the way, I don't think i2s_config.sample_rate is the same with ADC sample rate, is that right? So how can we get the frequncy of signal that we sampled?

Who is online

Users browsing this forum: Google [Bot] and 50 guests