问题描述
我对STM32F7器件(意法半导体公司的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:
- SYSCLK
- 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内部时钟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!