Rebooting "G120 fez cobra II" through code

Hi there,

I know that we can reboot device through watchdog code but I am looking for alternative.In my application, I require to reboot the device and start executing code again on certain conditions, so what should I do for that ?

Thanks

Microsoft.SPOT.Hardware

PowerState.Reboot(true);

@ Skewworks - Thanks man… It is working, but stops debugging, Is there any way that I can continue debugging ?

you just need to reattach the debugger. In MFDeploy that’s easy (F5 does it). But to debug program state in VS, not so easy that I know. But anyway, why are you trying to reboot and then continue debugging? You reboot because you have a situation where your app is “lost” and you want a fresh restart. It doesn’t make sense to me (unless I’m missing something - which is possible :wink: ) that you’d want to do this, you’d be better off trying to track down the issue before hard resetting the app.

@ Brett - Thanks Brett, I can debug in MFDeploy after hard reset,which is good. I just wanted to see after hard resetting, does my code going in right direction or not ?