Skip to main content
PKB404
Associate II
July 28, 2026
Solved

【Bug report】STM32H743VITx SPI4 clock code generation error in CubeMX

  • July 28, 2026
  • 3 replies
  • 123 views

STM32H7 series MCU package version: V1.13.0
SPI4 clock is selected as PCLK2, but in the actual generated project, the SPI4 initialization function incorrectly sets RCC_SPI45CLKSOURCE_D2PCLK1 instead. The clock tree diagram and code snippet are shown below.

Best answer by Mahmoud Ben Romdhane

Hello ​@PKB404 

I reproduced the behavior described with STM32CubeMX 6.18.0, and I confirm the issue: 

SPI4 initialization function incorrectly sets RCC_SPI45CLKSOURCE_D2PCLK1 instead of RCC_SPI45CLKSOURCE_D2PCLK2 .

I recommend that you change the code manually.

An internal ticket has been submitted to the development team (Internal Ticket Number: CDM0064731).

I will let you know as soon as the issue is fixed.

Thanks.

Mahmoud

 

 

3 replies

ST Technical Moderator
July 28, 2026

Hello ​@PKB404 

Let me thank you for your post.

For more investigation, could you please 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.
PKB404
PKB404Author
Associate II
July 28, 2026

Hi Mahmoud,


Thanks for your response. Please find my .ioc file attached. Let me know if anything else is needed.


Best, PKB

ST Technical Moderator
July 28, 2026

Hello ​@PKB404 

I reproduced the behavior described with STM32CubeMX 6.18.0, and I confirm the issue: 

SPI4 initialization function incorrectly sets RCC_SPI45CLKSOURCE_D2PCLK1 instead of RCC_SPI45CLKSOURCE_D2PCLK2 .

I recommend that you change the code manually.

An internal ticket has been submitted to the development team (Internal Ticket Number: CDM0064731).

I will let you know as soon as the issue is fixed.

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.