Page 2 of 2

Re: Problem with sampling using ADC via DMA

Posted: Wed Jan 04, 2023 8:43 pm
by LenStruttmann
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);
      }

Re: Problem with sampling using ADC via DMA

Posted: Sat Nov 09, 2024 2:26 am
by fengcai
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.