2020-02-23 04:50 PM
Hi.
HAL_I2S_Transmit_DMA() and HAL_I2S_Receive_DMA doesn:'t work simultaneously. As a result, programmer cannot use I2S TX and RX together in the STMH7 Duplex I2S.
Attached screenshot points where the API returns error, and the attached project demonstrate the problem on Nucleo H743ZI.
In this program, I2S1 is configured as duplex master. Thus, TX and RX functions are available. The program checks the return code from API and display on LED.
LED2 (Blue) tests the TX API.
LED2 (Red) tests the RX API.
You can see the Blue LED turns on and Red LED blinks. If you remove the TX API call from program, RX API works well. Thus, this is interference of the both APIs.
Please check and fix.
2020-02-24 03:10 AM
I don't use 'H7 and I don't use Cube/HAL, but isn't the SPI/I2S module simplex?
You may want to have a look at SAI.
JW
2020-02-25 10:57 AM
The DS may be wrong... RM suggests the I2S in SPI can work in duplex.
But there may be obstacles in Cube/CubeMX:
JW
PS. @Imen DAHMEN , can you please verify if the 'H743 I2S can indeed be used in Duplex, and if so, perhaps correct in the DS?
2020-02-27 12:47 AM
Hello,
Thanks for the report.
We are aware of this limitation: I2S Full duplex Transmit/receive feature is not supported by the STM32H7 HAL Driver.
We have already listed this issue and it will be fixed in the coming releases of cubeH7 firmware package.
I will check the document and raise your feedback internally to the STM32CubeIDE team, then I come back to you soon with update.
Best Regards,
Imen
2020-02-27 05:21 PM
Hi Imen,
Thanks for the report on CubeID.
But, I mean, the DS, as in my first post above, says the I2S is only simplex, whereas according to RM, it appears to be duplex.
Can the DS be please checked and corrected if needed?
Thanks,
Jan
@Imen DAHMEN
2020-02-28 05:40 AM
Hi Jan,
I confirm, the datasheet is wrong. I raised your request to correct the STM32H7 Datasheets.
For example, rephrase as follow: “They can be operated in master or slave mode, in simplex or full-duplex communication modes.�?
Best Regards,
Imen
2020-02-28 05:43 AM
Thanks, Imen!
Jan
@Imen DAHMEN
2020-02-28 06:33 AM
Thanks, Imen
Takemasa
2020-11-13 03:23 PM
Sorry to revive an old thread but I'm having similar difficulties in getting full duplex i2s working with DMA on the H7 as well. Has this been fixed?
With hi2s1.Init.Mode = I2S_MODE_MASTER_TX, neither the TX or RX callbacks get called.
With hi2s1.Init.Mode = I2S_MODE_MASTER_RX, the RX callback gets called and my RX buffer gets copied into my TX buffer but nothing gets out.
2020-11-15 02:54 AM
It has a I2S_MODE_MASTER_FULLDUPLEX mode. But take a note that the HAL team is generally incapable of understanding asynchronous software design and the related issues...