cancel
Showing results for 
Search instead for 
Did you mean: 

I2S2 + DMA: RCC_PERIPHCLK_I2S is not auto-generated in HAL_I2S_MspInit()

sigetzky
Associate

Hello,

 

When using I2S2 with DMA transmit, the auto-generated stm32f7xx_hal_msp.c does not include
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_I2S inside HAL_I2S_MspInit().
As a result, after calling HAL_I2S_Transmit_DMA() no DMA interrupts/callbacks occur.

As a workaround, I manually added the snippet in the user code section.

 

Question:
Is this intended (by design) or something wrong with STM32CubeIDE?
For an I2S setup, should RCC_PERIPHCLK_I2S be auto-generated at an appropriate place?
Or should it be added manually?

Also, I may be missing a recommended setting/order, so if there’s an official way to ensure RCC_PERIPHCLK_I2S is applied, I’d appreciate guidance.

Environment:

    MCU/Board: STM32F767ZI / NUCLEO-F767ZI
    STM32CubeIDE: 1.19.0

3 REPLIES 3
Mahmoud Ben Romdhane
ST Employee

Hello @sigetzky ,

 

First let me thank you for posting.

For more investigation, I suggest that you provide your Ioc.File.

 

Thanks.

Mahmoud

 

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hello Mahmoud,


Thank you for your reply.

I have simplified the project, focusing only on the I2S function and its DMA.
However, even with this simplified .ioc file, the automatically generated code does not include the enabling of the I2S peripheral clock (PeriphClockSelection).

As a result, the callback is not triggered unless I manually add the code in the USER CODE section.


sigetzky

Hello @sigetzky 

 

I was able to reproduce your request.

Thank you for bringing this issue to our attention.

An internal Ticket was submitted to the Development Team (Internal Ticket Number: 217326).

I will keep you up to date when the problem is solved.

 

Thanks. 

Mahmoud

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.