My project used a CODEC device works with BCLK 3.072 MHz, WS 16 kHz, i2s master role, 16-bit data word length, no gain and right justified digital audio input format. I configured ESP32-C3 works as an I2S slave, Standard Mode MSB format and its pins is connected to the corresponding pins of the CODEC device. Unfortunately, when i use ESP32c3 to send a 1kHz sine wave to the CODEC device, the wave at the output of CODEC device is more than 2kHz. I used oscilloscope to check waveform of BCLK, WS, and Dout pin. I recognized that there are some issues at Dout pin (the line that ESP32C3 sent data to CODEC device). In theory, there will be 96 BCLK ticks in one channel (slot), if BCLK is 3.072 MHz and WS is 16 kHz. These were correct. However, Dout pin was wrong. It sent three 32-bit values in one slot instead of one 96-bit value in one slot. I turned off the CODEC device and reconfigured ESP32C3 to work as I2S master with BCLK, WS, Dout pin (just like I have configured the CODEC device) to check what really happened. Surprisingly, it does not appear at all in the WS pin of ESP32C3 while Dout is still 32-bits data and BCLK is about 2MHz.
Please guide me how can I configure I2s for ESP32C3 and send data via I2S as desired ?
The following is my I2S configuration for ESP32C3.
Error when ESP32C3 works as I2S slave
Error when ESP32C3 works as I2S slave
- Attachments
-
- I2Scfg.png (23.33 KiB) Viewed 4837 times
Who is online
Users browsing this forum: Bing [Bot] and 76 guests