Page 1 of 1

ESP32 I2S to parallel transfer

Posted: Sun Jun 19, 2022 9:16 am
by daonguyen_iot47
Hi !
After referencing the example at https://github.com/willz1200/i2s_parallel_queued. I was able to stream 1 array of data out to a parallel bus via dma. However dma transmits data continuously, I want the transmission to stop automatically once it's done and call an interrupt.
I didn't find any such example !

Re: ESP32 I2S to parallel transfer

Posted: Sun Jun 19, 2022 7:13 pm
by Demirug
The sample already calls an interrupt when a frame is finished: i2s_int_hdl. This is done for each dma descriptor where the eof flag is set.

To stop it from sending continuously you need to break the ring of dma descriptors. this rring is configured in lines 208 to 212. As you can see there the last descritor set the first as next. To stop the transfer you need to set the next buffer of the last data package to 0