mirror of
https://github.com/bdring/Grbl_Esp32.git
synced 2025-09-01 18:32:37 +02:00
Fix unintended 0 data when I2S restart
This commit is contained in:
@@ -244,6 +244,8 @@ static int i2s_start() {
|
|||||||
I2S0.conf.rx_reset = 1;
|
I2S0.conf.rx_reset = 1;
|
||||||
I2S0.conf.rx_reset = 0;
|
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];
|
I2S0.out_link.addr = (uint32_t)dma.desc[0];
|
||||||
|
|
||||||
// Connect DMA to FIFO
|
// Connect DMA to FIFO
|
||||||
@@ -253,6 +255,8 @@ static int i2s_start() {
|
|||||||
I2S0.out_link.start = 1;
|
I2S0.out_link.start = 1;
|
||||||
I2S0.conf.tx_start = 1;
|
I2S0.conf.tx_start = 1;
|
||||||
|
|
||||||
|
I2S0.conf1.tx_stop_en = 0; // BCK, WS start to work
|
||||||
|
|
||||||
I2S_EXIT_CRITICAL();
|
I2S_EXIT_CRITICAL();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user