Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

problem with the programming of the Flash

Status
Not open for further replies.

puneetnepsam

Junior Member level 3
Joined
Apr 27, 2009
Messages
26
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,478
hi All,

i have written a driver for programming the flash M29w128GL.

WRITE_FLASH(0x555,0xAA);
WRITE_FLASH(0x2AA,0x55);
WRITE_FLASH(0x555,0xA0);
WRITE_FLASH(0x000,0x20); //writing 0x20 to the address 0x00

the first two cycles of write is for unlocking the flash and and third one is the code for programming.
the fourth cycles writes to the address, the data.

But programming is not happenning.

i think some problem with the protection command. may be i have to unprotect the flash, but no such command is mentioned in the datasheet.

i have attached the datasheetwith this message.

can anyone please help out me!!

Thanks
 

but no such command is mentioned in the datasheet
Hm. There's a full chapter on hard- and software protection.

You may want to check the protection status with the respective command. Did you realize, that the applied programming
algorithm is valid for 16-Bit mode only? Curiously, you tried to program 8 Bit data in your example.
 

i have changed the programming mechanism to this thing....after seeign ur reply..
but thats also not working..


WRITE_FLASH(0x555,0xAA);
WRITE_FLASH(0x2AA,0x55);
WRITE_FLASH(0x555,0xA0);
WRITE_FLASH(0x000,0x2000); //writing 0x20 to the address 0x00

should i have to do something with the lock register??[/b]
 

What's the full address set with WRITE_FLASH(0x000,0x2000)? It should be a actually a long constant.

I don't know if you have set 8- or 16-bit mode in your hardware. Just a simple question.

I also don't know, if you checked the device operation in general. Personally, I would start with something simple, that
doesn't depend on protection, e.g. reading the manufacturer and device ID or the protection status, as said. The result will
reveal, if you are operating the device correctly.

In general: Read the datasheet thoroughly!
 

if your system is 16-Bit mode ,than the code shall like this:

WRITE_FLASH(0x555*2,0xAA);
WRITE_FLASH(0x2AA*2,0x55);
WRITE_FLASH(0x555*2,0xA0);
WRITE_FLASH(0x000*2,0x20); // write 2 bytes
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top