Change CPU Clock of PSoC in Firmware
Anonymous
Not applicable
Mar 27, 2011
05:23 PM
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Mar 27, 2011
05:23 PM
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
Labels
- Tags:
- psoca 1
Rate this article:
Contributors
-
This widget could not be displayed.Anonymous