Description
Environment
- Development Kit: NodeMCU + PCM1502A I2S DAC
- IDF version (
git rev-parse --short HEAD
to get the commit id.): Release/v3.3 (GIT8266O-490) #917 (release/v3.3) as well as master
//483a5a475c7afdf3336c66fa279c70de4bb8b750 - Development Env: Eclipse
- Operating System: Ubuntu
- Power Supply: USB + external 5V
Problem Description
I have no output from on I2S. I'am using official example:
https://github.com/espressif/ESP8266_RTOS_SDK/tree/master/examples/peripherals/i2s
Using i2s_write( )
function is hanging until timeout occurs without writing data into DMA Queue
Every time i2s_bytes_write
is 0
Expected Behavior
Triangle and sine 100Hz wave on I2S DAC output
Actual Behavior
When Debug message level is set to INFO, serial monitor output is as expected:
Test bits=24 free mem=78188, written data=2880
I (5655) i2s: DMA Malloc info, datalen=blocksize=480, dma_buf_count=6
Test bits=16 free mem=78188, written data=1440
I (10735) i2s: DMA Malloc info, datalen=blocksize=240, dma_buf_count=6
Test bits=24 free mem=78188, written data=2880
I (15835) i2s: DMA Malloc info, datalen=blocksize=480, dma_buf_count=6
Test bits=16 free mem=78188, written data=1440
I (20915) i2s: DMA Malloc info, datalen=blocksize=240, dma_buf_count=6
but only reason why in this example is running is break
on timeout in `xQueueReceive'
ESP8266_RTOS_SDK/components/esp8266/driver/i2s.c
Lines 748 to 771 in cbfad90
If You pass portMAX_DELAY
as ticks_to_wait
function i2s_bytes_write
will hang forever
When DEBUG info is enabled there should be info about samples write
like :
D (20915) i2s: size: 256, rw_pos: 16 , buf_size: 256, curr_ptr: 256
but there is no output like that.
Steps to repropduce
- Compile and run i2s example: https://github.com/espressif/ESP8266_RTOS_SDK/tree/master/examples/peripherals/i2s
- Set log verbosity to DEBUG
- Run again 'monitor` with debug info: no DMA write