K.Mulier
K.Mulier

Reputation: 9620

STM32 internal clocks

I am confused with the clock system on my STM32F7 device (Cortex-M7 microcontroller from STMicroelectronics). The reference manual does not clarify the differences between these clocks sufficiently:

The reference manual reads in chapter << 5.2 Clocks >> "The RCC feeds the external clock of the Cortex System Timer (SysTick) with the AHB clock (HCLK) divided by 8."
This statement contradicts the figure from CubeMX. Notice that in CubeMX I can choose myself the prescaler from HCLK to 'Cortex System Timer'. It is not necessarily a division by 8.

enter image description here

Upvotes: 16

Views: 12997

Answers (2)

SRobertJames
SRobertJames

Reputation: 9198

The full quote (at least from the ref man I am looking at) is:

The RCC feeds the external clock of the Cortex System Timer (SysTick) with the AHB clock (HCLK) divided by 8. The SysTick can work either with this clock or with the Cortex clock (HCLK), configurable in the SysTick control and status register

It's admittedly poorly worded, but all it's saying is that SysTick is supplied with ("fed") the HCLK divided by 8, as well as HCLK undivided. You can then choose which one SysTick should follow.

Upvotes: 0

Dric512
Dric512

Reputation: 3729

Normally the only difference between HCLK and FCLK is that :

  • HCLK is the main CPU clock, also used for AHB interface. It can be gated when the CPU is sleeping (WFI for example)
  • FCLK is synchronous to HCLK but is not gated when the CPU goes to sleep, so that it can awake in case of interrupt.

Upvotes: 13

Related Questions