Is their a document showing how to use the Clock Tool for switching configurations.
My target is to configure a K26F with Xtal 16Mhz and Xtal 32K with SD card, USB LS and HS, maintain lowest power mode and switch between the modes as required by peripherals detected.
It needs to boot in the lowest power mode, make some power measurements, and then if power available switch to a LP run mode. When no activity, which is most of time, will go to sleep (typically for 15minutes) to assume lowest power.
If SDcard present switch to a 25Mhz access mode.
When a USB LS Host is plugged in, enumerate MSC & CDC-ACM switch clocks to manage this interface (if any)
When a USB LS Otg device is detected, switch the USB LS Host (12Mbits/48Mhz?) clock on.
When a USB HS Otg device is detected switch the USB HS Host clock on (480Mbits/?) clock on
thanks
Thanks for the response.
I suppose I was phrasing the bigger picture too much in my question.
I meant it specifically for the clock tool, "is their a way of managing a sequence of clock changes?" - what is allowed and what is not.
From what I understand there can be intermediate states that the clock subsystem has to go through to get to a final state.
Part of my question was also driven by having used the Processor Expert tool, which does have a module that creates a clock switching scheme, and that also includes the setup for all clock dependent peripherals.
regards
Hi, Meil,
I suppose that the the clock tools can only configure the MCG so that it can output the expected clock, the tools can not configure the peripheral driving clock source.
For each peripheral clock, it is case by case, you should write the corresponding peripheral register. For the low power run mode, you have to use internal 4MHz fast clock as core/system clock to save power, the flash clock is 1MHz.
Pls refer to Chapter 6 Clock Distributionin RM of K26F.
Hope it can help you.
BR
XiangJun Rong