Skip to content

Commit

Permalink
Fix I2S output on Teensy 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulStoffregen committed Aug 29, 2019
1 parent d1f6bdc commit 7be225e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion output_i2s.cpp
Expand Up @@ -66,6 +66,7 @@ void AudioOutputI2S::begin(void)
dma.TCD->BITER_ELINKNO = sizeof(i2s_tx_buffer) / 2;
dma.TCD->CSR = DMA_TCD_CSR_INTHALF | DMA_TCD_CSR_INTMAJOR;
dma.triggerAtHardwareEvent(DMAMUX_SOURCE_I2S0_TX);
dma.enable();

I2S0_TCSR = I2S_TCSR_SR;
I2S0_TCSR = I2S_TCSR_TE | I2S_TCSR_BCE | I2S_TCSR_FRDE;
Expand All @@ -85,13 +86,13 @@ void AudioOutputI2S::begin(void)
dma.TCD->CSR = DMA_TCD_CSR_INTHALF | DMA_TCD_CSR_INTMAJOR;
dma.TCD->DADDR = (void *)((uint32_t)&I2S1_TDR0 + 2);
dma.triggerAtHardwareEvent(DMAMUX_SOURCE_SAI1_TX);
dma.enable();

I2S1_RCSR |= I2S_RCSR_RE | I2S_RCSR_BCE;
I2S1_TCSR = I2S_TCSR_TE | I2S_TCSR_BCE | I2S_TCSR_FRDE;
#endif
update_responsibility = update_setup();
dma.attachInterrupt(isr);
dma.enable();
}


Expand Down

0 comments on commit 7be225e

Please sign in to comment.