Programming Flash AM29F200B

Is there anyone who uses this memory to write or erase data using microcontroller- not universal programmer. I know there are 4 cycles to write byte/word but following manual and applying appropriate signals it doesnt fix the problem. Are there specific conditions should be fulfilled before writting. Thanks in advance...

Reply to
chomiczuk81
Loading thread data ...

We use the 29F400B. It works fine. What's "the problem"?

Bob

Reply to
Bob

It cooperates excellent with programmer but i am trying to write data using microcontroller. Flash requires 4 cycles to write a bite/word: addr/data = 555/AA , 2AA/55, 555/A0, PA/PD I do above commands and each cycle i apply #WE-LOW,#WE-HIGH, holding #CE and #OE-HIGH. The rwsult is fail to program, what is wrong? Without a problem i can read previously programmed data by programmer but i fail to program it by my microcontroller. Should i do sth else before initialising writing. I also fail to erase this flash. thanks for any help...

U¿ytkownik "Bob" napisa³ w wiadomo¶ci news: snipped-for-privacy@individual.net...

Reply to
<marcin.parchomiuk

using

and

i

Well, the first problem to overcome is the erase. The main thing is that

*no* other access is allowed during the erase (or write) process. Disable *all* interrupts. Write a short bit of code in assy that performs the sequence, waits the max time for the ack, and loops. Watch on a scope: does it do it *exactly* right? Flash is very picky about the sequence. Also, make sure you have the bit pattern right. The data sheets aren't always clear about big-endian vs little endian.

Oh, and make sure that you're looking at the data sheet for the same part as what's in your board. The sequence can be different from different vendors with the same "part number".

OK, now I see: are you really holding CE high? the address/data pairs look very much like a write cycle from CPU to Flash. CE should go low and WE should go low-then-high when the data is stable. How do you even get CE to stay high?

Bob

Reply to
Bob

If you fail to erase, then you are very unlikely to be able to write to the same area in flash. Check your erase code and signals first and that you are waiting for the erase to finish, before checking the erase properly?

I have used similar devices the Fujitsu/AMD 29F800 with no problem, I take the Ready line to an interupt to do other things whilst erasing on most of my designs that use it.

The programming/erase algorithms on chip take time to do, so if your are not waiting for the device to complete you will have problems.

--
Paul Carpenter          | paul@pcserviceselectronics.co.uk
    PC Services
              GNU H8 & mailing list info
             For those web sites you hate
Reply to
Paul Carpenter

using

and

Well, as long as you keep #CE high, nothing will ever be written to the flash.....

Meindert

Reply to
Meindert Sprang

If you have the flash connected as 16-bit rather than 8-bit, remember you have to double the unlock address to AAA/AA, 554/55, AAA/A0, PA/PD.

Reply to
David

Maybe u r right, but where did u get this combination for word programming AAA/AA... I've downloaded manual to this flash from AMD site and there is written Program: word 555/AA 2AA/55 555/A0 PA/PD byte AAA/AA 555/55 AAA/A0 PA/PD And i am using 16bit-word mode so is it wrong combination? Y have different combination, and what is more i've just noticed that they double addresses in byte mode? Please help me to figure this out, thanks in advance...

Reply to
<marcin.parchomiuk

U¿ytkownik "Meindert Sprang" napisa³ w wiadomo¶ci news: snipped-for-privacy@corp.supernews.com...

OK, but I've tried both combinations(holding #CE high and applying signals like in manual to #CE) and it still doesnt fix the problem:) thanks anyway... here what i think:(correct me if i'm wrong) ;begin set_HIGH #CE set_HIGH #OE set_HIGH #WE ;writing(word mode) address 555 data AA set_LOW #CE set_LOW #WE set_HIGH #WE set_HIGH #CE

address 2AA data 55 set_LOW #CE set_LOW #WE set_HIGH #WE set_HIGH #CE

address 555 data A0 set_LOW #CE set_LOW #WE set_HIGH #WE set_HIGH #CE

address PA data PD set_LOW #CE set_LOW #WE set_HIGH #WE set_HIGH #CE

//i have set 200ns cycle so it shouldn't be problems with timing, because this flash is 90ns fast

I'd be so grateful if u could tell me what is wrong?

Reply to
<marcin.parchomiuk

I don't know about byte mode (I assume you have the byte/word select pin set correctly?), but when you are using a 16-bit databus, you have your processor's A1 pin connected to the flash A0 pin, the processor's A2 pin connected to the flash A1 pin, and so on. So an address of 0xaaa in the processor's memory map (which will always be a "byte" address) corresponds to a 16-bit word address of 0x555, as seen by the flash. Thus you write your first 0xaa unlock byte to address 0xaaa so that the flash sees it as word address 0x555.

Check that your address and databus connections are correct, and let us know what they are (along with the processor/microcontroller type).

And drop the "SMS" abbreviations - if you don't have time to write "you" in full, don't expect people to have the time to help you.

Reply to
David

U¿ytkownik "Bob" napisa³ w wiadomo¶ci news: snipped-for-privacy@individual.net...

OK, but I've also tried this: address 555 data AA set_LOW #CE set_LOW #WE set_HIGH #WE set_HIGH #CE and so on, but I ma worried about combination, and that might be a key to my problrm. Could u possibly check commands for writing? Is this correct: Program: word 555/AA 2AA/55 555/A0 PA/PD byte AAA/AA 555/55 AAA/A0 PA/PD Generally i use word mode, but maybe this combination i wrong. I'd be grateful for any guidelines, thanks in advance...

Reply to
<marcin.parchomiuk

Great thanks for helping me. For word mode i keep pin #BYTE- high, and I am 100% sure that I've connected it properly because i was checking signals during debugging it, so they were appearing on the right pins. I have a question: Are you sure addresses should be doubled in word mode in respect to byte mode? In my manual it is opposite. thanks for help...

Reply to
<marcin.parchomiuk

I have set clock to have 200ns cycle, so I suppose I shouldn't be worried about timings. On the other hand I might have wrong commands in my manual to write/erase. You have mentioned your 29F800 works fine. Could you popssibly send me a link to your manual, I need checked source, because I might have bad one. Great thanks...

U¿ytkownik "Paul Carpenter" napisa³ w wiadomo¶ci news: snipped-for-privacy@pcserv.demon.co.uk...

Reply to
<marcin.parchomiuk

Until you tell us what microcontroller/processor you are using, and how you have connected the address and data lines, we won't know if you have corrected them correctly.

And yes, I am sure the addresses need to be doubled in this way for two reasons - one is that it is the only thing that makes logical sense (a word write to address 0x555 would be mis-aligned), and the other is that I have several cards using a 16-bit databus connected to a 29Fxxx chip which work using the doubled address.

Reply to
David

On Tuesday, in article snipped-for-privacy@neostrada.pl wrote: Please reply at the BOTTOM

From a quick look at the AMD site the datasheet is not the problem, the problem is one or MORE of:-

1/ You have connected address lines incorrectly (a swapped or wrong order will cause problems) 2/ You have connected data lines incorrectly (a swapped or wrong order will cause problems) 3/ If the timing regime you have quoted elsewhere is correct then you may not be sending the sequence you think you are. (does the Ready line go LOW after the sequence has been written) 4/ Have you checked Reset, Byte and ready pins for correct configuration, and status before during and after the command sequence. There is a pull up on the Ready pin output? 5/ Is the power stable and within spec (on a scope). 6/ You are not waiting after writing the sequence for the device to finish erasing/writing, so aborting the sequence. 7/ You are testing writing without erasing. Try doing tests by a sector erase or chip erase sequence and monitor the READY pin.

The READY pin will tell you if you have ever sent a successful command and either that pin or by data pin 7 polling you should be waiting for the cycle to complete. READY (pin 2) will go low immediately after the last write of the command sequence, if that is not happening, check all the pins on the CHIP, for correct address/data/controls for EACH part of the command sequence.

Until you have an erase cycle (single sector or whole chip) functioning correctly, don't even try writing data to the flash.

--
Paul Carpenter          | paul@pcserviceselectronics.co.uk
    PC Services
              GNU H8 & mailing list info
             For those web sites you hate
Reply to
Paul Carpenter

Please note that the addresses in word mode are *word* addresses, the byte addresses are doubled.

For getting the unlock sequence correct, the easiest way to start is to first attempt to read the chip identifier. Try the erase and programming after the chip ID works.

--

Tauno Voipio
tauno voipio (at) iki fi
Reply to
Tauno Voipio

I use MSP430F149 - TI microcontroller and here are my connections: A0 - P2.0 (port I/O 2) lsb(less significant bit) A1 - P2.1 . . A7 - P2.7 A8 - P3.0 . . A15 - P3.7 A16 - P1.7 msb D0 - P4.0 lsb . . D15- P5.7 msb #RESET+#BYTE are connected to Vcc-5V #RY/BY pin is unconnected

e.g.When I set address 555 : (lsb...msb = P2.0...P3.7) P2=55h P3=05h

I have still doubts about addresses given in manual: Program: word 555/AA 2AA/55 555/A0 PA/PD byte AAA/AA 555/55 AAA/A0 PA/PD Adresses in byte mode are doubled not as you suggested in word mode?? And

2*2AA is 554 not 555. Is that is good or not? I'm confused? Please help...
Reply to
<marcin.parchomiuk

Ok, since you are driving the address bus directly like this rather than using a processor's databus, you can think in terms of word addresses rather than byte addresses and write 0x555/0xaa, 0x2aa/0x55, etc.

As someone else suggested, try first reading the device ID before getting into programming and/or erasing.

There should not be any problem with timing - your msp won't go fast enough to cause trouble, and there is no problem with slow access (I've connected a 29Fxxx to a COP8 processor with three address latches, and a total bus cycle time measured in milliseconds...).

Reply to
David

..big snip..

.....

If you connect a resistor (1k to 10k) from RY/#BY to Vcc then you can scope if the Flash actually does go into the erase/programme mode and time it on the scope.

--
Paul Carpenter          | paul@pcserviceselectronics.co.uk
    PC Services
              GNU H8 & mailing list info
             For those web sites you hate
Reply to
Paul Carpenter

[snip]

You said nothing about OE# connected anywhere. Are you setting it high during write cycles?

Vadim Borshchev

Reply to
Vadim Borshchev

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.