Netduino home hardware projects downloads community

Jump to content


Photo

Steps to restore an Erased Netduino


  • Please log in to reply
36 replies to this topic

#1 Jason Smith

Jason Smith

    Member

  • Members
  • PipPip
  • 17 posts
  • LocationEnglewood, CO

Posted 13 August 2010 - 06:08 AM

All, Can someone provide the steps needed to restore an Netduino that has been erased? Believe it or not.. I managed to accidentally erase my Netduino during testing... Jason.

#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 6892 posts
  • LocationNew York, NY

Posted 13 August 2010 - 06:25 AM

Can someone provide the steps needed to restore an Netduino that has been erased? Believe it or not.. I managed to accidentally erase my Netduino during testing...

Here is an overview:
Step 1: connect the 3V3 power header to the ERASE pin (gold pad directly underneath digital pin 0)
Step 2: use SAM-BA to flash TinyBooterDecompressor.bin to your erased Netduino
Step 3: use MFDeploy to deploy the Netduino firmware to your Netduino

Here are the files:
http://forums.netdui...e-v410-patch-1/

If you would like step-by-step instructions on how to use SAM-BA, I can write some up here... But basically, you [a] enable boot from flash; [b] enable flash access; [c] flash the TinyBooterDecompressor.bin file to your Netduino. Your erased Netduino will show up as a virtual serial port; you may need to manually point it to the driver in the Program Files > Atmel SAM-BA > Drivers directory.

Chris

#3 Jason Smith

Jason Smith

    Member

  • Members
  • PipPip
  • 17 posts
  • LocationEnglewood, CO

Posted 13 August 2010 - 06:46 AM

Here is an overview:
Step 1: connect the 3V3 power header to the ERASE pin (gold pad directly underneath digital pin 0)
Step 2: use SAM-BA to flash TinyBooterDecompressor.bin to your erased Netduino
Step 3: use MFDeploy to deploy the Netduino firmware to your Netduino

Here are the files:
http://forums.netdui...e-v410-patch-1/

If you would like step-by-step instructions on how to use SAM-BA, I can write some up here... But basically, you [a] enable boot from flash; [b] enable flash access; [c] flash the TinyBooterDecompressor.bin file to your Netduino. Your erased Netduino will show up as a virtual serial port; you may need to manually point it to the driver in the Program Files > Atmel SAM-BA > Drivers directory.

Chris

I may need a step by step write-up. :unsure: Basically, I attempted to do what you said, but didnt have much luck. I downloaded SAM-BA, and I got my Netduino to come up using COM4. I selected at91sam7x512-ek when prompted to select my board. I then selected the script "Boot from Flash (GPNVM2)" then "Enable Flash Access". Next I selected the TinyBooterDecompressor.bin file needed from "Send File Name" area, and sent the file. I was then prompted with "Do you want to lock involved regions(s) (0 to 2)"..I didnt know what to select here so I clicked yes. I received the following output:

(SAM-BA v2.10) 1 % send_file {Flash} "C:/Users/Jason/Desktop/TinyBooterDecompressor_v4.1.0.1/TinyBooterDecompressor.bin" 0x100000 0
-I- Send File C:/Users/Jason/Desktop/TinyBooterDecompressor_v4.1.0.1/TinyBooterDecompressor.bin at address 0x100000
first_sector 0 last_sector 2
-I- Writing: 0xA358 bytes at 0x0 (buffer addr : 0x202C88)
-I- 0xA358 bytes written by applet
-I- Sector 0 locked
-I- Sector 1 locked
-I- Sector 2 locked
(SAM-BA v2.10) 1 %


I then tried to redeploy the Netduino firmware via com4 in MFDeploy without luck.. Recieved the error "Error: No response from device"

#4 Jason Smith

Jason Smith

    Member

  • Members
  • PipPip
  • 17 posts
  • LocationEnglewood, CO

Posted 13 August 2010 - 06:57 AM

I may need a step by step write-up. :unsure: Basically, I attempted to do what you said, but didnt have much luck. I downloaded SAM-BA, and I got my Netduino to come up using COM4. I selected at91sam7x512-ek when prompted to select my board. I then selected the script "Boot from Flash (GPNVM2)" then "Enable Flash Access". Next I selected the TinyBooterDecompressor.bin file needed from "Send File Name" area, and sent the file. I was then prompted with "Do you want to lock involved regions(s) (0 to 2)"..I didnt know what to select here so I clicked yes. I received the following output:

(SAM-BA v2.10) 1 % send_file {Flash} "C:/Users/Jason/Desktop/TinyBooterDecompressor_v4.1.0.1/TinyBooterDecompressor.bin" 0x100000 0
-I- Send File C:/Users/Jason/Desktop/TinyBooterDecompressor_v4.1.0.1/TinyBooterDecompressor.bin at address 0x100000
first_sector 0 last_sector 2
-I- Writing: 0xA358 bytes at 0x0 (buffer addr : 0x202C88)
-I- 0xA358 bytes written by applet
-I- Sector 0 locked
-I- Sector 1 locked
-I- Sector 2 locked
(SAM-BA v2.10) 1 %


I then tried to redeploy the Netduino firmware via com4 in MFDeploy without luck.. Recieved the error "Error: No response from device"


Scratch that last request chris... i got it to work... Sorry about that. I will write up a step by step process if you like to save you the trouble...I am sure there are going to be some people like me that are new when it comes to this stuff :D

#5 Jason Smith

Jason Smith

    Member

  • Members
  • PipPip
  • 17 posts
  • LocationEnglewood, CO

Posted 13 August 2010 - 02:37 PM

Scratch that last request chris... i got it to work... Sorry about that. I will write up a step by step process if you like to save you the trouble...I am sure there are going to be some people like me that are new when it comes to this stuff :D


So here is the step by step process:

1. Download SAM-BA from Atmel here and install : http://www.atmel.com...sp?tool_id=3883

2. Download the latest Netduino firmware, and the TinyBooterDecompressor_v4.1.0.1.zip file. (Currently both are located Here.)

3. (**WARNING.. no turning back after this point.) Using a jumper, Connect the 3V3 power header to the ERASE pin (gold pad directly underneath digital pin 0) for about 2-3 seconds. After doing this, disconnect the Netduino from your PC.

4. Plug in your Netduino's usb cable back into your pc. At this point for me, windows vista searched automatically for a driver and found the right one for a virtual serial port. If yours does not do this, you may need to point to the driver file in the Program Files > Atmel SAM-BA > Drivers directory.

5. Run SAM-BA. Select the COM port that your device is connected to. In my case this was COM4. Select AT91SAM7X512-ex from the dropdown.

6. When in SAM-BA, you will need to run the following two scripts first: [a] enable boot from flash; [b] enable flash access.

7. Next you will need to flash the TinyBooterDecompressor.bin file to your Netduino. At this point you are asked "Do you want to lock involved regions(s) (0 to 2)".." I wasnt sure what to pick here but I believe I selected no. (Chris Walker confirmed in a later post that "NO" should be selected.) Once this has been completed (only takes a few seconds), you are done flashing the TinyBooterDecompressor.

8. At this point you can unplug the USB cable connecting your computer to your Netduino, and then plug it back in. Now we can readd the Netduino firmware.

9. Go to the Start Menu > Programs > Microsoft .NET Micro Framework 4.1 > Tools

10. Run MFDeploy.exe. Be careful to run MFDeploy.exe and not MFDeploy.exe.config (as file extensions are hidden by default)

11. In the Device section at top, select USB instead of Serial. Your Netduino should appear in the drop-down; if not, select it.

12. Click "Browse..." and select the unzipped Netduino firmware files from step #1 (ER_CONFIG and ER_FLASH).

13. Press "Deploy". It will take a few minutes to update your Netduino. At this point you should be finished. Disconnect then Reconnect your Netduino via usb and it should be back up and running.


Please let me know if I missed anything here. Thanks again for all your help on this issue Chris!

Jason.

#6 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 6892 posts
  • LocationNew York, NY

Posted 13 August 2010 - 03:06 PM

7. Next you will need to flash the TinyBooterDecompressor.bin file to your Netduino. At this point you are asked "Do you want to lock involved regions(s) (0 to 2)".." I wasnt sure what to pick here but I believe I selected no. (Can anyone confim the correct option here?)


You should select NO (to not lock regions).

Jason, glad you got it to work. Thanks for the excellent write-up!

Chris

#7 MrSmoofy

MrSmoofy

    Advanced Member

  • Members
  • PipPipPip
  • 42 posts
  • LocationOdessa, FL

Posted 13 August 2010 - 05:13 PM

3. Connect the 3V3 power header to the ERASE pin (gold pad directly underneath digital pin 0).


I may of missed it when reading but at what point do you UNDO what you do in step 3.

#8 MrSmoofy

MrSmoofy

    Advanced Member

  • Members
  • PipPipPip
  • 42 posts
  • LocationOdessa, FL

Posted 13 August 2010 - 05:15 PM

8. At this point you can unplug the USB cable connecting your computer to your Netduino, and then plug it back in. Now we can readd the Netduino firmware.

9. Go to the Start Menu > Programs > Microsoft .NET Micro Framework 4.1 > Tools

10. Run MFDeploy.exe. Be careful to run MFDeploy.exe and not MFDeploy.exe.config (as file extensions are hidden by default)

11. Plug your Netduino into your PC using a Micro USB cable. For this specific update, plug the USB cable into your Netduino first...and then your PC.



Also here in step 8 you say unplug and plug it back in. Then in step 11 you say plug it in again but it's already plugged in was there somewhere you should of unpluged it before you get to step 11?

#9 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 6892 posts
  • LocationNew York, NY

Posted 13 August 2010 - 05:16 PM

I may of missed it when reading but at what point do you UNDO what you do in step 3.


You only need to power the ERASE pad (from the 3V3 header) for about 220 milliseconds. We recommend that you plug a jumper wire into the 3V3 power header and then touch the other end to the ERASE pad. Just hold it there for a second or two...and then unplug and reconnect your Netduino.

#10 MrSmoofy

MrSmoofy

    Advanced Member

  • Members
  • PipPipPip
  • 42 posts
  • LocationOdessa, FL

Posted 13 August 2010 - 05:21 PM

You only need to power the ERASE pad (from the 3V3 header) for about 220 milliseconds. We recommend that you plug a jumper wire into the 3V3 power header and then touch the other end to the ERASE pad. Just hold it there for a second or two...and then unplug and reconnect your Netduino.


Thanks, (I don't even have a netduino yet) wanted to make sure the steps were clear in case I had to do this. So #3 says connect but it's more of a touch it to the erase pad for a couple of seconds to make sure it's clear of everything.

#11 Flores

Flores

    Advanced Member

  • Members
  • PipPipPip
  • 64 posts

Posted 13 August 2010 - 06:35 PM

All,

Can someone provide the steps needed to restore an Netduino that has been erased? Believe it or not.. I managed to accidentally erase my Netduino during testing...

Jason.


How did you do that. Could you share a tip so it won't happen to us too?

Thanks

#12 Jason Smith

Jason Smith

    Member

  • Members
  • PipPip
  • 17 posts
  • LocationEnglewood, CO

Posted 13 August 2010 - 07:03 PM

Also here in step 8 you say unplug and plug it back in. Then in step 11 you say plug it in again but it's already plugged in was there somewhere you should of unpluged it before you get to step 11?



Good point.. It is already plugged in at that point. I made an update above. Nice catch.

#13 Jason Smith

Jason Smith

    Member

  • Members
  • PipPip
  • 17 posts
  • LocationEnglewood, CO

Posted 13 August 2010 - 07:06 PM

How did you do that. Could you share a tip so it won't happen to us too?

Thanks


If you can believe it, I had a jumper plugged into 3.3v when I set my Netduino down on my table (Bad practice for sure...) and the jumper lead just happened to touch the erase pin long enough to erase it. 1 in a million chance. lol.

Jason.

#14 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 6892 posts
  • LocationNew York, NY

Posted 13 August 2010 - 07:16 PM

If you can believe it, I had a jumper plugged into 3.3v when I set my Netduino down on my table (Bad practice for sure...) and the jumper lead just happened to touch the erase pin long enough to erase it. 1 in a million chance. lol.


How funny. And to think that we made sure to make the ERASE pad small and to put it in a corner (and to require 220ms+ to erase it). :)

I guess this is another testament to open source and to having firmware that can be manually installed. Glad it's working well for you, and thanks again for writing up such nice step-by-step instructions for the community.

Chris

#15 Jason Smith

Jason Smith

    Member

  • Members
  • PipPip
  • 17 posts
  • LocationEnglewood, CO

Posted 13 August 2010 - 07:33 PM

How funny. And to think that we made sure to make the ERASE pad small and to put it in a corner (and to require 220ms+ to erase it). :)

I guess this is another testament to open source and to having firmware that can be manually installed. Glad it's working well for you, and thanks again for writing up such nice step-by-step instructions for the community.

Chris


Yeah, I couldnt believe it myself. I think its a great feature on the board, and I wouldnt change a thing about it.. Also, I might have never learned how to use SAM-BA if this didnt happen. Good stuff, and good learning. So far I am loving everything about the Netduino.

As for the Write-up, no problem at all. If it wasn't for good posts on forums, and the huge amount of information online, I would have had to go to college. lol

"The Internet - Saving you thousands of dollars in tuition since 1973."

Jason.

#16 Marijn Eken

Marijn Eken

    New Member

  • Members
  • Pip
  • 4 posts

Posted 17 August 2010 - 12:29 PM

...

4. Plug in your Netduino's usb cable back into your pc. At this point for me, windows vista searched automatically for a driver and found the right one for a virtual serial port. If yours does not do this, you may need to point to the driver file in the Program Files > Atmel SAM-BA > Drivers directory.

...


Could it be that Atmel has no drivers for Windows XP 64-bit? Or any 64-bit OS for that matter?
Because when I try to manually point it to that directory, Windows XP 64-bit says that it "couldn't find the necessary software. make sure that the driver works with x64-based systems."
Is there any other driver I could install maybe? Because, it sounds like the COM port over USB could be something generic.

#17 José Ángel

José Ángel

    Advanced Member

  • Members
  • PipPipPip
  • 39 posts
  • LocationSpain

Posted 17 August 2010 - 01:19 PM

Could it be that Atmel has no drivers for Windows XP 64-bit? Or any 64-bit OS for that matter?
Because when I try to manually point it to that directory, Windows XP 64-bit says that it "couldn't find the necessary software. make sure that the driver works with x64-based systems."
Is there any other driver I could install maybe? Because, it sounds like the COM port over USB could be something generic.


I have read in another thread that you need XP Mode: http://forums.netdui...indpost__p__283

#18 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 6892 posts
  • LocationNew York, NY

Posted 17 August 2010 - 03:18 PM

Just FYI...you can also reflash an erased Netduino via pins D0/D1/GND (using a 3V3 USB to TTL cable or an RS232 shield). If you press F8 during boot and disable driver signing, does that allow you to load the Atmel drivers. I'll chat with Atmel and see if there's any way to sign their drivers. Not a quick process, but something we'll start looking at. Chris

#19 klotz

klotz

    Advanced Member

  • Members
  • PipPipPip
  • 60 posts

Posted 17 August 2010 - 11:41 PM

I have read in another thread that you need XP Mode: http://forums.netdui...indpost__p__283

I not sure that you actually need to use XP mode. I am doing all my work in Window7 Ultimate 64-bit native mode.
I didn't have to do anything special to make it work either.

#20 José Ángel

José Ángel

    Advanced Member

  • Members
  • PipPipPip
  • 39 posts
  • LocationSpain

Posted 18 August 2010 - 12:35 AM

I not sure that you actually need to use XP mode. I am doing all my work in Window7 Ultimate 64-bit native mode.
I didn't have to do anything special to make it work either.


I understand that from Chris' post

Just FYI...you can also reflash an erased Netduino via pins D0/D1/GND (using a 3V3 USB to TTL cable or an RS232 shield).

If you press F8 during boot and disable driver signing, does that allow you to load the Atmel drivers.

I'll chat with Atmel and see if there's any way to sign their drivers. Not a quick process, but something we'll start looking at.

Chris






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

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