2023-12-18 11:30 AM
Hello, I am doing a project wich takes audio from an ESP32 via I2S, process it and then send bia i2S to an amplifier wich manage I2S signals as input.
HARD:
ESP32 (source of audio)
ST nucleo F401Re (processing unit)
Amp: MAX98357A.
I manage to make work pretty well the amplifier with the ESP (without the nucleo) .
Then i tried to recieve and transmit audio with the nucleo (only loopback) and some artifacks ocure.
NOTES:
audio freq 44.1kHz
2 channels
buff to receive and tansmit 1k len. (Using ping pong scheme)
IOC conf:
I see on another post that using the clock from link side could be not the best idea but in f401re there is no external cristal (i am trying to avoid add one if it is possible).
I nottice that filtering the signal with highpass frecuenccy the artifacts are reduce significantly.
One thing that i am not quite sure if it is okey is the clock from de I2S wich has some error (0.26%), but i could not change it to be exactly 44.1khz (i am triying to avoid HSI beacuse i think is worst).
It is okey my set up? or do i need to change some config/hard?
Thanks all
2023-12-18 11:51 AM - edited 2023-12-18 11:54 AM
Your Master send to amp require for ok MCLK and no error 44.1 external audio CLK.
Two choices maybe third is use ESP out as clk.
Choice 1 Use audio clock instead 8
Choice 2 External Input freq F401RE??... right freq is on image for 48kHz. For 44,1 use 11,2896MHz
2023-12-18 12:07 PM
ESP32 is source (web radio?) -> so this controls the timing ! (= master)
-> send to F4 (slave receiver) -filter or whatever- (slave transmittter, sync to receiver) -> send to amp;
this way it works without resampling and extra clocks.