Hi bro,I am wondering which clock sources can be closed by software within stm32?thanks for helps.
Thank you,jensbauer .
I read the STM32 Reference Manual(RM0008) carefully today,and I found these:
Each clock source can be switched on or off independently when it is not used, to optimize power consumption.(page 92/1128)
Each clock source can be switched on or off independently when it is not used, to optimize
power consumption.(page 92/1128)
and
The Flash memory programming interface clock (FLITFCLK) is always the HSI clock.(page 93/1128)
It seems that the stm32 provides options to turn off all of clock sources.But,there is a problem,the HSI is always used for flash memory programming,so I guess my stm32 chip will be locked(another word,can not download program into flash any more)if I turn HSI off.Am I right?
Fortunately, no.
The microcontroller should turn on HSI if it's necessary. This could happen if it's in sleep mode and both HSI and HSE are turned off.
But in order to turn off HSI, you need to make sure it's not in use, otherwise it will not be turned off.
So if any of the PLLs are using it or if your system-clock is using it directly, then it will not turn itself off, when you tell it to.
Note: If you're flash-programming the device via SWD (for instance STLink), then the flash-programming software will be able to turn on the HSI via the SWD interface. OpenOCD can do this for instance.
Learning a lot,very helpful.Thanks a lot.jensbauer
I could understand that although an 8MHz external crystal is available on STM32F4 discovery the clock is being sourced from the MCO of ST-Link interface.if X2 is required,R68 is to be removed.
Is this true?
So what about the stability of clock ? ANy comments on clock drifts?