Read from I2S without blocking call
Posted: Fri Mar 22, 2019 9:04 am
There are various examples how to read from an I2S microphone. eg: https://github.com/maspetsberger/esp32-i2s-mems
However, they all are using i2s_read() https://docs.espressif.com/projects/esp ... TickType_t which works perfectly fine but always blocks until the specified byte size has been read.
This is ok if you want to read a block of samples just for testing purpose, but for a real device I would expect to kick of the reading and would expect to get a call to an ISR everytime a block of samples has been transferred by the DMA.
Any idea how to achieve this?
What we have right now is a DMA that moves data from i2s peripheral to memory, but it blocks my operation in the main-loop.
I would expect the DMA not to blook my main loop.
However, they all are using i2s_read() https://docs.espressif.com/projects/esp ... TickType_t which works perfectly fine but always blocks until the specified byte size has been read.
This is ok if you want to read a block of samples just for testing purpose, but for a real device I would expect to kick of the reading and would expect to get a call to an ISR everytime a block of samples has been transferred by the DMA.
Any idea how to achieve this?
What we have right now is a DMA that moves data from i2s peripheral to memory, but it blocks my operation in the main-loop.
I would expect the DMA not to blook my main loop.