STM32 内部时钟 [英] STM32 internal clocks
问题描述
我对 STM32F7 设备(来自 STMicroelectronics 的 Cortex-M7 微控制器)上的时钟系统感到困惑.参考手册没有充分阐明这些时钟之间的差异:
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:
- 系统时钟
- HCLK
- FCLK
参考手册在章节<<5.2 时钟 >> RCC 将 AHB 时钟(HCLK)的 8 分频提供给 Cortex 系统定时器(SysTick)的外部时钟."
该声明与 CubeMX 的数字相矛盾.请注意,在 CubeMX 中,我可以自己选择从 HCLK 到Cortex System Timer"的预分频器.不一定要除以 8.
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.
推荐答案
通常HCLK
和FCLK
的唯一区别在于:
Normally the only difference between HCLK
and FCLK
is that :
HCLK
是主 CPU 时钟,也用于 AHB 接口.它可以在 CPU 休眠时被门控(例如 WFI)FCLK
与HCLK
同步,但在 CPU 进入睡眠状态时不进行门控,因此它可以在发生中断时唤醒.
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 toHCLK
but is not gated when the CPU goes to sleep, so that it can awake in case of interrupt.
这篇关于STM32 内部时钟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!