To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 26831
26830  |  26832
Subject: 
Re: HELP! NXT brick flash now read-only!!
Newsgroups: 
lugnet.robotics, lugnet.robotics.nxt
Date: 
Mon, 5 Feb 2007 11:56:28 GMT
Viewed: 
9897 times
  
On Sun, 4 Feb 2007, Juergen Stuber wrote:

actually for the adventurous hardware hacker
it might be possible to revive it using the ERASE pin.

Though in this case, and if you are sure you didn't run the script
for setting the security bit, I'd ask LEGO for a replacement.

Juergen et al.,

Good news, everyone!  The nightmare is over. :-)  And I got to learn a few
things in the process, too!

Setting the security bit must have been what I did, although I don't
specifically recall it...I do remember that, before I fully understood
exactly how going to SAM-BA mode worked, I was trying to determine if
there was some way to make it boot up the standard LEGO firmware again,
and I may indeed have run that script inadvertantly whilst poking around
(I can now see that this script exists in the SAM-BA program).  I now
realize that what I was trying to do at the time is not possible.  The
SAM-BA bootloader exists in ROM, and yet even so the bootloader design for
the NXT firmware remains a single-stage one; for some reason, SAM-BA
cannot be booted directly off of ROM, so setting the NXT to SAM-BA/
downloader mode copies the SAM-BA bootloader out of ROM and into flash, in
effect overwriting the first 4K bytes of flash (previously containing NXT
firmware boot code) with the SAM-BA code.  (Is it just me, or isn't this a
slightly silly design?  Why not a two-stage loader?)

After your mention of the ERASE pin, Juergen, I downloaded copies of the
ATMEL AT91 technical manual as well as the LEGO NXT HDK docs (w/
schematics), and found that what you and Ralph were telling me is true:
you set that security bit, and you aren't *ever* going to be let into the
flash again.  Unless you wipe it, that is, which, after setting that bit,
is not possible to do in software.

Fortunately, it looks like Atmel provided a back-door in hardware to reset
it.  I (carefully) opened up the NXT brick and (equally as carefully)
shorted VCC_OUT (pin 8) with ERASE (pin 55), which LEGO thoughtfully
traced to a nice open pad (J10)! :-)  IIRC, this had to be done and held
steadily in place before applying power.  Voila, as they say: I was
greeted with the warm sound of steady clicking from the tiny NXT speaker.
I never thought I'd be SO glad to hear that sound again.  Of course, in
its empty state, nothing was booting off the flash, and so there was no
USB link...you need to hold in the reset button to force writing of SAM-BA
to flash, and then off you go.

You all probably already knew this and are silently laughing at me (heh),
but I also discovered that when flashing firmware using the Atmel
software, it is best not to answer "Yes" impulsively at the end of the
flashing session when it asks you if it should re-lock the sections of
flash that it prompted you to unlock before it began to write to it.  It
doesn't just lock down the first 4KB (where the bootloader lives) as I had
initially assumed it would, but instead locks down every sector, which
left me with the same problem I had before: namely, that I was unable to
upload RXE code without it locking up.  Thankfully, though, it didn't have
the same effect as setting the security bit did, so I was able to re-load
SAM-BA without difficulty and flash it properly without resorting to
cracking the NXT open again. :-)

THANK you ALL for your help and patience!

--
Nathan Anderson
nathan@anderson-net.com



Message has 1 Reply:
  Re: HELP! NXT brick flash now read-only!!
 
Hi Nathan, (...) clever solution. I actually wondered how to do the debouncing, to get the required (in bold face!) pulse of at least 50ms. (...) :-) Jürgen (17 years ago, 5-Feb-07, to lugnet.robotics)

Message is in Reply To:
  Re: HELP! NXT brick flash now read-only!!
 
Hi Nathan, hi Ralph, (...) actually for the adventurous hardware hacker it might be possible to revive it using the ERASE pin. Though in this case, and if you are sure you didn't run the script for setting the security bit, I'd ask LEGO for a (...) (17 years ago, 4-Feb-07, to lugnet.robotics)

8 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR