Page 3 of 3

Re: ADC glitchs - I2S - ESP32

Posted: Mon Aug 13, 2018 7:51 am
by DylanR0
Hello

I understand your 1/2. If it' already connected it's ok, if not, you try to connect and if it's okay you return true else you return false and you retry.
For the 3, it's a good idea.
The 4, why the read call is blocking the queue ? Can we remove it just like that ?
For the 5, ok it's what I understood.
And for the 6, it's ok like you saif because of the test before.

I tried with the code in raw, modifying the "connect = false" to "connected = false" in the loop with the test on sending.

2Buffers - 512 length.
Glitchs are always here.

I tried then with 3 buffers but couldn't go in the loop after the xEvent. Same for 4 buffers. (Edit : Nevermind, I just have to restart all [TCP listen, power supply] to have it works but still glitchs, no difference)
.

Re: ADC glitchs - I2S - ESP32

Posted: Mon Aug 13, 2018 2:11 pm
by fly135
Unfortunately, when putting both the TCP send and the I2S read in the same task you are potentially going to lose data and get glitches. I would increase the DMA size from 512 to 1024 and try to add more buffers. If you can't add enough DMA memory then the next step is to allocate buffers from non DMA ram and run the TCP send in a separate task with a queue in between the two tasks.

John A

Re: ADC glitchs - I2S - ESP32

Posted: Mon Aug 13, 2018 5:41 pm
by DylanR0
Okay, I see..
I'll try to gather some informations about multithreading.
Thank you !