Shop OBEX P1 Docs P2 Docs Learn Events
Restart the javelin module — Parallax Forums

Restart the javelin module

ChristianGChristianG Posts: 29
edited 2004-09-16 13:44 in General Discussion
Is there a possibility to restart the javelin module from the application itself?
·
May be I'm paranoid? Or too much used to the ms platform? But can I really trust my application running for months or may be years, without a restart?
·
Christian

Comments

  • AllanL5AllanL5 Posts: 12
    edited 2004-09-15 15:14
    The big thing that takes large computer systems down (like windows) is memory leaks, or memory fragmentation.· Since the Javelin has no garbage collection, only allocate the objects you need, then use them over and over again.

    The big thing that takes little computer systems down (like the BS2 and Javelin) is electrical noise.· Noise on the power supply lines, or RF noise from the air, makes life very difficult.· Sufficient capacitance on the voltage lines, and electrical shielding ( a grounded metal box around your circuit ) help to reduce or eliminate this.
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2004-09-15 19:10
    Dedicate one pin to reset the javelin.

    Connect a 10k resistor from the pin to +5V.

    Connect the pin to the reset pin.

    At powerup/reset the pin will be an input·so this does not disturb

    the reset circuitry.

    In your application make the pin a low output. The javelin will

    reset immediately then. (this makes the pin back an input)



    To time the running application you can use the SoftRTC· class by

    Jon Williams or the SoftwareRTC class by me.



    regards peter
  • ChristianGChristianG Posts: 29
    edited 2004-09-16 07:16
    Thanks for good answers. I'm not sure I need to restart the module yet, but I notice that certain classes can overflow. For example will t = new Timer() overflow after 10,3 hours. I'm not sure what are the consequences of that, does it mean that the counter goes back to zero? do I need to create a new Timer-instance (and will a new Timer instance consume more memory), I have to test that...

    Regards, Christian
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2004-09-16 08:29
    Yes, the timer count wraps to zero.

    To keep longer times, timeout in say an hour and increment

    an int, this gives you 65536 hours before overflow.



    If you want to ensure the javelin keeps running,

    put an external watchdog in your circuitry. Once the javelin

    stops running or if you decide not to reset the watchdog,

    the watchdog will timeout and will reset the javelin by means

    of a low active pin connected to the javelin reset pin.



    regards peter
  • ChristianGChristianG Posts: 29
    edited 2004-09-16 09:05
    I suppose that it means that the application have to send signals to the watchdog, when the application stops running the watchdog will reset the javelin.
    Do you have more information about designing a watchdog?

    Regards Christian
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2004-09-16 12:52
    Read here about Xicor X1227 rtc chip with builtin watchdog.
    http://www.xicor.com/folders/X1227.php
    I have written a class for the X1227 as I used it once.

    Or check the Maxim MAX690 chip. This is useful for long timeouts:
    ·http://www.maxim-ic.com/quick_view2.cfm/qv_pk/1334/ln/en

    regards peter



    Post Edited (Peter Verkaik) : 9/16/2004 12:57:15 PM GMT
  • ChristianGChristianG Posts: 29
    edited 2004-09-16 13:44
    Thanks!!
Sign In or Register to comment.