Shop OBEX P1 Docs P2 Docs Learn Events
ReBoot not working /inconsistant ? — Parallax Forums

ReBoot not working /inconsistant ?

Phillip Y.Phillip Y. Posts: 62
edited 2006-05-16 01:17 in Propeller 1
In spin I blink a led on and off then reboot, the program·was saved to eeprom for restarting, I am using a propstick that works fine otherwise.
It is inconsistant, manual reset always restarts ok, and after several manual resets it will some times reboot several times and then stop.
My ocilloscope shows the 5mhz xtal is still running, and the reset pin is at 3.3v with only manual reset affecting it,
this happens with or with out the db9 cable attached.

perhaps the assembley instruction would work better ?
WRBYTE 4 , $80 ($0004 contains the initial value written into the CLK register.)
CLKSET $80········· ( bit 7 = reset)
(I cant get this to assemble!)·

Does any one else have trouble with reboot ?

How do I code this in assembly as an alternative ?

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2006-05-15 16:30
    Hi Phillip,

    I tried reboot on both a PropSTICK and the beta Demo Board. It consistently failed to reboot the device. 'Didn't do it even once.

    I was able to force a reboot with the following Spin command, though, which works consistently:

      clkset(xtal1 + pll16x + $80, 5_000_000)
    
    
    


    -Phil
  • cgraceycgracey Posts: 14,133
    edited 2006-05-15 17:21
    We found a schematic problem over the weekend that has been causing some problems like these. It comes from using RESn to source current into the EEPROM's SDA pin via a 10k resistor. Because the RESn input is both a schmitt-trigger input and a 5k-ohm output, it's possible that the EEPROM will pull SDA low continuously and prevent the RESn signal from rising to the positive trip point required to release the Propeller from reset. The solution: Use VDD, not RESn to pull SDA high.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Chip Gracey
    Parallax, Inc.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2006-05-15 17:34
    Hi Chip,

    The PropSTICK is wired with SDA pulled to Vdd. But the reboot command isn't working that way either. Since the clkset command will do a reset reliably, I'm wondering if the reboot command is generating the right code...

    -Phil
  • cgraceycgracey Posts: 14,133
    edited 2006-05-15 17:48
    To reboot the Propeller in assembly:

    ···· ··· clkset bit7set······· 'set bit7 high in clk register - force hardware reboot

    bit7set ·long $80

    In Spin:

    · clkset($80, 0)··· 'force hardware reboot








    Phillip Y. said...
    In spin I blink a led on and off then reboot, the program·was saved to eeprom for restarting, I am using a propstick that works fine otherwise.
    It is inconsistant, manual reset always restarts ok, and after several manual resets it will some times reboot several times and then stop.
    My ocilloscope shows the 5mhz xtal is still running, and the reset pin is at 3.3v with only manual reset affecting it,
    this happens with or with out the db9 cable attached.

    perhaps the assembley instruction would work better ?
    WRBYTE 4 , $80 ($0004 contains the initial value written into the CLK register.)
    CLKSET $80········· ( bit 7 = reset)
    (I cant get this to assemble!)·

    Does any one else have trouble with reboot ?

    How do I code this in assembly as an alternative ?
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Chip Gracey
    Parallax, Inc.
  • cgraceycgracey Posts: 14,133
    edited 2006-05-15 21:50
    You're right! It isn't generating the right code! This instruction was added at the last minute, but not fleshed out in the compiler. Jeff will be posting a new version this afternoon that fixes this. Sorry for the inconvenience.
    Phil Pilgrim (PhiPi) said...
    Hi Chip,

    The PropSTICK is wired with SDA pulled to Vdd. But the reboot command isn't working that way either. Since the clkset command will do a reset reliably, I'm wondering if the reboot command is generating the right code...

    -Phil
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Chip Gracey
    Parallax, Inc.
  • GadgetmanGadgetman Posts: 2,436
    edited 2006-05-15 22:16
    That's what Beta is for, finding the bugs...

    smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't visit my new website...
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2006-05-16 01:17
    Yes, but as it stands with the compiler, I'm pretty sure that would be "bug", singular. And, technically, it's not even that; rather, it's a matter of the complier being slightly behind the documentation. Considering its complexity (and that it's written in assembler no less), that's a remarkable state of affairs!

    -Phil
Sign In or Register to comment.