ADC glitchs - I2S - ESP32

DylanR0
Posts: 12
Joined: Mon Aug 06, 2018 2:42 pm

Re: ADC glitchs - I2S - ESP32

Postby DylanR0 » Mon Aug 13, 2018 7:51 am

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)
.
Attachments
5KHz_1Vpp_600mVoff2.JPG
5KHz_1Vpp_600mVoff2.JPG (45.44 KiB) Viewed 3559 times

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: ADC glitchs - I2S - ESP32

Postby fly135 » Mon Aug 13, 2018 2:11 pm

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

DylanR0
Posts: 12
Joined: Mon Aug 06, 2018 2:42 pm

Re: ADC glitchs - I2S - ESP32

Postby DylanR0 » Mon Aug 13, 2018 5:41 pm

Okay, I see..
I'll try to gather some informations about multithreading.
Thank you !

Who is online

Users browsing this forum: No registered users and 61 guests