Thanks to the users who reported this...
We have found that tight loops on the Netduino Plus can prevent Visual Studio and MFDeploy from connecting to the device. This causes the device to run the current Netduino app--but lock out the user. Workaround and recovery are below.
Example problem-causing code:
while(true) { led.Write(true); }
In the above code, the .NET MF firmware is constantly busy and does not see incoming messages from Visual Studio. It becomes impossible to redeploy a new app, debug, etc. This does not affect a regular Netduino in this way.
This does not damage your device. There is a work-around to this issue (and a recovery procedure if you've been affected). We are in communciation with Microsoft on this issue and are working on a permanent solution (to be incorporated into an upcoming firmware update).
Workaround: add a bit of "sleeptime" to your loop
while(true) { led.Write(true); Thread.Sleep(1); // by sleeping for 1ms, .NET MF watches for incoming messages. }Recovery procedure: erasing your Netduino app (necessary if your Netduino Plus is not responding to the PC)
- Unplug your Netduino from the PC (and external power if present)
- Start the MFDeploy.exe application (Start > Programs > .NET Micro Framework 4.1 > Tools > MFDeploy.exe)
- Select USB transport
- Hold down the pushbutton on your Netduino Plus
- Without letting go of the pushbutton, plug your Netduino Plus into your PC
- Within 5 seconds, press PING in MFDeploy. You should see "Pinging...TinyBooter"
- Press ERASE in MFDeploy. This will erase your Netduino application (and nothing else). Wait for completion.
- Disconnect and reconnect your Netduino Plus. You should be able to deploy another app.
NOTE: an alternative workaround is to erase and reflash your Netduino Plus (using regular Netduino firmware). This is not recommended, however, as the Netduino Plus would then lose its SD and Ethernet capabilities.
Chris