FlexProp P1 Clock Frequency "C"
Shawna
Posts: 508
in Propeller 1
How does one change the Clock Mode and Frequency for the P1 in FlexPropC.
The FlexProp help file says...
Its been awhile since I have messed with spin but the propeller manual says....
I have tried multiple pieces of code but can't get anything to compile.
The FlexProp help file says...
P1 Clock Frequency
In C code, the P1 clock frequency defaults to 80 MHz, assuming a 5 MHz crystal and xtal1 + pll16x clock mode. This is a common configuration. You may override it with the builtin clkset function, which works the same as the Spin clkset builtin.
Its been awhile since I have messed with spin but the propeller manual says....
clkset(%01101100, 4_000_000) 'Set to XTAL1 + PLL2x
I have tried multiple pieces of code but can't get anything to compile.
Comments
Seems it has to be placed after int main.
I was trying to set it before.
So you only need to set it if you don't want the default.
This even applies to FlexSpin.
I know this but I am trying to overclock the prop and was having problems using the clkset(mode, frequency) function. I figured once I was able to get the code to compile I would be good but I am still having issues. I am hesitant to ask overclocking questions in this thread because I started a similar one 9 months ago for simpletools.