Flexcc on P1: startup freq, serial setting
Hi all, I just started with flexprop. Looks nice, but I have problems finding how to initially setup everything. How to setup the PLL. The doc speaks of clkset(). But I don't have any sucess. I use clkset(xtal1 + pll16x, 96000000); for a 6MHz Xtal.
Also how do I setup the serial port (baud)?
The docs are a bit terse.
Found it out.
With the standard setup the prop gets set up up for a 5MHz with xtal1 + pll16x. So with a 6MHz xtal it automatically runs at 96MHz.
I just have to tell the system that this is the case
unsigned *p = 0;
*p = 96000000;
The following _setbaud() sets the standard serial with this info correctly.
I was about to tell you that there's a proper way:
but it turns out that's busted? Yeah that's no good.
No, this does not work. That means I cannot change the clock. But I can live with that for now.
Yeah, I said that. It's supposed(tm) to work though.