cancel
Showing results for 
Search instead for 
Did you mean: 

Knowledge Base Articles

Change CPU Clock of PSoC in Firmware

Anonymous
Not applicable

Change CPU Clock of PSoC in Firmware

Question: How to change the CPU_Clock of the PSoC in the firmware (for example switch between Sysclk/2 and Sysclk/1) ?

 

Answer:

The CPU clock may be changed by writing to the first three bits of the OSC_CR0 register.  For example:

To set CPU clock to SysClk/2
OSC_CR0 &= ~0x07; // Clear Bits 0 to 2
OSC_CR0 |= 0x02;  // Set CPU Clock to SysClk/2

To set CPU clock to SysClk/1
OSC_CR0 &= ~0x07; // Clear Bits 0 to 2
OSC_CR0 |= 0x03;  // Set CPU Clock to SysClk/1

0 Likes
Version history
Revision #:
1 of 1
Last update:
‎Mar 27, 2011 05:23 PM
Updated by:
Anonymous
 
Contributors