AnsweredAssumed Answered

Problem with Atmel spi flash(AT45DB161D)

Question asked by anjana on Jun 1, 2010
Latest reply on Jun 1, 2010 by anjana



We are working with BF525 processor  and in that we are trying to write and raed from the ATMEL SPIFLASH. we ae able to  right and read the data from the spi flash.



But one  problem i am facing.  I am  doing page programming(512 bytes) in my spi flash. If i write only 512  bytes of data i am able to read and write the whole data.  But if i give  515 i,e more than 512 bytes that time it is reading the previously  written data instead of current data.


If i write 1000  bytes of data that  time it is reading some 520 bytes and after taht some junk data  and  afterwords again some 10 bytes it is reading correctly  and after that  again junk data like that


if i write first 512 bytes as some 22  and next  512 bytes as 11, that time while reading it is reading 11for 400 bytes  and the 22 for 10bytes and again11 for next 10bytes and afterwards some  junk data



I am not  understanding wht could be the problem?

All, the signals SCK and MISO ,MOSI are coming properly.


The page adresess for bf 532 and 525 are  different or  we should add any some conditions in my code..please check  my code and suggest me (i am attaching my code)




Please help  me




Thanks in  advance