ADAU1452
Production
The ADAU1452 / ADAU1451 / ADAU1450 are automotive qualified audio processors that far exceed the digital signal processing capabilities of earlier SigmaDSP...
Datasheet
ADAU1452 on Analog.com
ADAU1401
Not Recommended for New Designs
The ADAU1401 is a complete single-chip audio system with a 28-/56-bit audio DSP, ADCs, DACs, and microcontroller-like control interfaces. Signal processing...
Datasheet
ADAU1401 on Analog.com
Hello,
We did some research with the evaluation board of the ADAU1452 and we managed to implement some great delays that we were needing. We are now re-designing the SigmaStudio project (in older projects we used the ADAU1401 so we have had to start the project from scratch, using the newer blocks). We have found a very, very strange issue.When generating a sinewave (in our case we are using a 20kHz sine). We have reached a point where we went back to the origins and we are making a simple program just generating a 20KHz sinus with the "Sine Tone with Phase and Gain" block.
We are configuring the chip at 48KSamples, comunicating via I2S with an external codec (MAX98089) and, when it does not fail, the audio that is generated is OK. We even have had audio sent analogically to the codec, which sends this data digitally to the ADAU1452, made a silly volume change and gone back to the codec for outputting it analogically, and this configuration worked perfectly when the chip seems to work fine.
The problem we have found is that, randomly and without any clue on why sometimes this happens the generated frequency has components on 4KHz, 8KHZ and 16KHz. Also, sometimes it is worse and we have a bunch of peaks in the audible spectrum so the noise is awful. We have checked the SDATA_IN and SDATA_OUT signals along with the LRCLK and BCLK, we see no difference in timing nor mismatched edges. We have lowered the SPI speed for writting the program on the ADAU1452. We have tried to improve our GND paths on our PCB. None of these attempts have resolved the problem. We are out of ideas of what to test/try, so we come here for some advice on how to solve this problem.
Thanks in advance,
Manuel
Here I add some images from the oscilloscope. There is an image where the 20KHz is cristal clear, another one with the 4KHz, 8KHz and 16KHz tones, and the noisy output that sometimes appears.
Hello Manuel,
Thanks for your detailed post and pictures which are very helpful in understanding your issue. I will try reproducing it.
In the meantime, I want to share a post that explains how the DSP is producing a sine wave in the digital domain. Dave has experimented with this and written a very detailed post. You can see why this aliasing is happening and how it's manipulated with the input frequency, the factors etc.
He explained it in a great way and also showed us the FFT spectrum to understand it clearly. please have a look at the below post.
RE: SigmaDSP Internal Oscillator Quality
Regards,
Harish
Hello Manuel,
Thanks Harish for the good response. I will just add a few comments.
What is interesting is that the alias from a 20kHz signal when sampling at 48kHz will fold around the 24 kHz line. So 24kHz - 20kHz = 4kHz and the 8K and 16K are harmonics.
When sampling at 48kHz rate and if you put in a 24kHz signal this means that the 24kHz has exactly two samples to represent the waveform. This will be a very distorted waveform. It will not be a clean sign wave until you filter it afterwards. The level error will depend on when the zero crossing is in relation to the sampling clock edge.
So a 20kHz signal is not all that much better. It will be 2.4 samples every cycle of the 20kHz signal. The level error will drift and change slightly depending on the phase difference between the 20kHz and the sampling rate.
If you want to reduce the distortion a little you can try the peak filter trick I showed in that older post but at 20kHz it might not make that much of a difference.
Reading your post I had a little bit of a hard time figuring out your signal flow of how it was going out and back into the DSP? It seemed that you did use an analog output of the eval board which means it went through a codec. That adds some complications. I showed that in that old post.
It would be interesting to learn about your application and why this is causing problems for you?
Dave T
Hello David,
As always, many thanks for your detailed answer. We will try your proposal today so I will update later on. On our design, originally we have a couple of analogic inputs that come to the MAX98089, they are digitalized and sent in I2S format to the ADAU1452, we had our block internally and then the digital output was sent back in I2S format to the MAX98089 and ouputed analogically. When facing this problem, we have reduced our program to just the ADAU1452 generating internally the 20khz tone and then outputing it via the MAX98089.
Previously we had a very similar product (the base of this project) that used an ADAU1401 also at 48KHz and we did not face this problem (and we are generating tones of 20kHz @-3dB continuously through different sized speakers). The aliasing theory is consistent with what we have, but it doesn't explain why this effect appears and before it was working perfectly. Nevertheless, the other effect with the bunch of strange peaks/harmonics, I guess it is not answered by this theory.
Today we will continue trying to figure out the origin of this problem and the possible solution, but if you have any other idea of where the origin of this problem may be, please do not hesitate to write a reply.
Many thanks,
Manuel
Hello again,
We've solved the problem by making the MAX98089 the controllerof the LRCLK and BCLK clocks, and the ADAU1452 the target. I do not know why, but it sees that sometimes when it was initialized the PLL auto-lock function of the MAX98089 was not working properly, and this change makes it work seamesly.
Again, many thanks for your time and your effort on explaining those possible sources for this problem, it has been really instructive even when the solution was elsewhere.
Best regards,
Manuel