System.setCpuFrequency

Name
System.setCpuFrequency

Description
Change the processor frequency and automatically switch to the right clock source.
 * Since: Pinguino IDE 10.4

Syntax
System.setCpuFrequency(f);
 * f: frequency in Hertz (f is a 32-bit unsigned value)
 * Output: none

Examples
System.setCpuFrequency(32768);  // Switch System Clock to External 32768Hz Crystal (Timer1 is then the clock source) System.setCpuFrequency(4000000); // Switch System Clock to Internal Oscillator, frequency is 4MHz System.setCpuFrequency(64000000);// Switch System Clock to External Crystal and overclock the frequency to 64MHz (only available for Pinguino 32MX270)