AnsweredAssumed Answered

nucleo-F746ZG I2S example

Question asked by venn.rick on Sep 13, 2016
Latest reply on Sep 14, 2016 by FTITI.Walid
Hi all,

I'm trying to use the NUCLEO-STM32F476ZG board as an i2s-connected host platform for some prototype C++ DSP code.

We are having trouble running the i2s example in STM32Cube_FW_F7_V1.4.0 :
Projects/STM32F746ZG-Nucleo/Examples/I2S/I2S_DataExchangeInterrupt/

The goal would be to implement a framework which initially echoes i2s data from one port to another, but where one could also process the incoming i2s stream with our DSP code, before passing output from that code to the outgoing i2s stream.  The example mentioned above has a couple of problems:
- eclipse project seems to be broken, both attempting load it on windows and linux pc.
- after importing the source files from that project into a new project, we can't see how to generate or receive i2s signals with that evaluation board.
- we can do basic LED-banging for debug
- after calling HAL_I2S_Transmit_IT(&I2SHandle, I2S_Buffer_Tx, 32), the callback HAL_I2S_TxCpltCallback is never triggered, so main loops endlessly on while (TransferState ==0);
- we also tried to combine the code from this example with a generated template using the cube project generator and observed the same problem of non-triggering callback
- we tried using the polling-mode io HAL_I2S_Transmit and #define I2S_MASTER_TRANSMITTER in that example code, but all pins on the evaluation board are totally silent

Can anyone provide a working i2s example along the lines described above (i2s echo)?  There could be some #define to toggle between i2s master mode and i2s slave mode - in i2s master mode the board could output suitable master clocks for DAC/ADC.  In slave mode, we would use external clock generator and connect i2s bitclock & wordclock to the appropriate pins.

Don't think it actually matters much whether using DMA, IT or polling style - just looking to get something up and running for now!

Outcomes