cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with i2s

guidoglorioso01
Associate II

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:

guidoglorioso01_0-1702841431168.png

 

guidoglorioso01_1-1702841444427.png

guidoglorioso01_2-1702841454891.png

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

 

 

2 REPLIES 2
MM..1
Chief II

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.

MM1_0-1702928952368.png

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

AScha.3
Chief II

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.

If you feel a post has answered your question, please click "Accept as Solution".