Problem with sampling using ADC via DMA

LenStruttmann
Posts: 1
Joined: Wed Jan 04, 2023 8:37 pm

Re: Problem with sampling using ADC via DMA

Postby LenStruttmann » Wed Jan 04, 2023 8:43 pm

I, too, am having the problem of interwoven data. The suggestion of manually powering down the apll and then powering it up after all the config functions have been called did NOT work for me.

Is there a solution to this?

For now, my workaround is to re-order the data:

Code: Select all

for (int i =0; i<NUM_SAMPLES; i=i+2)
      {
        output_buffer[i] = (float)(i2s_read_buff[i+1] & 0xfff);
        output_buffer[i+1] = (float)(i2s_read_buff[i] & 0xfff);
      }

fengcai
Posts: 1
Joined: Sat Nov 09, 2024 2:22 am

Re: Problem with sampling using ADC via DMA

Postby fengcai » Sat Nov 09, 2024 2:26 am

I'm doing FFT using adc & i2s, with sample rate 8K and 16K, the result is not correct. by setting sample rate to 44100, everything works fine.

for 16bits data, words swap is mandatory as well.

Who is online

Users browsing this forum: Bing [Bot] and 188 guests