Restart programatically?

I know its possible to force boot mode programatically, but is it also possible to force a restart, duplicating the expected behavior you’d expect if the wixel were actually power cycled?


You can enable the watchdog timer and wait for it to reset the device:

WDCTL = 0b1011; while(1);


How does this differ from:

The line of code you posted is equivalent to

That would set the watchdog timer to have a period of approximately one second, meaning that it would take one second before the Wixel resets. The code I posted sets the watchdog to have a much shorter period of a few milliseconds, allowing the Wixel to reset quickly. The CC2511 datasheet has more information about the WDCTL register and the bits in it.

Also, your code does not have an infinite while loop in it.