Shop OBEX P1 Docs P2 Docs Learn Events
Flexcc on P1: startup freq, serial setting — Parallax Forums

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.

Comments

  • 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;
    _setbaud(115200);

    The following _setbaud() sets the standard serial with this info correctly.

  • I was about to tell you that there's a proper way:

    enum {
      _clkmode = XTAL1 + PLL16X,
      _xinfreq = 6'000'000,
    };
    

    ...
    but it turns out that's busted? Yeah that's no good.

  • @Wuerfel_21 said:
    I was about to tell you that there's a proper way:

    enum {
      _clkmode = XTAL1 + PLL16X,
      _xinfreq = 6'000'000,
    };
    

    ...
    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.

Sign In or Register to comment.