STM32Cube IDE STM32F4 Discovery board I2S DMA
Hi All
Trying to get an understanding of how I2S with DMA works using the STM32Cube IDE by implementing a simple audio loop-through application.
Connected the STM32F407G Discovery board to a Digilent PMOD I2S2 codec and set up using the STMCube IDE GUI as follows: PC2 = I2S2_ext_SD, PC3 = I2S2_SD, PB10 = I2S2_CK, PB12 = I2S2_ WS and PC6 = I2S2_MCK
I2S2 set as: Full-Duplex Master with Master clock output enabled.
Parameter settings: Mode Master Transmit, I2S Philips, 24 bits on 32 bit frame, 96kHz, I2S PLL Clock, Polarity LOW.
DMA settings: I2S2_RX, Circular buffer, DMA1 Stream 3. I2S2, Circular buffer, DMA1 stream 4.
I2S clock set to give sampling frequency of 96kHz.
Added the buffer definitions, DMA startup code and the half and full callbacks to main program.
Everything works as expected.
Next, tried the same trick with the L-TEK audio board (codec) connected to the Discovery.
Same basic IDE setup except I2S2_CK = PC13 (pre-wired connection to codec) and I2S clock set to give sampling frequency of 48kHz. Also using 16bit data on a 16 bit frame.
Added code to set up the TLV320AIC23B codec on the L-TEK audio board. The I2C data is reaching the codec's registers because I can set the bypass mode where input is directly routed to the output, bypassing the codec itself (no read registers on the codec, so can't check that way).
The system does not appear to be receiving data into the receive buffer. Putting dummy data into the receive buffer does produce output so the output side is working.
The clocks are all there (checked on a 'scope) and the full and half full call backs are being fired.
Anybody any idea what I'm doing wrong - any help appreciated ?