This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

caputer audio from codec with i2s master for 10 seconds?

my project need to recording audio data from codec continius for more than 10 senconds.i want use nrf5340 to do it.

the codec is tlv320aic3109 or wm8731.I have looked  “easydma and i2s" chapter  of nrf5340 datasheet.

Then i found a question about if is it possible to recording 10 seconds continius audio data with 44.1khz using i2s interface?

for example:

 i use a buffer[4096]  to receive 44.1khz frequence audio data,when the buffer is full,i2s automatically stoped.i have to trigger again to start the sample.

thus the continus process is interrupted.

Is my thinking correct?

Parents
  • Hi

    Most of the EasyDMA implementations are double buffered, which allows you to configure the next buffer while the current buffers are being read/written. This means that as soon as the first buffers fill up the I2S peripheral will automatically switch to the next set of buffers, ensuring that there is no gap in the communication. 

    You just have to provide two sets of buffers in the application. 

    Best regards
    Torbjørn

  • i just understand the double buffer meaning. but i am not sure.Is it that mean below?

    when set the ptr register,after received ptr update event, i could set the ptr register that pointing to next buffer?

  • Hi

    Correct. The double buffer is internal, and you only access it through one TX and RX register. 

    When the TXPTRUPD/RXPTRUPD events occur it means the memory pointer is moved from the register to the internal buffer, which means you are free to write the next buffer pointer into the register. 

    Typically the sequence would be something like this:

    1) Write the pointer to the first TX and RX buffers into the registers. 

    2) Start the I2S peripheral. 

    3) Wait for the TXPTRUPD and RXPTRUPD events to occur

    4) Write the next TX and RX buffers into the registers

    5) Repeat from 3

    Best regards
    Torbjørn

  • Hi

    Whether the above steps have been automatically completed in the I2S driver of the zephyr project?

Reply Children
No Data
Related