PDA

View Full Version : AT45 Intermitent problems



EricABerg
05-26-2005, 08:49 AM
I am running a 28 PIN AT45 flash chip with 8Meg of bits with a BS2P40. I send data to the buffer and then from the buffer to the page. Everything generally works fine except every now and then when I read the data from the AT45 I get a bunch of 255s where there should be other data. I discovered that the buffer wasn't receiving the data correctly. The problem seems to be in the shiftout of data to the buffer. Has anyone out there had this experience before and if so how did you correct it?

Kind Regards,
Eric
и

Chris Savage
05-26-2005, 09:00 AM
Eric,

ии Sid (Newzed) has used the AT45 in the past.и Perhaps he can post some of his example code and you can compare notes or something.



▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com (mailto:csavage@parallax.com)

Newzed
05-26-2005, 06:55 PM
The only problem I have had with the AT45 was too little capacitance on the 3 volt power supply.и I use a minimum of 22uf on the Vin side of the regulator and that seems to have solved my problem.

Here is a snippet of code I use to write to the buffer:

LOW CS
SHIFTOUT Dout,Sclk,MSBFIRST,[Buffer_1_Write\8, dummy\15, ByAddr\9]иииииииииииииииии 'Buffer_1_Write con $84
SHIFTOUT Dout,Sclk,MSBFIRST,[v1.lowbyte,v1.highbyte,v2.lowbyte,v2.highbyte]
HIGH CS

Did you read the buffer to make sure the buffer is receiving the data?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Need a bezel for your LCD?

Newzed@aol.com (mailto:Newzed@aol.com)
и

Tracy Allen
05-26-2005, 09:53 PM
It sounds like you have established that the problem is _not_ in writing data flash page, but in transferring the data to the buffer. So, you write to the RAM buffer and then immediately read back from the same RAM buffer, and it is bad? Maybe it is a program bug, mis-setting AUXIO vs MAINIO? If you are switching the power on to the AT45, does it have enough time to settle before you start the transfer?

The problem Sid mentioned with the capacitor and power supply affects the write to the flash page, because of peak current at that instant. That is certainly the first place to look if you see bad data when you read back the flash page.




EricABerg said...
I am running a 28 PIN AT45 flash chip with 8Meg of bits with a BS2P40. I send data to the buffer and then from the buffer to the page. Everything generally works fine except every now and then when I read the data from the AT45 I get a bunch of 255s where there should be other data. I discovered that the buffer wasn't receiving the data correctly. The problem seems to be in the shiftout of data to the buffer. Has anyone out there had this experience before and if so how did you correct it?


Kind Regards,

Eric

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com (http://www.emesystems.com)