1
0
mirror of https://github.com/bdring/Grbl_Esp32.git synced 2025-09-01 02:21:46 +02:00

Fix unintended 0 data when I2S restart

This commit is contained in:
odaki
2020-04-25 22:21:59 +09:00
parent 5f16050312
commit 78e001e6df

View File

@@ -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;