I am sending a chirp that sweeps form 20Hz to 500Hz to an audio codec, CS42L52, connected to an MCU, STM32F405, and I am receiving a "wavy" amplitude output. There is no processing on the MCU, I pass the signal straight from the DMA in to the DMA out. The DMA services the I2S lines. If I change the time that the chirp takes to get from 20 to 500 Hz, the amplitude wave changes its frequency.
This picture shows the chirp with a 10 second duration on top and 5 second duration on bottom, and shows that the amplitude frequency is twice as fast in the 5 second chirp vs the 10 second chirp.
Looking at the codec block diagram, it shows that I can bypass the MCU in two different spots. The first being right after the PGA inputs and the next after gain adjust and ALC.
Both of these pass to the codec's DSP and then out to the codec's DAC according to this block diagram.
When I pass the signal through either of these lines, skipping the MCU, the output has a constant amplitude as it should. The input signal is clean, no "wavy" amplitude. If I put one frequency through the device, no chirp, the amplitude stays constant. I have played with a lot of the settings on the codec and can't seem to find any that affect the amplitude wave. Maybe I am overlooking a setting? This almost makes me think it is an MCU problem, but I am not manipulating the signal at all on the MCU. Is it a problem that the DMA stores it as an unsigned integer? What could be the problem?
My sampling frequency is set at 48 kHz, but I measure it at 48.5 kHz, could this affect it?