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-11-15 09:13 AM
@Piranha AH! You're right, it does! The funny thing though is that I did set up my I2S as "Full duplex master" in Cube and yet it put the Mode as I2S_MODE_MASTER_RX.
I'll give it a try today - I mean, it works well on the F4!
Thank you
2020-11-15 03:55 PM
@Piranha It works! I had to set the mode to Full Duplex Master and Transmission Mode as Master Transmit and *then* go and change hi2s1.Init.Mode = I2S_MODE_MASTER_FULLDUPLEX; in the init code.
That's very weird. I'm relatively inexperienced with STM32 and I would imagine that I will eventually rely less on Cube but for now, I'm just happy that it finally works.
Thank you!