You can use the watchdog for that. This is the function I use in SOS (I 
haven't tried it in TinyOS yet):

void timer_watchdog_reset(uint32_t interval)
{
    uint32_t current_t;
    current_t = OSCR0;
    interval = 3250 * interval; // convert to ms (pxa27x watchdog runs 
on a 3.25MHz clock)
    OSMR3 = current_t + interval;

    OWER |= (OWER_WME); // make sure the watchdog is enabled
}

where "interval" is the time in ms after which the watchdog should reboot.

- Thiago


Gmx1 wrote:
> Hi all,
>
> I wrote an app that logs data to the flash.
>
> My intent is to send a command to reboot the intel mote 2 using  
> moteif. Is there any command or sort of code that initiates that in  
> nesc?
>
> Ivan
>
> Sent from my iPhone
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
>   

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to