2018-04-16 03:49 PM
I'm using the STM32F407 Discovery Board to implement a digital band pass filter, this board has a CS43L22 Audio DAC which I want to use for output, (not in analog pass through mode).
However, this seems to create a challenge as the data flow to the DAC must have a continuous clock signal from the STM32F407, so this means the DAC update rate sets the rate at which I'd need to sample using the STM32F4's on-board ADC.
Is there a clean mechanism / way to use an ADC on the STM, at an arbirtary rate (set by a timer used as a trigger source) and then do some filtering, then pass the data to the I2S DAC?
The only way I can think, is to have the CL43L22 clocked continuously at 'some' rate with data being sent over I2S being supplied from a couple of data (L and R channel) ram variables, which I update from my filter asynchronously (when its ready).
Is there a better way?
2018-11-11 02:37 PM
Hi could you solve that? I have same problem. In my project Im reading samples with the adc at 48Khz using timer interrupts and adcConvCallbacks, load them in a buffer of 256 samples and when the buffer is full I send it via i2s to the DAC . Im using two buffers, when the bufferA is full i send it and start saving samples in the bufferB, when its full I swap again so I have 256 samples available at any time.
My problem is that en every swap of buffers I heard a "plop" noise from the dac. Do you know how can I avoid that? It seems to sound at every time that a new buffer is sended via HAL_I2S_Transmit() . Im not using interrupts in the I2s, just call it at every time I have a full buffer.
2018-11-15 01:50 AM
kindly share the adc audio input code with me i am doing same type of work but dnt know how to get audio input to do further processing on it like band pass filtering.
thankyou
2018-11-15 03:21 AM
Yes of course, this is the code. I have another version using interrupts in the i2s transmition but i havent uploaded it to my github yet. Please let me know if you figure out how to eliminate the "plop". I think its becouse there is a sort of de-sinchronization in the buffers swap.
https://github.com/maximdorogov/Digital-Audio/blob/master/Src/main.c
2018-11-15 08:37 PM
would it work in Keil??? i want to use keil mdk using cube mx ???
2018-11-15 08:37 PM
2020-05-10 05:20 AM
Did you ever solve this issue?
D