diff --git a/Grbl_Esp32/i2s_ioexpander.cpp b/Grbl_Esp32/i2s_ioexpander.cpp index c674e2b8..693c0c24 100644 --- a/Grbl_Esp32/i2s_ioexpander.cpp +++ b/Grbl_Esp32/i2s_ioexpander.cpp @@ -244,6 +244,8 @@ static int i2s_start() { I2S0.conf.rx_reset = 1; I2S0.conf.rx_reset = 0; + I2S0.conf1.tx_stop_en = 1; // Prevent unintentional 0's at the start of I2S + I2S0.out_link.addr = (uint32_t)dma.desc[0]; // Connect DMA to FIFO @@ -253,6 +255,8 @@ static int i2s_start() { I2S0.out_link.start = 1; I2S0.conf.tx_start = 1; + I2S0.conf1.tx_stop_en = 0; // BCK, WS start to work + I2S_EXIT_CRITICAL(); return 0;