Bootloader - program Flash through JTAG
From NAS-2000.org
Important:
If you are not used to do soldering on a PCB, please do not continue!
Never connect the JTAG signals directly to the PC's LPT port! You may damage the hardware as the standard LPT port has 5V voltage levels and our NAS is 3,3V! If you limit the voltage at 3,3V you may use an unbuffered cable as described here: http://forum.nas-forum.org/thread.php?threadid=12
Be aware of ESD protection! Have a look at: http://en.wikipedia.org/wiki/Electrostatic_discharge
Connect PC GND with NAS GND - e.g. with a serial or USB cable...
Our Nas_Flashtool has been tested on some SL3316 and SL3516 processor based boards. Depending on your NAS hardware you need to enable JTAG access first!
Enabling JTAG access (some pictures can be found here):
- NAS1000 and NAS2000 (same mainboard): R160 (not equipped) on NAS (bottom side) needs to be shorted
- NAS2001: R121 (not equipped) on NAS (bottom side) needs to be shorted
- NAS4220: enabled per default
- MRT Dual NAS: R36 hack - look at the NAS unbricking guide http://mrt.nas-central.org/index.php/The_NAS_unbricking_guide
- MRT Giaganas: enabled per default
- Smartdisc/Verbatim Soho NAS: R28 (not equipped) needs to be shorted
What you need:
- JTAG access must be enabled - see above
- your NAS with powersupply
- PC running Windows 98, XP or Vista
- NAS_Flashtool - look here: http://forum.nas-forum.org/index.php?page=Board&boardID=1
- J5 pin 1 or 2 connected to pin 17 (puts CPU into "debug mode")
- JTAG Adapter: FTDI FT232R USB Adapter, Wiggler compatible JTAG adapter like: @ebay from vitualvillage-de - JTAG20 (fits 1:1), kuzito - JTAG Programmer (both devices tested)
with the FTDI FT232R USB Adapter:
Note that only the FTDI FT232R USB chip is supported
with the LPT Adapter:
(LPT port eventually needs to be uninstalled before)
- native LPT Port (no PCI extension card or USB adapter)
- LPT configured EPP or Standard Mode
- LPT driver software - download here: http://www.naughter.com/download/port95nt.exe
1. Tests without NAS hardware:
You find the pinouts of NAS, LPT and USB adapter here: http://forum.nas-forum.org/index.php?page=Thread&postID=149#post149
for LPT adapter only: You may test the complete software setup if you simply connect LPT pin 5 and 11.
Only this connection directly at the LPT connector or extension cable, no NAS, no JTAG adapter.
Start "JTag Test"
"Short plug detected." should appear somewhere in the output window
Cable type 1 detected.
Short plug detected. Device is in debug-mode - OK Reading CPU-Type (SL3516) CPU-ID: 0x000000 - not OK Expected: 0x00003516 or 0x00003512 CPU-Rev.: 0x00 Reading CPU-Type (SL3316) CPU-ID: 0x000000 - not OK Expected: 0x00003316 CPU-Rev.: 0x00 Some errors detected!
for LPT and USB adapter: Connect the LPT JTAG Adapter with the LPT port or the USB adapter to a USB port
Connect TDI (Pin 5) with TDO (Pin 13) at the 20 pin JTAG connector of your adapter.
Note: a buffered LPT adapter or a USB adapter could need power applied (normally 3.3V). This depends on the adapter design. You could supply it from any regulated power supply or directly from your NAS.
Make this connection only. No connection to your NAS is needed.
Start "JTag Test"
"Short plug detected." should appear somewhere in the output window again
If these tests were successful you may connect to the NAS!
2. Test with NAS
Reset NAS through SW2 (not equipped) or Power off/on (keep it powered on)
Start "JTag Test"
If it is OK it should look like this, if not you probably have a problem with the control signals TCK or TMS!
Cable type 1 detected. Device is in debug-mode - OK CPU-Type SL3316 detected. Flash-Manufacturer: 0x01 Flash-Device-ID: 227e-2210-2200 Flash type Bottom boot - OK
Info: Flash-Manufacturer and Flash-Device-ID is checked and only supported chips will be programmed
Flash-Manufacturer: 0xc2=MXIC, 0x01=Spansion
Flash-Device-IDs (implemented):
| S29GL064M R4 | 0x01 227e-2210-2200 = Bottom boot |
| S29GL064M R3 | 0x01 227e-2210-2201 = Top boot |
| MX29LV640MB | 0x01 227e-2210-2200 = Bottom boot |
| MX29LV640MT | 0x01 227e-2210-2201 = Top boot |
| MX29LV640DB | 0xc2 22cb-0000-0008 = Bottom boot, sectors unprotected, sectors factory unlocked |
| MX29LV640DT | 0xc2 22c9-0000-0018 = (untested) Top boot, sectors unprotected, sectors factory unlocked |
| MX29LV160DT | 0xc2 22C4-0000-0008 = Top boot |
| MX29LV160DB | 0xc2 2249-0000-0008 = (untested) Bottom boot |
Start "Write" - requires the 128k Boot image
Flashing the bootloader takes about 8min on a good old 900MHz AMD machine
successful write:
Erasing Flash. Please wait - done. Write data to Flash. 128.0 / 128.0 - done.
The Flash contents is verified during the write process but just for being absolutely sure you can use "Compare Boot" to verify the contents of the Flash. A "Compare Boot"takes about 3min on a good old 900MHz AMD machine.
Remove the connection to J5 pin 17, reset the hardware and watch the output of "RedBoot"...
Problems?
1. If it does not work it is a good idea to check if all of the JTAG pins of your adapter are working correctly.
You need a Led with a series resistor of about 1kohm.
Use "LED-Test" of the FlashTool and connect the Led from the Signal prompted to GND.
You must see the Led blinking.
Note that you can also switch to "Verbose Output" to get more detailed output messages.
2. Be sure that GND and Power (if a buffered adapter is used) is connected to the NAS correctly.
Make the cable LPT-Port - LPT-Adapter - NAS or USB-Adapter - NAS as short as possible. 10 to 15cm should be ok.