Hi All,
Is there a way to reset the Wixel by calling a function like…
void resetWixel(){
//Reset code Goes Here...
}
I tried this…
void resetWixel(){
delayMs(10);
disableUsbPullup();
delayMs(100);
// Reset the system by enabling the watchdog timer and waiting.
WDCTL = 0b1011; // EN=1 (enabled), MODE=0 (watchdog mode), INT=11 (period is 2 ms)
}
But the compliler reported warnings… So I thought there might be a better way…
Complier warnings…
warning 112: function ‘resetWixel’ implicit declaration
warning 84: ‘auto’ variable ‘resetWixel’ may be used before initialization
Hello. I think you are on the right track. Just remember that in C, your source file needs to have a function definition or prototype above the location where you try to call the function. --David
So I have my reset function working… I have a question however. Is resetting the MC this way (soft reset) the same as doing a full power cycle reset? Do all buffers get cleared and do systems get fully re-initalized with a “Soft Reset” (*one initiated by watchdog…)
Hello. For almost every purpose, resetting via the watchdog timer or reset pin should be the same as doing a full power cycle. The only two differences I can think of are:
- If the CC2511 has a register telling you what the source of the last reset was, obviously that register will be affected.
- The values held in RAM could conceivably be retained while the microcontroller has power. If you are running buggy C code that reads an uninitialized value from RAM, you could get different results depending on how you reset.
–David