Skip to content

I2S with INMP441 on ESP32-C3 #3005

Answered by bjoernQ
ksmarty asked this question in Q&A
Jan 21, 2025 · 2 comments · 4 replies
Discussion options

You must be logged in to vote

A few things to note here:

  • you are using the non-async API in an async application - that will become a problem later but it's not causing a problem here
  • let (mut rx_buffer, rx_descriptors, _, tx_descriptors) = dma_buffers!(0, 4 * I2S_BYTES); - you are creating an RX buffer of size 0 - that's the problem here, you probably want let (mut rx_buffer, rx_descriptors, _, tx_descriptors) = dma_buffers!(4 * I2S_BYTES, 0); (note the changed order of parameters)
  • println!("{:?}", &rcv[..avail]); is pretty slow and will result in a situation where you won't be able to pop the read data fast enough - for this simple example you can work around by just printing a smaller part of the buffer, e.g. prin…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@ksmarty
Comment options

@ksmarty
Comment options

@ksmarty
Comment options

@bjoernQ
Comment options

Answer selected by ksmarty
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants