SPI Interfacing with MX25L6406E Serial Flash Module

A catchall for PSoC3 discussions not captured by the other forums.

Moderator: ericb

SPI Interfacing with MX25L6406E Serial Flash Module

Postby kmmankad » Sun Apr 17, 2011 1:33 am

Hi,
I'm trying to interface a PSoC 3 FTK with a MX25L6406E 64Mb serial flash module.

datasheet here - http://www.macronix.com/QuickPlace/hq/PageLibrary4825740B00298A3B.nsf/h_Index/3F21BAC2E121E17848257639003A3146/$File/MX25L6406E,%203V,%2064Mb,%20v1.0.pdf ).

-I have connected the HOLD pin to Vcc(keep High),
-The memory module is taking power from an LM317 wired for 3.3V.
-All GNDs are tied together.
-I have tried the same code with various clock speeds.

I'm sending it 0x9F(Read ID or RDID Command),and i should get back
C2,20,17 in MID,DID1,DID2 .. Page 22 of the datasheet.

But,I just keep getting random data.
Please Assist.
Attachments
SPI.zip
(1.15 MiB) Downloaded 210 times
kmmankad
Cheese Wheel
Cheese Wheel
 
Posts: 98
Joined: Sun Jun 06, 2010 5:23 pm
Website: http://kmmankad.blogspot.com
Location: India

Re: SPI Interfacing with MX25L6406E Serial Flash Module

Postby kmmankad » Sun Apr 17, 2011 3:01 am

Heres a screenshot of the data recd,as i step through the code.
By random,I mean that the data is different with each run of the code.perhaps,Inconsistent is a better word.

...The Board is now powering the memory module....
Attachments
Module.png
The memory module I'm using.
Module.png (558.41 KiB) Viewed 1979 times
RandomData.png
Random SPI Data Recd.
RandomData.png (23.85 KiB) Viewed 1980 times
kmmankad
Cheese Wheel
Cheese Wheel
 
Posts: 98
Joined: Sun Jun 06, 2010 5:23 pm
Website: http://kmmankad.blogspot.com
Location: India

Re: SPI Interfacing with MX25L6406E Serial Flash Module

Postby kmmankad » Sun Apr 17, 2011 10:48 am

Another thing i'd like to add...
Ive faced the exact same problem of inconsistent data,with my previous attempt at SPI Interfacing(with the ENC28J60 Network Chip)
kmmankad
Cheese Wheel
Cheese Wheel
 
Posts: 98
Joined: Sun Jun 06, 2010 5:23 pm
Website: http://kmmankad.blogspot.com
Location: India

Re: SPI Interfacing with MX25L6406E Serial Flash Module

Postby danadak » Sun Apr 17, 2011 3:24 pm

I would recommend you post your code/project to be looked at.

Regards, Dana.
Field Application Engineer
KB1RHB Mostly listen :)
Semi Retired
User avatar
danadak
The Big Cheese
The Big Cheese
 
Posts: 2008
Joined: Thu Dec 27, 2007 8:42 am
Location: New Hampshire

Re: SPI Interfacing with MX25L6406E Serial Flash Module

Postby kmmankad » Sun Apr 17, 2011 7:29 pm

Its already attached with the first post.
kmmankad
Cheese Wheel
Cheese Wheel
 
Posts: 98
Joined: Sun Jun 06, 2010 5:23 pm
Website: http://kmmankad.blogspot.com
Location: India

Re: SPI Interfacing with MX25L6406E Serial Flash Module

Postby undesh » Sun Apr 17, 2011 11:19 pm

My 2 cents

* Update all the components to latest one
* Check SPI mode settings on the serial flash
undesh
Bite-Size Cheese
Bite-Size Cheese
 
Posts: 20
Joined: Sun Mar 27, 2011 9:10 am

Re: SPI Interfacing with MX25L6406E Serial Flash Module

Postby abitkin » Mon Apr 18, 2011 7:41 am

So my first suggestion, do not let the component control slave select.

Many SPI devices require slave select to be held low for multiple bytes. If the component doesn't have enough data this line can toggle, causing inconsistent behavior with many devices. It is much better just to control this yourself.

For example, on some devices, if you pull the slave select high before it has finished writing a response, it will abort.

Second, normally you'd keep sending down 0's while waiting for your command to be processed and a response to be returned.
abitkin
The Big Cheese
The Big Cheese
 
Posts: 208
Joined: Wed Sep 16, 2009 11:54 am

Re: SPI Interfacing with MX25L6406E Serial Flash Module

Postby kmmankad » Thu Apr 21, 2011 4:10 am

A Big Thank you to all the members who helped out.
I implemented all your advice to a successful end result.Flawless SPI Communication at 10MBits/sec. :)
kmmankad
Cheese Wheel
Cheese Wheel
 
Posts: 98
Joined: Sun Jun 06, 2010 5:23 pm
Website: http://kmmankad.blogspot.com
Location: India


Return to “%s” PSoC3 General

Who is online

Users browsing this forum: No registered users and 1 guest

cron