On Fri, Jul 24, 2009 at 12:26 PM, Razvan Musaloiu-E.<[email protected]> wrote: > Hi! > > On Fri, 24 Jul 2009, himanshu barve wrote: > >> I am looking for an interface that would allow me to reset the entire >> mote** (clear all the CPU registers and data memory and restart) and I >> would like to do this through software instead of powering the mote >> off and on. >> >> In T1 Reset interface was available . I couldnt find any such >> interface in T2. Is there any other way to RESET mote by software. >> >> Basically .. i want to RESET mote from base station, whenever they >> get stuck. So when mote receives the command it interpret whether it >> should RESET or not and then take action. >> >> >> I am using telosb platform. > > Here is short sequence that will reboot a MSP430: > > WDTCTL = WDT_ARST_1_9; > while(1); >
any write to WDTCTL will cause a PUC (power up clear; resets all registers to their default value just like you want) unless you set the bits in WDTPW. I like WDTCTL = 0; >From what I recall the reset vector is stored at 0xFFFE, so to start your program over from the beginning (without a PUC) you could branch to the address stored at 0xFFFE. I also seem to recall with TOS 2.x on telos this is always the beginning of ram at 0x1100. The TOSboot code has some examples that might be useful if you need more information. _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
