Skip to main content
Associate II
Oct 20, 2026 12:31 PM UTC
Solved

Missing PeriphCommonClock_Config() definition

Setup

I am programming a STM32H7 in STM32Cube VSCode. I have two peripherals (SPI1 & SPI2) connected to the same clock PER_CK.

Issue

CubeMX is supposed to generate the clock configuration code inside the PeriphCommonClock_Config() function (because several peripheral share the same clock). Inside Boot, everything is done fine. Inside Appli, the function PeriphCommonClock_Config() is declared and called correctly. However, its definition is missing inside main.c. This yields : 

 
[build] [...]/fw/Appli/Core/Src/main.c:97:(.text.main+0x10): undefined reference to `PeriphCommonClock_Config'

Current Workaround

I am currently defining PeriphCommonClock_Config() inside “USER” code blocks. This allows the build to happen with no problem. However, if I make changes to the Clock Tree and regenerate code from CubeMX, then I will need not to forget to adapt my definition of the function. This can’t stay like that.

Question

Can someone confirm this is an issue and not expected behavior from CubeMX ? Can someone provide another workaround in the meantime ? Is there a fix in the pipe for the future CubeMX version ?

Souhaib MAZHOUDBest answer
ST Technical Moderator
Nov 17, 2026 2:17 PM UTC

Hello,

This issue has been fixed in the latest version of STM32CubeMX 6.19.0

BR, Souhaib

To give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.

4 replies

ST Technical Moderator
Oct 20, 2026 1:24 PM UTC

Hello ​@neo-knight-td 

Thank you for reporting this behavior,

Could you provide an IOC in order to verify the issue?

KR, Souhaib

To give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
Associate II
Oct 21, 2026 12:22 PM UTC

The corresponding .ioc file attached

ST Technical Moderator
Oct 21, 2026 2:23 PM UTC

Hello ​@neo-knight-td 

I will escalate this issue internally to the dedicated team. Internal ticket number: CDM0066785 (This is an internal tracking number and is not accessible or usable by customers.)

BR, Souhaib

To give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
Souhaib MAZHOUDBest answer
ST Technical Moderator
Nov 17, 2026 2:17 PM UTC

Hello,

This issue has been fixed in the latest version of STM32CubeMX 6.19.0

BR, Souhaib

To give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.