Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Can't connect via Visual Studio or MFDeploy, erase does not fix


  • Please log in to reply
21 replies to this topic

#1 Tom Haynes

Tom Haynes

    New Member

  • Members
  • Pip
  • 4 posts

Posted 30 September 2010 - 12:19 AM

Yesterday, my new Netduino Plus quit responding to Visual Studio. I have deployed a few apps to the board that worked but it hung the last time I loaded one. It was exactly as described in this post. I tried the suggestions to reset the board but this did not work. I tried to follow the directions to erase and reload the firmware. MFDeploy would show the Netduino as available when selecting USB but all actions would hang. I tried to wipe the board and reload the bootloader using Atmel SAM-BA but this also failed saying it was unable to connect. The board shows up in Device Manager (Windows 7 64 bit) as a Netduino.

This is a new Netduino Plus that I purchased at Maker Faire NY. I do not remember what FW version the board is running and I can not check anymore but it is still running the same version that came on it.

Any Suggestions?

#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 30 September 2010 - 12:33 AM

Hi Tom, If you're wanting to totally erase your Netduino and reflash it via SAM-BA: 1. You need a 32-bit Windows machine with the latest SAM-BA 2. You need to fully erase your Netduino/Netduino Plus 3. Once you erase your Netduino/Netduino Plus it will appear as a virtual COM port. It will not appear as a Netduino. On the first run of Netduino Plus boards, the gold "erase" pad is covered by solder. It is located directly underneath digital pin 0 and is the top-right-most square of solder on the board. You need to connect it to the 3.3V power header for at least 330ms. You may need to run a wire across it a bit to get good contact--and a full erase. But before you do that, can you try erasing your Netduino app via MFDeploy? If you hold the pushbutton on your Netduino Plus while plugging it into your PC, it should go into "TinyBooter" bootloader mode. If you press ERASE within 5 seconds in MFDeploy, that should erase your Netduino app--and you should be back in business. Chris

#3 Tom Haynes

Tom Haynes

    New Member

  • Members
  • Pip
  • 4 posts

Posted 30 September 2010 - 03:57 AM

To clarify, I don't want to wipe the firmware it just seems to be my last option. I wanted to be able to load apps again. I tried holding the button when connecting the board but tinybooter never starts and hitting erase in mfdeploy just hangs until I unplug the board. Something is working since the hardware is recognized by windows and mfdeploy.

#4 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 30 September 2010 - 04:57 AM

To clarify, I don't want to wipe the firmware it just seems to be my last option. I wanted to be able to load apps again. I tried holding the button when connecting the board but tinybooter never starts and hitting erase in mfdeploy just hangs until I unplug the board. Something is working since the hardware is recognized by windows and mfdeploy.


Hi Tom,

If you hold the pushbutton on your Netduino Plus while plugging it into your PC, it should stay in TinyBooter mode for 5 seconds. If you PING the device from MFDeploy during those five seconds, it'll stay in the bootloader for at least 20 more seconds.

Is your network cable plugged into the Netduino Plus?

Chris

#5 Tom Haynes

Tom Haynes

    New Member

  • Members
  • Pip
  • 4 posts

Posted 30 September 2010 - 01:46 PM

If you hold the pushbutton on your Netduino Plus while plugging it into your PC, it should stay in TinyBooter mode for 5 seconds. If you PING the device from MFDeploy during those five seconds, it'll stay in the bootloader for at least 20 more seconds.


===== SOLVED =====
All it took was a little better description of the reset procedure. Thanks Chris. I was holding the button for several seconds while powering up and then trying to ping. I offer the following instructions for others who are as lost as I was.

-- Erasing apps from Netduino or Netduino Plus using MFDeploy
This procedure only erases the apps space of the Netduino. It will not erase the Firmware or the Bootloader. You should use this procedure if you can no longer talk with the Netduino using Visual Studio or MFDeploy. The Netduino must still show up in Windows Device Manager (Start->Run->devmgmt.msc) under Universal Serial Bus Controllers as Netduino and in MFDeploy as USB->Netduino_Netduino or USB->NetduinoPlus_NetduinoPlus. If not, you have other problems.

What you need to complete this task:
1. Netduino or Netduino Plus
2. USB cable that fits your Netduino
3. MFDeploy.exe
Click on Start->All Programs->Microsoft .NET Micro Framework 4.1->Tools
This will open a folder where you will find MFDeploy.exe, if you are hiding known extensions the file will be called just MFDeploy. (MFDeploy.exe.config shows up as MFDeploy.exe if known extensions are hidden)
If you don't see Microsoft .NET Micro Framework 4.1 you missed step 2 of installing the development environment. Go here and follow the steps in the top left corner of the page.

Preparing to complete this task:
Since all of the steps are time sensitive, you will need to have everything ready to be able to act quickly.
1. Open MFDeploy.exe
2. In MFDeploy under the Device section, change the left most drop down box from its default of Serial to USB
3. Place your mouse over the Ping button but do not click it yet. You will only have 5 seconds to click it when the time comes.
4. Plug the USB cable in to the computer but not the Netduino

Completing this task:
All actions are time sensitive. You will only have 5 seconds to complete the first steps to enter TinyBooter and then only 20 seconds to complete the remaining steps.
1. Remove all cables plugged in to the Netduino (There is no time limit on this step)
2. While holding the button on the Netduino down, plug the USB cable in. Continue holding the button until after step 4.
3. Within 1/2 a second, the Netduino should show up in MFDeploy between the USB drop down and the Ping button. If it does not appear, your USB cable may be bad.
4. Press the ping button within 5 seconds of the Netduino appearing in MFDeploy. The response should be "Pinging... TinyBooter"
If you see only "Pinging..." then the Netduino is not responding. You may have been too slow, Try again.
If it still fails, try releasing the button after the Netduino appears in MFDeploy but before you press ping. The button could also be bad and therefore skipping the TinyBooter stage. Try testing the button with an ohm meter.
If you see "Pinging... TinyCLR" you were too slow or but the Netduino is working fine and should not be having any problems.
You can skip this ping step and go straight to Erase but then you will only have 5 seconds, instead of 20, to press Erase and click Yes in the confirmation window.
5. You now have 20 seconds to press the Erase button
6. A confirmation window will open asking you if you want to erase the application and data. Click Yes.
7. You will see a status bar in a popup window. When the window closes the erase is done.
If you did this from TinyBooter then the closing of the status window is all you will see. Continue to step 8.
If you did this from TinyCLR, on purpose by not holding the button during power up or from being to slow, the Netduino will tell you it is rebooting and you will see a bunch of details about the software environment fly by.
8. Reboot the board by unplugging the USB cable and plugging it back in. If you press ping after a couple of seconds you should see "Pinging... TinyCLR". The erase worked and you can continue your work.



Is your network cable plugged into the Netduino Plus?


No Ethernet, no power, no uSD card. Only USB.

#6 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 30 September 2010 - 02:21 PM

Tom, Glad that you're up and running again. Thank you for posting step-by-step instructions on how to erase a Netduino app using bootloader mode. Also, just FYI, the Netduino Plus will spend about 8 seconds looking for a networking connection when it boots. If you plug a live network cable into it (using static IP at least), it will only take about 3 seconds to boot. Chris

#7 bill.french

bill.french

    Advanced Member

  • Members
  • PipPipPip
  • 260 posts
  • LocationPrinceton, NJ

Posted 30 September 2010 - 05:25 PM

Any progress recreating (and fixing) the original issue?

#8 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 30 September 2010 - 10:56 PM

Any progress recreating (and fixing) the original issue?

Hi Bill,

If you're asking about the "pushbutton sample" requiring a manual erase...we've found that tight loops can cause Visual Studio to fail to redeploy/connect.

The temporary fix for this is:
[a] Add 'Thread.Sleep(1);' to the end of your loop so that there's some "breathing room" in there.
[b] Erase the app from your Netduino Plus using MFDeploy (using the TinyBooter mode).

Chris

#9 Tom Haynes

Tom Haynes

    New Member

  • Members
  • Pip
  • 4 posts

Posted 01 October 2010 - 03:46 AM

Any progress recreating (and fixing) the original issue?

I have not tried to recreate the problem yet but it appears that Chris' statement about tight loops applies to my original cause. I had a very short program that checked for data in the serial buffer and printed it out to debug. Originally, I had a 100ms sleep in the loop but had commented it out in the last revision. If there is no data in the serial buffer the only step in the loop is to check the buffer. I will add the sleep timer back.

#10 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 01 October 2010 - 07:34 AM

We've tested this in the lab and found a glitch in the way .NET MF behaves on the Netduino Plus when using "tight loops". Official 'known issue' thread: http://forums.netdui...udio-debugging/ We've sent details to Microsoft and are working on a resolution. In the meantime, a simple workaround and recovery procedure are detailed in the 'known issue' thread. Thank you very much for bringing this to our attention, Chris

#11 Azazel

Azazel

    Member

  • Members
  • PipPip
  • 28 posts
  • LocationSweden

Posted 04 October 2010 - 05:11 PM

I dont really know what i've done, was trying to do a reset of my netduino plus i got today cuse deploy always failed when i tried to debug, just deploy whitout debug was working. Now when i connect it to the usb it shows upp as unknown device and not as netduino or virtual com port as needed for a reflash with atamel SAM-BA tools. What do i do ? :(

#12 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 04 October 2010 - 05:18 PM

Now when i connect it to the usb it shows upp as unknown device and not as netduino or virtual com port as needed for a reflash with atamel SAM-BA tools.


Azazel,

Are you running a 32-bit version of Windows? You'll need a 32-bit version of Windows to use SAM-BA.

Also if you want to erase your Netduino Plus and it's not showing up as a virtual serial port, try erasing it again. Make sure that you're connecting the 3.3V power header to the small erase pad directly underneath the D0 pin header. It's the top-right-most square on the Netduino Plus. Since the erase pad is covered by solder on the Netduino Plus beta units, you might have to rub the jumper wire across it for a second.

Chris

#13 Azazel

Azazel

    Member

  • Members
  • PipPip
  • 28 posts
  • LocationSweden

Posted 04 October 2010 - 05:22 PM

Using windows 7 x86 so yes 32-bit, and i have tried connecting the 3.3 against the square of the 6 unconnected below the digital pins (looking at it with the digital pins right to left on the top), but nothing has happened. Maybe need to rub it better.


Azazel,

Are you running a 32-bit version of Windows? You'll need a 32-bit version of Windows to use SAM-BA.

Also if you want to erase your Netduino Plus and it's not showing up as a virtual serial port, try erasing it again. Make sure that you're connecting the 3.3V power header to the small erase pad directly underneath the D0 pin header. It's the top-right-most square on the Netduino Plus. Since the erase pad is covered by solder on the Netduino Plus beta units, you might have to rub the jumper wire across it for a second.

Chris



#14 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 04 October 2010 - 05:24 PM

Using windows 7 x86 so yes 32-bit, and i have tried connecting the 3.3 against the square of the 6 unconnected below the digital pins (looking at it with the digital pins right to left on the top), but nothing has happened. Maybe need to rub it better.

What is the square of the 6?

#15 Azazel

Azazel

    Member

  • Members
  • PipPip
  • 28 posts
  • LocationSweden

Posted 04 October 2010 - 06:23 PM

What i understod the erase pin is the square of the six golden pads below the D0 pin.
if i have missunderstod this then i have no idea where the pin actually are below D0.

What is the square of the 6?


i got it erased, and managed to load it in SAM-BA tools, now what ?

#16 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 04 October 2010 - 06:31 PM

What i understod the erase pin is the square of the six golden pads below the D0 pin.
if i have missunderstod this then i have no idea where the pin actually are below D0.


The erase pad is the top-right-most square (gold normally, but silver on the beta Netduino Plus boards). The other components in that area are resistors and such--you won't want to put power to them. Just the top-rightmost square pad just below D0 (right-most).

i got it erased, and managed to load it in SAM-BA tools, now what ?


You'll want to download the TinyBooterDecompressor and Netduino firmware for the firmware you want to load (either Netduino or Netduino Plus). Community member Jason put together a good set of instructions here:
http://forums.netdui...indpost__p__347

If you run into any troubles, we'll be here...

Chris

#17 Azazel

Azazel

    Member

  • Members
  • PipPip
  • 28 posts
  • LocationSweden

Posted 04 October 2010 - 06:51 PM

I think i actually made it now, it now is recognised as a netduino when plugged in and now applying the netduino plus firmware to it again.

The erase pad is the top-right-most square (gold normally, but silver on the beta Netduino Plus boards). The other components in that area are resistors and such--you won't want to put power to them. Just the top-rightmost square pad just below D0 (right-most).



You'll want to download the TinyBooterDecompressor and Netduino firmware for the firmware you want to load (either Netduino or Netduino Plus). Community member Jason put together a good set of instructions here:
http://forums.netdui...indpost__p__347

If you run into any troubles, we'll be here...

Chris



#18 Azazel

Azazel

    Member

  • Members
  • PipPip
  • 28 posts
  • LocationSweden

Posted 04 October 2010 - 07:00 PM

well now the next issue, i cant deploy the new firmware(firmware_deploy.png) :( did manage to deploy the 4.1.0.3 firmware, but when i try deploy another now i get another error(firmware_deploy2.png).

Attached Files



#19 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 04 October 2010 - 07:19 PM

Hi Azazel, TinyBooterDecompressor holds the flash layout for the Netduino/Netduino Plus firmware. I think you flashed the Netduino TinyBooter...and the Netduino Plus firmware. You'll need to either flash "Netduino" for both or "Netduino Plus" for both... Chris

#20 Azazel

Azazel

    Member

  • Members
  • PipPip
  • 28 posts
  • LocationSweden

Posted 04 October 2010 - 07:38 PM

I used the bootloader from the 4.1.0.3 firmware thread since that is the only bootloader file i have managed to find, if there is any one else where do i find it ?

I read the guide by jason and have followed it to the letter ...

i fond a bootloader for the plus now i think, making a new try.
YES! finally got it working, got the netduino plus 4.1.0.3 firmare deployed also on it.


Hi Azazel,

TinyBooterDecompressor holds the flash layout for the Netduino/Netduino Plus firmware. I think you flashed the Netduino TinyBooter...and the Netduino Plus firmware. You'll need to either flash "Netduino" for both or "Netduino Plus" for both...

Chris


Edited by Azazel, 04 October 2010 - 07:45 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.