- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear All,
I am using S25FL512S interfaced to my MSP430F5438A microcontroller.
SPI is running at 1MHz.
I am reading the device ID and Manufacturer ID correctly from the flash. I am reading the device ID and Manufacturer ID correctly from the flash.
Since the page programming buffer is 512 bytes, I am trying to write 0xCC in 512 bytes starting from location (24 bit address) 0x000000000000 onwards.
After writing one address, I am checking the status register for the busy bit and when it becomes 0 then I am reading from the same location. And it is reading back 0x88. (I am reading back the page immediately after writing.)
Reading 0x88 (512 bytes) goes on for a lot of addresses until I start reading 0xCC (512 bytes) properly. There is no pattern when I start reading 0xCC instead of 0x88 (as in there is no specific fixed address where it starts reading properly).
Since I am able to read manufacturer and device id properly, hence I feel there is no problem with read command.
Also since I am waiting for status register busy bit to become 0, hence I feel that there is no page programming error.
What can be the possible problem?
Thanks and Regards,
Ankit
Solved! Go to Solution.
- Labels:
-
Serial NOR
- Tags:
- s25fl512s
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Ankit,
Thanks for providing the images.
In the first image, you erased sector 0 (D8 00 00 00), but you read sector 2 (03 08 00 00). The FL512S has 256kB (=0x40000) sectors.
Below is the sequence of sector address looks like ;
Sector 0: address 0x000000
Sector 1: address 0x040000
Sector 2: address 0x080000 and so on.
Can you please provide Your schematic and full part number of FL512S for review
Mean while we suggest you do the below experiments and update us :
- Erase a sector and verify if the read data is 0xFF
- Program fewer number of bytes like 1, 2, 3, or 4 bytes and read back
- Program incremental data pattern 0x00, 0x01, 0x02… and read back to see any trends of read data
- Check signal integrity if it meets the AC spec. Oscilloscope is needed. Please send the Oscilloscope images.
Thanks,
Krishna.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Ankit,
Are you sure that the first sector is not protected ?
Did you try writing to other sectors ? If yes, are you facing the same issue ? If no can you please try and check if you are facing the same issue.
Also erase the first sector and try to read with out programming any data and let us know what is the data you are observing.
Thanks,
Krishna.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Krishna,
I executed the things that you asked me to do.
1. I tried writing in sector 2 (one page at a time and reading right away), same behavior, reading fails.
2. I tried writing in sector 3 (one page at a time and reading right away), same behavior, reading fails.
3. I tried erasing sector 1 and reading it, I am quite surprised that reading fails as well (first page reads 0x77 (512 bytes) and subsequent pages read 0xBB (512 bytes).
I have the data and results in excel/csv format which i am not able to attach here.
Thanks and Regards,
Ankit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1. sector1 erase image
2. sector2 write image
3. sector3 write image
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Ankit,
Thanks for providing the images.
In the first image, you erased sector 0 (D8 00 00 00), but you read sector 2 (03 08 00 00). The FL512S has 256kB (=0x40000) sectors.
Below is the sequence of sector address looks like ;
Sector 0: address 0x000000
Sector 1: address 0x040000
Sector 2: address 0x080000 and so on.
Can you please provide Your schematic and full part number of FL512S for review
Mean while we suggest you do the below experiments and update us :
- Erase a sector and verify if the read data is 0xFF
- Program fewer number of bytes like 1, 2, 3, or 4 bytes and read back
- Program incremental data pattern 0x00, 0x01, 0x02… and read back to see any trends of read data
- Check signal integrity if it meets the AC spec. Oscilloscope is needed. Please send the Oscilloscope images.
Thanks,
Krishna.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Krishna,
I realized something after reading the datasheet properly.
Once I program a page in a sector then I cannot program it again unless I erase the whole sector in which that particular page resides.
That was the problem that every time I try to write on the same page with new data, it was getting corrupted. Bits can be changed from 1 to 0, but bits can't be changed from 0 to 1.
I was treating the flash like I treated EEPROM.
Thanks for your guidance and help, eventually it lead me to find the solution.
Thanks and Regards,
Ankit