This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

睡眠时钟咨询



早上好,各位:

官方例程中的时钟初始化如下:

#define HAL_BOARD_INIT() \
{ \
/* Set to 16Mhz to set 32kHz OSC, then back to 32MHz */ \
START_HSOSC_XOSC(); \
SET_OSC_TO_HSOSC(); \
SET_32KHZ_OSC(); \
SET_OSC_TO_XOSC(); \
STOP_HSOSC(); \
\
/* Enable cache prefetch mode. */ \
PREFETCH_ENABLE(); \
}

这里看的我有点晕,为什么几个不同频率的时钟切来切去的?最后到底跑的是哪个?

另外, 我看了用户手册,Sleep Timer工作是在32KHz的,这个应该是在睡眠时使用的时钟吧,那么唤醒时,CPU的时钟到底是哪个?

16MHz还是32MHz?