Download Processor Expert User Manual
Transcript
PE_User_Manual.book Page 69 Thursday, March 13, 2014 10:12 AM Application Design Basic Principles Figure 3.8 Clock configuration example in application low-power state This example also shows that some peripherals allow using multiple clock sources (for instance clock generator output, raw output from reference clock source or other alternative clocks). Clock configuration in such case can be used to switch clock source of the peripheral clock input. Furthermore, the example demonstrates possibility to enable or shut down entire peripheral during clock configuration switch. For more information about clock configuration options available in the embedded components, see Support of Clock Configurations in Embedded Components topic. Clock configuration switch is explained in the topic below. Changing active clock configuration CPU (processor) component SetClockConfiguration(ConfigurationID) method is used to change active clock configuration. This method will switch to clock configuration defined by ConfigurationID passed as input parameter. The required configuration has to be predefined in the processor component, otherwise the method returns an error. Clock configuration change is done during CPU SetClockConfiguration() method call in the following order: 1. It is checked whether required clock configuration number was defined in the CPU (processor) component. If not, method returns with an error. 2. System timing is configured according to new clock configuration, including reference clock source selection, clock generator modules and system dividers. 3. All LDD components which support clock configuration feature are called to configure their underlying peripherals - global internal LDD_SetClockConfiguation() method is invoked which in return invokes internal SetClockConfiguration() method of the LDD components. Processor Expert User Guide 69