Disabling or Enabling Peripheral Clocks

by <a href="http://community.silabs.com/t5/Welcome-and-Announcements/Community-Ranking-System-and-Recognition-Program/m-p/140490#U140490"><font color="#000000"><font size="2">Hero Employee</font></font> </a> Silicon_Labs on ‎11-24-2014 08:45 AM


How do I disable or enable the clock to a peripheral?



The APB clock can be enabled or disabled to a set of peripherals using the Clock Control (CLKCTRL) module.

For modules that run from the APB clock, disabling the clock to the peripheral will completely disable the module.

For modules that run from an alternate clock source like the RTC0 Oscillator, disabling the clock to the peripheral will disable the clock to the registers only; the module will continue to run using the register's previous settings before firmware disabled the clock.  Because these modules run from two different clock domains, there is often a clock synchronization step required between the APB and the module clock, leading to a two-peripheral-clock delay between writing a value to a register and reading it back.

More information on the device clocking can be found in the device reference manual.  Device documentation can be found here: www.silabs.com/32bit-mcu.