Author Topic: NandPro: LPT and USB nand flash programmer with only 7 wires  (Read 257770 times)

Tiros

  • Master Hacker
  • ****
  • Posts: 451
    • View Profile
NandPro: LPT and USB nand flash programmer with only 7 wires
« on: August 18, 2009, 10:45:58 AM »
Heads up!
File should be available soon ;)

Supported device interfaces:

USB:
   LPC2148 Olimex USB header board
   High performance 16MB/2Mins
   LibUsb driver

LPT:
   Parallel Printer Port, SPP mode
   Low performance, 16MB/35mins (cpu dependant)
   Dlportio printer port driver


Seven connections must be made from MAINBRD to the HW device interface.
   MAINBRD connects as specified to either Olimex board, or a PC printer port.

ArmLpc   Olimex      LPT         MAINBRD

SS   EXT1-3      DB25.1      J1D2.2
MISO   EXT1-6      DB25.11      J1D2.4
P0.28   EXT2-1      DB25.16      J2B1.6
GND   EXT1-26      DB25.18      J1D2.6   or    J2B1.12
MOSI   EXT1-7      DB25.14      J1D2.1
SCK   EXT1-5      DB25.2      J1D2.3         
P0.29   EXT2-2      DB25.17      J2B1.5

   Some parallel ports run at 3.3v others at 5v. The MAINBRD is 3.3 volts.
   Testing with 5 volt lpt and NO resistors didn't burn anything up. YMMV :P
   It is recomnened to use 100 ohm series resistors
    for all lpt connections except for DB25.11 and DB25.18 (GND).
   This solution isn't perfect but you typically dont leave it hooked up forever anyway.
   If someone wants to design and post a buffer circuit go right ahead. I can't be bothered ;)


DarkstarTM

  • Member
  • **
  • Posts: 45
    • View Profile
Re: NandPro: LPT and USB nand flash programmer with only 7 wires
« Reply #1 on: August 18, 2009, 12:00:28 PM »
For a very cheap USB flash programmer I would suggest:

http://www.reichelt.de/index.html?;ARTICLE=87000
http://www.reichelt.de/index.html?;ARTICLE=37863
http://www.reichelt.de/index.html?;ARTICLE=9281

this should be really easy to build up on a breadboard.







utar

  • Master Hacker
  • ****
  • Posts: 329
    • View Profile
Re: NandPro: LPT and USB nand flash programmer with only 7 wires
« Reply #2 on: August 18, 2009, 12:52:12 PM »

Quick question.

Are these connection points, and the ones for the JTAG 3 resistors, still valid for Jasper boards?  I seem to remember tmbinc saying someone about GPIO points beiong removed from Jasper boards but other connections points were available.


Cheers



Utar

tmbinc

  • Global Moderator
  • Master Hacker
  • *****
  • Posts: 286
    • View Profile
Re: NandPro: LPT and USB nand flash programmer with only 7 wires
« Reply #3 on: August 18, 2009, 12:56:18 PM »
For flashing, they are still valid.

For JTAG (i.e. the resistor points), they are not - there is no J1F1 on Zephyr and up. But i think Tiros found replacement connections.
Please don't copy/quote full text outside this board. Instead, summarize and link to this post. Thanks! This lets me keep information updated and doesn't pull things out of context.

Auster

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: NandPro: LPT and USB nand flash programmer with only 7 wires
« Reply #4 on: August 18, 2009, 02:02:05 PM »
After googling a little....

http://rapidshare.de/files/48149176/NandPro20.rar.html

Is this what we are talking about here?

utar

  • Master Hacker
  • ****
  • Posts: 329
    • View Profile
Re: NandPro: LPT and USB nand flash programmer with only 7 wires
« Reply #5 on: August 18, 2009, 02:18:46 PM »
Thanks tmbinc.

I assume the USB header board is one of these: http://www.olimex.com/dev/lpc-h2148.html

As a matter of interest does the flasher depend on the smc in any way?  Namely if something went wrong with the reflash and the smc code was wiped from the nand would it be possible to recover?



Utar
« Last Edit: August 18, 2009, 02:24:54 PM by utar »

omriiluz

  • Member
  • **
  • Posts: 17
    • View Profile
Re: NandPro: LPT and USB nand flash programmer with only 7 wires
« Reply #6 on: August 18, 2009, 03:19:07 PM »
Hi,
Any chance I can get the source code? I don't work with LPC but have other options.
I can either port to AVR or Cortex M3 (if speed is needed).
Hopefully I can use BusPirate (http://www.buspirate.com) to control the JTAG and port your app to send serial (over usb) the data. I haven't seen talks about th BusPirate in this community, but its the ultimate solution for many of the hack executed here - and can serve as a common protocol for many of the tools used here. I'll post something about it soon. 

Thanks!

Heads up!
File should be available soon ;)

Supported device interfaces:

USB:
   LPC2148 Olimex USB header board
   High performance 16MB/2Mins
   LibUsb driver

LPT:
   Parallel Printer Port, SPP mode
   Low performance, 16MB/35mins (cpu dependant)
   Dlportio printer port driver


Seven connections must be made from MAINBRD to the HW device interface.
   MAINBRD connects as specified to either Olimex board, or a PC printer port.

ArmLpc   Olimex      LPT         MAINBRD

SS   EXT1-3      DB25.1      J1D2.2
MISO   EXT1-6      DB25.11      J1D2.4
P0.28   EXT2-1      DB25.16      J2B1.6
GND   EXT1-26      DB25.18      J1D2.6   or    J2B1.12
MOSI   EXT1-7      DB25.14      J1D2.1
SCK   EXT1-5      DB25.2      J1D2.3         
P0.29   EXT2-2      DB25.17      J2B1.5

   Some parallel ports run at 3.3v others at 5v. The MAINBRD is 3.3 volts.
   Testing with 5 volt lpt and NO resistors didn't burn anything up. YMMV :P
   It is recomnened to use 100 ohm series resistors
    for all lpt connections except for DB25.11 and DB25.18 (GND).
   This solution isn't perfect but you typically dont leave it hooked up forever anyway.
   If someone wants to design and post a buffer circuit go right ahead. I can't be bothered ;)



maximilian0017

  • Xbox Hacker
  • *****
  • Posts: 684
    • View Profile
Re: NandPro: LPT and USB nand flash programmer with only 7 wires
« Reply #7 on: August 18, 2009, 04:39:06 PM »
First of all, great work guys!!

Will i be possible to read and write the Nand?

Had the same question as Utar, when flashing fails(wrong image etc) and the SMC code is wiped can you just try again or do you need to get another way to reflash?

I can either port to AVR or Cortex M3 (if speed is needed).

Cortex a3 boards are quite expensive aren't they?
The Olimex board is €34,95(+shipping and they are closed this month)
What about an AT90USBKEY (at $29,95) 12mbit usb 16MB onboard flash memory, 3,3v I/O, very small, would be a nice fit, probably very easy to get everywhere.(can even measure the temparature inside your xbox LOL)
(Still learning AVR so i cannot help you there, but will certanly get one if needed)

The Bus-pirate is also a nice option, the problem is that the Hack a day preorder 2 ended with a lot of people not getting their Bus-Pirate because of shortages of the Pic chip used, Ian is in the process of developping a new v3 version with another chip, but i don't know exactly when that is going to ship (99% sure after preorder 2 is shipped completely)

Is this getting off topic?

maximilian0017

  • Xbox Hacker
  • *****
  • Posts: 684
    • View Profile
Re: NandPro: LPT and USB nand flash programmer with only 7 wires
« Reply #8 on: August 18, 2009, 04:59:09 PM »
Doesn't the buspirate use a usb-> serial converter?, that would mean you are tied to serial speeds.....still a nice tool to have.

bucksie

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: NandPro: LPT and USB nand flash programmer with only 7 wires
« Reply #9 on: August 18, 2009, 05:03:05 PM »
pretty sure the infectus could be modded to allow spi programming of the nand rather then the 30 wires it requires the other way

Tiros

  • Master Hacker
  • ****
  • Posts: 451
    • View Profile
Re: NandPro: LPT and USB nand flash programmer with only 7 wires
« Reply #10 on: August 18, 2009, 05:14:02 PM »
Will i be possible to read and write the Nand?
Had the same question as Utar, when flashing fails(wrong image etc) and the SMC code is wiped can you just try again or do you need to get another way to reflash?

It will flash a blank chip. It will flash a corrupt chip. It will flash an xd card, it will flash a Cygnos.

If you flash the wrong image, with an incorrect smc version for your hardware, that makes recovery more difficult but not impossible. This seems to really confuse the controller. Shorting together a cupl flash pins at power up seems to allow access again. Probably makes controller think the chip is blank.


benjmole1

  • Member
  • **
  • Posts: 10
    • View Profile
Re: NandPro: LPT and USB nand flash programmer with only 7 wires
« Reply #11 on: August 18, 2009, 05:31:56 PM »
This may seem really dumb, but in the LPT case, do we/can we solder wires directly from the pins?

Straßenkampf

  • Hacker
  • ***
  • Posts: 81
    • View Profile
Re: NandPro: LPT and USB nand flash programmer with only 7 wires
« Reply #12 on: August 18, 2009, 06:39:27 PM »
Hey,

gettin

Error: 0      Reading Block 0
Error: 0      Reading Block 1
....
....

Start and Ending Adress gets recognized but the flash dump is just full of $#!t.
Using  EPP Mode in Bios, LPT Adapter built with 100Ohm Resistors

Tiros

  • Master Hacker
  • ****
  • Posts: 451
    • View Profile
Re: NandPro: LPT and USB nand flash programmer with only 7 wires
« Reply #13 on: August 18, 2009, 07:45:31 PM »
Hey,
gettin
Error: 0      Reading Block 0
Error: 0      Reading Block 1
....
Start and Ending Adress gets recognized but the flash dump is just full of $#!t.
Using  EPP Mode in Bios, LPT Adapter built with 100Ohm Resistors


Post the exact command line you typed.
What was the "FlashConfig" value?
Post your log file.
Try SPP, or ECP.
The ports are searched for controller on 378, 278, 3bc
« Last Edit: August 18, 2009, 07:49:00 PM by Tiros »

Straßenkampf

  • Hacker
  • ***
  • Posts: 81
    • View Profile
Re: NandPro: LPT and USB nand flash programmer with only 7 wires
« Reply #14 on: August 18, 2009, 07:58:36 PM »
Nandpro lpt: -r16 filename.bin

Testing LPT device address:0378
Using LPT device at address:0378
FlashConfig:00012000
Starting Block:0x000000
Ending   Block:0x00000F
Error:   0 reading block 0
Error:   0 reading block 1
Error:   0 reading block 2
Error:   0 reading block 3
Error:   0 reading block 4
Error:   0 reading block 5
Error:   0 reading block 6
Error:   0 reading block 7
Error:   0 reading block 8
Error:   0 reading block 9
Error:   0 reading block A
Error:   0 reading block B
Error:   0 reading block C
Error:   0 reading block D
Error:   0 reading block E
Error:   0 reading block F
and so on...

My bios doesn't give me the option SPP, just ECP,EPP, Bi-Directional and Normal. Every mode gives me errors and a complete useless dump. Btw the voltage of the parallel port should be fine with 4,8V.
« Last Edit: August 18, 2009, 08:01:32 PM by Straßenkampf »

Tiros

  • Master Hacker
  • ****
  • Posts: 451
    • View Profile
Re: NandPro: LPT and USB nand flash programmer with only 7 wires
« Reply #15 on: August 18, 2009, 08:07:09 PM »
"Normal" = SPP
That flashconfig is not valid.
Your not getting data back from the controller.
Double check your wiring and resistor values.
There are 2 connections with no resistor, check there are none.
Try another PC.

Straßenkampf

  • Hacker
  • ***
  • Posts: 81
    • View Profile
Re: NandPro: LPT and USB nand flash programmer with only 7 wires
« Reply #16 on: August 18, 2009, 08:10:52 PM »
i checked the wiring with multimeter, resistors are also ok. Hopefully i'm gettin my USB-2-LPT Adapter today.
Will your app work with such?.. and is it maybe possible you compile NandPro for Linux cause then i could test on my laptop with the adapter?!

Tiros

  • Master Hacker
  • ****
  • Posts: 451
    • View Profile
Re: NandPro: LPT and USB nand flash programmer with only 7 wires
« Reply #17 on: August 18, 2009, 08:16:21 PM »
Sorry right now only ports 378, 278, and 3bc are supported.
I seriously doubt that a usb->lpt will work.

benjmole1

  • Member
  • **
  • Posts: 10
    • View Profile
Re: NandPro: LPT and USB nand flash programmer with only 7 wires
« Reply #18 on: August 18, 2009, 09:12:33 PM »
Can anyone post some kind of diagram please on the LPT cable? It'd really make my day.
Sorry for asking twice, i'm just a bit buggered without it :P

Relapse75

  • Member
  • **
  • Posts: 16
    • View Profile
Re: NandPro: LPT and USB nand flash programmer with only 7 wires
« Reply #19 on: August 19, 2009, 12:53:05 AM »
I doupt a usb to LPT adapter will work.  I'm also getting that same config I checked my wiring and tested it but no go.