2026-04-24 8:16 AM - edited 2026-04-24 8:18 AM
Hi ST,
I’m trying to configure the clocks for the STM32C071GBUx MCU in CubeMX (latest version, 6.17).
This MCU has two SPI interfaces, two UARTs, and two I²C peripherals. However, CubeMX only allows me to configure the clock for one UART, one I²C, and no SPI at all.
Am I missing something?
I’ve attached the complete clock configuration diagram below.
2026-04-24 8:21 AM - edited 2026-04-24 8:27 AM
Hello,
You need to check what warning CubeMx is showing. Hover the mouse over the warning icon and check what it says:
Update:
I did the exercise and didn't face any issue. All the instances are available:
So check what is conflicting with SPI1, I2C1 etc ..
2026-04-25 2:42 AM - edited 2026-04-25 2:47 AM
Hello @mƎALLEm,
Thank you for your response, but I’m afraid it didn’t address my question.
The second image I attached—which shows various conflicts—was only meant to illustrate the available interfaces for this MCU. The conflicts, warnings, or the unavailability of SPI1 are expected and not the issue here.
The actual problem is that the clock configuration for the interfaces that are both available and enabled (I2C2 and UART2) does not appear on the clock configuration screen, as shown in the first image.
Kind Regards,
Thomas
2026-04-25 3:38 AM
Regards your question, yes you miss, that peripherals share clocks based on bus for example APB1 ... Some special can switch more as one clock source , and this you see in clock screen. Other isnt showed , sometimes is listed sometimes not. Reference pdf is right source.
2026-04-25 5:20 AM
Hello @MM..1
After several years of dealing with ST's MCUs I do understand that some peripherals may share clock sources, and in such cases the CubeMX clock tree diagram usually makes this explicit. However, in this instance, the diagram does not indicate that clearly - SPI interfaces are not shown at all on the clock diagram.
I have reviewed the relevant ST documentation, specifically RM0490 and DS14693, but they do not clearly specify the clock sources for I2C2 and SPI. This lack of clarity is precisely why I took the time to write this post, hoping to receive a definitive explanation.
The responses provided so far, while appreciated, essentially suggest that the clock source “may be this or that” and recommend further study of the PDF documentation. With all due respect, this is not the level of clarity one would expect when seeking guidance from ST, particularly from an engineer at the Chief III level. I would greatly appreciate a more precise and authoritative clarification.
2026-04-25 6:44 AM
Sorry , but i too many years work with MX and accept as free wizard with never 100% . But here i dont see problem
as in pdf only peripherals showed in clock tree have configurable clocks . And Clock tree AI maybe remove SPI1 because is marked red. Plus all other is marked here
and is in https://www.st.com/resource/en/datasheet/stm32c071gb.pdf
2026-04-27 2:25 AM
Hello @TDJ ,
@TDJ wrote:
Hello @MM..1
one would expect when seeking guidance from ST, particularly from an engineer at the Chief III level.
1- @MM..1 is not a ST engineer and he's a community member like you trying to help you as he can..
2- I see your point now. I'll escalate it internally for analysis. I'll get back to you as soon as I have a feedback.
2026-04-27 2:52 AM - edited 2026-04-27 2:55 AM
By referring to the reference manual RM0490, / Figure 9. Clock tree:
You can see there are some communication peripheral instances have independent clock sources (USART1, I2C1..). Only these instances have independent clock source to configure the clock source. Other instances (USART2, SPI2 ..) have only one clock source which is generated from APB:
i.e.:
See also the section: 6.4.20 RCC peripherals independent clock configuration register 1:
So CubeMx is correct.
2026-04-27 6:07 AM
Ok , but i ask too for detail in C071 pdf in table exist SPI1 idependent clock current , then where is it?
2026-04-27 7:07 AM - edited 2026-04-27 7:08 AM
@MM..1 ,
Sorry I didn't catch your point. I don't see a relation between the clock source and the current consumption here?
If SPI1 is indicated as it has a relation with APB that means it is accessed over APB not necessarily clocked from it. From the reference manual:
All comm peripherals are on APB bus but not all of them are clocked over APB clock.