Shop Learn
PNut/Spin2 Latest Version (v35m - Improved command-line interface) - Page 44 — Parallax Forums

PNut/Spin2 Latest Version (v35m - Improved command-line interface)

1383940414244»

Comments

  • evanhevanh Posts: 10,951

    Okay, that would be extraneous action then. How come you even noticed it?

  • cgraceycgracey Posts: 13,588

    I don't think I use Prop_Clk during download.

    Surac, can you confirm that the clock is actually going to the _CLKFREQ frequency in a PASM-only download? It should remain in RCFAST mode at ~24MHz. In a Spin2 download, the _CLKFREQ frequency will be set when the interpreter starts, just before your program starts. All downloading is done at RCFAST, though.

  • SuracSurac Posts: 167
    edited 2021-03-31 13:21

    Surac, can you confirm that the clock is actually going to the _CLKFREQ frequency in a PASM-only download? It should remain in RCFAST mode at ~24MHz. In a Spin2 download, the _CLKFREQ frequency will be set when the interpreter starts, just before your program starts. All downloading is done at RCFAST, though.

    I tried again and found how to reproduce it:

    con 
        _clkfreq=100_000_000
    dat
        org 
        rep @done,#0
        drvnot #0
    done
    
    • Pressing F10 in PNUT gives a 6.5 MHz on pin 0 -> that is what i have expected. P2 is in RCFAST
    • But Pressing CTRL+F10 in PNUT gives 25 MHz on pin 0 -> P2 is in PLL mode 100 MHz
    con 
        _clkfreq=200_000_000
    dat
        org 
        rep @done,#0
        drvnot #0
    done
    
    • Pressing CTRL+F10 in PNUT gives 50 MHz on pin 0 -> P2 is in PLL mode 200 MHz

    As i know "Debug" needs the P2 to run >10MHz you just set the clock in den debugger to whatever is specified by _clkfreq=xxx. It seem to be a side effect of the DEBUG

  • ersmithersmith Posts: 4,890
    edited 2021-03-31 15:17

    (deleted, I had incorrect information)

  • cgraceycgracey Posts: 13,588

    I'm pretty sure I don't use Prop_Clk in PNut. There is no reason to, at this time, because our USB-to-serial chips only run reliably to 2Mbaud and RCFAST runs fast enough to support that.

    Ctrl-F10 sets the clock mode because it launches the debugger before running your PASM-only program.

  • SuracSurac Posts: 167

    @cgracey said:
    Ctrl-F10 sets the clock mode because it launches the debugger before running your PASM-only program.

    Yes, that's what i have found. Launching with debugger sets the clock to whatever is specified by _CLKFREQ even in PASM only Programs.

    sorry for thinking you are using Prop_Clk, that was wrong. It is the debugger setting the clock what tortured me

  • Thanks Chip.
    V35m command line tweaks are a real time saver. :smiley:

Sign In or Register to comment.