Attempting to interface w/ MX25L6406E

Hacking multi-tool. Get one for $30, including worldwide shipping.

Attempting to interface w/ MX25L6406E

Postby Dudeman » Sat Oct 17, 2015 7:16 pm

Hello,

First of all, I would like to thank the community for all the work they've done on this product. It's been a lot of fun for me playing around with the bus pirate despite having a lack of experience with these types of tools.

What I'm trying to do is retrieve firmware from a Macronix MX25L6406E using flashrom in tandem with the bus pirate. However, before I get ahead of myself with flashrom, I ran into an issue trying to interface the BP with the MX25L6406E. I desoldered one from a Grandstreams GXP1405 IP phone's motherboard as I read that it was much easier to deal with a serial flash chip out of circuit than in-circuit. Then, I connected the flash chip to the BP as follows:

Bus Pirate-----MX25L6406E
CS--------------CS
MISO-----------SO
VCC+VPU-----WP
GND-----------GND
MOSI-----------SI
CLK------------CLK
VCC+VPU------HOLD
VCC+VPU------VCC

(Note that I tied VCC and VPU together)

I've been using the default SPI Settings, i.e.:
Set speed: 30 KHz
Clock Polarity: Idle low
Output clock edge: Active to Idle
Input sample phase: Middle
CS: /CS
Select output type: Open Drain

(I have tried different combinations for the settings above with no luck.)

I then run P to turn the pull-up resistors on and W to turn on the power supplies.

Now, whenever I run the command [0x9f r r r] I expect a response of 0xC2 0x20 0x17 (manufacturer ID, memory type, and memory density respectively), but instead I receive varying responses. Here are some of the responses I received just now:

Code: Select all
SPI>[0x9f r r r]
/CS ENABLED
WRITE: 0x9F
READ: 0x03
READ: 0x03
READ: 0x03
/CS DISABLED

SPI>[0x9f r r r]
/CS ENABLED
WRITE: 0x9F
READ: 0x02
READ: 0x07
READ: 0xFF
/CS DISABLED

SPI>[0x9f r r r]
/CS ENABLED
WRITE: 0x9F
READ: 0x02
READ: 0x07
READ: 0xFF
/CS DISABLED

SPI>[0x9f r r r]
/CS ENABLED
WRITE: 0x9F
READ: 0x02
READ: 0x04
READ: 0x08
/CS DISABLED

SPI>[0x9f r r r]
/CS ENABLED
WRITE: 0x9F
READ: 0x02
READ: 0x06
READ: 0x06
/CS DISABLED


My thoughts:
1. Perhaps my wiring is faulty? In particular, I'm not positive what I did with VCC and VPU was appropriate.
2. Could my cable length(s) be causing this issue? I've seen it written before that you should limit the cable lengths to 10 cm.
3. Perhaps I bricked the MX25L6406E when I desoldered it from the board. I'll find out if that's the case when I resolder the chip to its motherboard.

Bus Pirate v3.a
Firmware v6.2-beta1 r1981 Bootloader v4.4
DEVID:0x0447 REVID:0x3046 (24FJ64GA002 B8)
2013 Macbook Air with OS X El Capitan.

Bonus: The jack-o-lantern I made yesterday while waiting for my bus pirate to be delivered.
Attachments
Jack-o-lantern-min.jpg
Happy Halloween!
MX_Wiring-min.jpg
Closer look
BP_Wiring-min.jpg
Closer look
Wiring_Overview-min.jpg
Are my connections too long? Flash chip is connected via the spring clamp in the photo above.
Dudeman
Newbie
Newbie
 
Posts: 2
Joined: Sat Oct 17, 2015 5:46 pm

Re: Attempting to interface w/ MX25L6406E

Postby sre71 » Sun Oct 18, 2015 5:26 am

Hi Dudeman
you are welcome!
Here you go some links where are some useful informations if you don't already know them:

viewtopic.php?f=4&t=6874#p59938

I think there is something wrong with how you managed your connections.
Please take a look at this:

http://dangerousprototypes.com/docs/Pra ... _resistors

There is explained how the Bus Pirate manage its pull-ups.
As stated in the document the pull-ups are only on MOSI, CLOCK, MISO and CS.
Another point is that it is not recommended provide power supply voltage throught a pull-up resistor as you did for the whole chip.
The right connections should be these:

Bus Pirate MX25L6406E
CS<-------------->CS#
MISO<-------------->SO/SIO1
VCC<-------------->WP#
GND<-------------->Vss(GND)
MOSI<-------------->SI/SIO1
CLK<-------------->SCLK
Vcc<-------------->HOLD#
Vcc<-------------->Vcc

Course you need to choose +3,3V like power supply voltage due the fact the chip isn't +5V tolerant.
Better should be provide the Vcc to WP# and HOLD# through limitation resistors (something like 10kohm should be OK) but also connecting them together isn't bad also because of the safety specifications of the Bus Pirate's power supply stage.
About how set the Bus Pirate in my opinion 30kHz is really few, very slow.
I believe even 1MHz is good.
For the parameter "Select output type:" you must to choose "2. Normal (H=3.3V, L=GND)", then you have to issue a "W" command in order to switch on the power supply.
Please don't activate the pull-up resistors (command "P") though.
Here is the sequence:

m
1. HiZ
2. 1-WIRE
3. UART
4. I2C
5. SPI
6. 2WIRE
7. 3WIRE
8. LCD
x. exit(without change)

(1)>5
Set speed:
1. 30KHz
2. 125KHz
3. 250KHz
4. 1MHz

(1)>4
Clock polarity:
1. Idle low *default
2. Idle high

(1)>
Output clock edge:
1. Idle to active
2. Active to idle *default

(2)>
Input sample phase:
1. Middle *default
2. End

(1)>
CS:
1. CS
2. /CS *default

(2)>
Select output type:
1. Open drain (H=Hi-Z, L=GND)
2. Normal (H=3.3V, L=GND)

(1)>2
Clutch disengaged!!!
To finish setup, start up the power supplies with command 'W'

Ready
SPI>W
POWER SUPPLIES ON
Clutch engaged!!!
SPI>[0x9f r r r]
/CS ENABLED
WRITE: 0x9F
READ: 0xC2
READ: 0x20
READ: 0x17
/CS DISABLED

Mission accomplished.

Regards,
sre71
sre71
Jr. Member
Jr. Member
 
Posts: 62
Joined: Sat Aug 06, 2011 3:29 pm

Re: Attempting to interface w/ MX25L6406E

Postby Dudeman » Mon Oct 19, 2015 10:27 am

Works perfectly now! Thank you for the detailed post and the helpful links sre71!
Dudeman
Newbie
Newbie
 
Posts: 2
Joined: Sat Oct 17, 2015 5:46 pm

Re: Attempting to interface w/ MX25L6406E

Postby Coffee » Fri Oct 30, 2015 1:57 pm

I am trying the same thing, but I read all 0s. What could be the problem? I followed the connection as shown in the answer above.
Coffee
Newbie
Newbie
 
Posts: 2
Joined: Thu Oct 29, 2015 10:59 pm

Re: Attempting to interface w/ MX25L6406E

Postby surfrock66 » Wed Jun 29, 2016 2:45 pm

Coffee wrote:I am trying the same thing, but I read all 0s. What could be the problem? I followed the connection as shown in the answer above.


I am experiencing this as well.
surfrock66
Newbie
Newbie
 
Posts: 16
Joined: Sat Mar 26, 2016 2:47 pm

Re: Attempting to interface w/ MX25L6406E

Postby sre71 » Thu Jun 30, 2016 3:13 pm

@Coffee
@surfrock66

Hi guys,
both you have wrote that you read all zeros, what do you mean?
Taking care that all the connections are correctly carried out do you read zeros even by issuing the sequence [0x9f r r r]?
Being able to depend on the circuitry it's possible that the problem is due wrong pull-up interface.
So in the case you have to try by use the Bus Pirate's pull-up resistors using the command "P" paying attention to don't damage either the Bus Pirate nor the device where the MX25L6406E is.

Regards,
sre71
sre71
Jr. Member
Jr. Member
 
Posts: 62
Joined: Sat Aug 06, 2011 3:29 pm

Re: Attempting to interface w/ MX25L6406E

Postby jbones » Mon Dec 19, 2016 3:06 am

@Coffee
@surfrock66

Have you guys desoldered the chip? I was also getting nulls until I tried it off the board.
jbones
Newbie
Newbie
 
Posts: 1
Joined: Mon Dec 19, 2016 2:59 am


Return to Bus Pirate Support