run time PLL change not affecting clkfreq
Bobb Fwed
Posts: 1,119
I am trying (for the first time) to change the PLL on the fly (using xtal) to adjust clock speed, but it doesn't change clkfreq which means that anything based on that stops working correctly (like anything to do with serial information). Is there some way to set it? Or do I have to do some messy conversions off of CLKMODE and alter the existing objects?
Comments
I got that part figured out.
But, FullDuplexSerial doesn't seem to update. I re-ran the start method after I changed the frequency. Whatelse do I need to do?
FullDuplexSerial, like many time-sensitive I/O drivers, does its timing calculations in its initialization method only. Some Spin-only objects use CLKFREQ directly and may be able to adjust without reinitializing. Basic_I2C_Driver, for example, only uses CLKFREQ for its timeouts and doesn't precalculate the time.
Post Edited (Mike Green) : 2/13/2009 4:55:06 PM GMT