cancel
Showing results for 
Search instead for 
Did you mean: 

Does the Nucleo STM32G431 have a bug with the I2S (receive)?

evenlund
Associate III

I am using the latest versions of STM32CubeIDE and updated firmware for STM32G431. I am trying to setup the Nucleo STM32G431 with I2S master for a microphone with DMA in circular mode, very similar to what "YetANotherElectronicsChannel" did in this video (just omitting the transmit part): https://www.youtube.com/watch?v=lNBrGOk0XzE.

I have made this work fine with the Nucleo F446RE, but when using the G431 only the HAL_I2S_RxHalfCpltCallback seems to be started. Moreover I get no data into the memory given to the DMA.

Is there a bug in the software? I see that the #if defined(SPI_I2S_SUPPORT) is grayed out in the stm32g4xx_hal_i2s.c file (contrary to what I have for F446RE), proably meaning that it is not defined earlier. I have tried commenting out the #if defined and #endif, but there seems to be no difference.

Has anywone set up the G431 successfully with I2S master receive and DMA?

13 REPLIES 13

Appears OK.

So, you have set I2S CK and WS to PF0/PF1? Do you see those two clicks on those pins, observed by oscilloscope or LA?

Isn't HSE enabled in RCC?

JW

evenlund
Associate III

That is correct - I use I2S2 on PF0 and PF1. I will see if I can get an oscilloscope that is able to observe the clicks. I assume that this will happen at 1/150e6 s as the I2S clock is 150 MHz. I have been experimenting with setting the clock really low, but have not seen any change.

No, the HSE cannot be enabled when using I2S2. Do I have to cut traces to the crystal on the Nucleo STM32G431 to make it work?

*clocks, of course. Autocorrect... sorry.

> No, the HSE cannot be enabled when using I2S2. Do I have to cut traces to the crystal on the Nucleo STM32G431 to make it work?

According to the schematics, there are jumpers which are not connected by default. You may want to check them.

JW

evenlund
Associate III

Agreed: The crystal is not connected, but can be connected with solder bridges 9 and 10.

So to sum up: All settings seems fine according to the registers, so there is quite a mystery to why the I2S2 is not working for my G431. Piranha mentioned that a rewrite of HAL would need to happen before things are ok. No one seems to have any better idea of what is wrong so I would have to buy a different board or only use the I2S3. Not impressed.