ESP32 I2S to parallel transfer

daonguyen_iot47
Posts: 3
Joined: Thu Jun 09, 2022 8:07 am

ESP32 I2S to parallel transfer

Postby daonguyen_iot47 » Sun Jun 19, 2022 9:16 am

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 !

Demirug
Posts: 11
Joined: Fri May 28, 2021 12:54 pm

Re: ESP32 I2S to parallel transfer

Postby Demirug » Sun Jun 19, 2022 7:13 pm

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

Who is online

Users browsing this forum: joe_fang_iD, Majestic-12 [Bot] and 295 guests