cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX STM32H743 I2S Half Duplex Master

FDixo
Associate III

We have an issue with CubeMx and the I2S port. We set the port up as Half Duplex Master (so that the master clock goes out) and then in Configuration set the type to Master Receive. All good except that the two pins shows are CK and SDO. I am not sure how ST expects data to be received on the SDO pin.

In the end, we set the type to Full Duplex Master and then we connected to the SDI pin. Any chance of getting this fixed in the next version?

7 REPLIES 7
Khouloud GARSI
Lead II

Hi @FDixo​ ,

Thanks for your feedback.

This is reported internally for further check. We will update you ASAP.

Just to be sure, are you using the last updated version of STM32CubeMX (V4.26.1)?

Khouloud.

Cyril FENARD
ST Employee

Hi @FDixo​ ,

Did you try to change IOSWP bit in SPI_CFG2 register? (Details can be found in RM0433)

hi2s1.Init.IOSwap = I2S_IO_SWAP_ENABLE;

Regards.

Cyril

FDixo
Associate III

Hi Cyril, we have given up on the H7 - it looks like there are too many issues with the H7 to make it viable to use for a project. The documentation and examples are very lacking. Thanks

Khouloud GARSI
Lead II

Hello @FDixo​ ,

Really sorry to hear your feedback.

Could you please precise what documentation/examples you needed but you didn't find.

Maybe I can help with that!

Khouloud.

FDixo
Associate III

With the H743, there was no example for DFSDM, SAI or I2S. There was an example with the Eval board for the H743 but we could not get it to compile. It turns out later, that Atollic has issues with long path names but does not issue any error message or add the necessary "\\?\" to the filename which would fix this issues. Also, when we did actually get an I2S program to run, the data stream was unreliable with lots of random zeroes.

Cyril FENARD
ST Employee

Hi @FDixo​ ,

Set "Io Swap Enable" in "Advanced Settings" of the configuration for SPI in CubeMX, if you want to use SDO as input for the half-duplex master receiving data on an SDO physical pin.

Also note that I asked for improvements to force Io Swap in case of half-duplex configurations. This is planned for the next version of CubeMX.

Regards.

Cyril

TGamb.1
Associate

Hello Cyril and FDixo,

I am having the same issue. I am running a STM32 H742ZI and CubeIDE v 1.4

I am trying to have I2S DMA Half Duplex Master Receive. When I select this mode, the SDO pin gets configured automatically, and IDE won't let me select SDI instead (it remains yellow and says "no mode"). I have tried hard coding I2S_IO_SWAP_ENABLE but when compiling I get an error message saying that this parameter is not part of the hi2s3 Init class. I have also tried hard coding the GPIO config removing the SDO pin and adding the SDI pin, but without success.

I should add that looking at the clocks (MCK, CK, WS) on the scope those seem to be running as expected.

Any thoughts?

Thanks