Shop OBEX P1 Docs P2 Docs Learn Events
Prop Overclock and C — Parallax Forums

Prop Overclock and C

AORocheAORoche Posts: 1
edited 2014-03-16 08:02 in Propeller 1
I have an application that requires the free running counter run at 100Mhz (6.25Mhz XTAL). Is it possible to change the initialization of the clock ratio to have C functions run at the correct frequency (serial, pwm, etc.)?

Comments

  • SRLMSRLM Posts: 5,045
    edited 2014-03-16 06:56
    Yes, it is possible. The easiest way is to add "-D clkfreq=100000000" to the propeller-load command line.
  • jazzedjazzed Posts: 11,803
    edited 2014-03-16 08:02
    For SimpleIDE users ....

    Assuming propeller-gcc install is in C:\Program Files (x86)\SimpleIDE\propeller-gcc (Windows) or /opt/parallax/ (Linux/Mac)

    Save the code below to propeller-load folder as A100.cfg

    C:\Program Files (x86)\SimpleIDE\propeller-gcc\propeller-load\A100.cfg
    /opt/parallax/propeller-load/A100.cfg

    Add A100.cfg to boards.txt (or simply rename boards.txt to boards2.txt to see all .cfg boards).
    C:\Program Files (x86)\SimpleIDE\propeller-gcc\propeller-load\boards.txt
    /opt/parallax/propeller-load/boards.txt

    Restart SimpleIDE or just click the jigsaw puzzle piece in the Project Manager.

    Then select A100 from board type.
    # A100.cfg
        clkfreq: 100000000
        clkmode: XTAL1+PLL16X
        baudrate: 115200
        rxpin: 31
        txpin: 30
    

    There is an alternative way of doing this in code using RCFAST board type, but I don't have the notes at the moment.
Sign In or Register to comment.