Decimation - Output sampling rate
Hi,
I have adau1452 sigmaDSP on an A2B chain and this dsp streams data to the host (SC589-SAM).
The adau1452 receive samples from an accelerometer and is programmed with a decimation block via sigma studio.
The decimation block factor is 16 so I should get a 3khz sampling, after the decimation the down sampled data is transmitted from the adau1452 outputs to the A2B chain.
My question is, does the adau1452 transmit 1 sample every 333 microsec (1/3khz) or transmit in 48e3 but pad it with 15 zeros and 1 valid sample?
If it transmits 1 sample in 3khz, what happen in the meantime? does the upstream data slot assumes the adau1452 transmit zeros?
Thanks,
Sagi
Edit Notes
add
[edited by: SagiS at 8:49 AM (GMT -4) on 15 May 2023]
Audio Signal Processors
adau1452
a2b
downsample
software
sample rate
output
sigmastudio
SigmaDSP Audio Processors
sampling_rate
downsampling
SigmaDSP
decimation
Show More
Hello SagiS,
The ADAU1452, and all of the SigmaDSP parts, compute the algorithm once per sample period. Multirate processing is done by executing the algorithm once every N samples, where N is the under-sampling ratio.
I will quote Dave's response on down sampling here.
The way the down-sampling works is like this. The main DSP program runs every sample period then performs NOPs until the end of the frame. If you are down-sampling by four then the lower sample rate's program code is divided up into four chunks and is run after the main code is complete for the frame. So when the main code is done, there is a context save and context loading of the lower rate and then it executes instructions up to the end of the frame where it saves its context and loads in the main program context ready for the start of the next frame. So it takes four frames for the result of the lower sampling rate to be ready and so it is running at half the rate.
You can search the forum for multirate processing, and you can find many posts and info on the same.
Regards,
Harish
Hello Sagi,
It would be helpful to see what you are doing after the decimation block and the filter? Are you sending this data directly to the output serial port without upsampling back up?
The upsampling blocks have a choice of zero order hold or zero insertion. But, based on what you wrote I will make the assumption that you are directly sending the downsampled data out to the serial port.
The serial ports and the core are all independent objects so it is up to you to setup the sampling rates so samples are not missed or picked up several times. The program is runs, in your case you get a sample at a 3kHz rate. The core will update a memory address that is the core output at a 3kHz rate. However, the serial port is probably running at a 48kHz rate. So the serial port will go to the memory address to obtain its output sample. Then it sends it out. Next sample period it will go to the memory address and pick up the next sample. The serial port has no idea it was the same sample. It will do this 16 times before the core updates the value.
The serial ports, the ASRCs, the SPDIF, and the core all operate on their own clocks as independent objects. This can be a problem but it also makes it super flexible.
So the answer in your case will be the same sample will be repeated 16 times before it changes.
Dave T
Please log in to reply.