SPI problems
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2010-05-20 3:30 PM
Posted on May 21, 2010 at 00:30
SPI problems
This discussion is locked. Please start a new topic to ask your question.
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 4:51 AM
Posted on May 17, 2011 at 13:51
Hi,
After writing to the memory, do you wait some time till the data are physically written (many memories just write in a ''tampon'' buffer then when it is full it is transferred to physical memory and it takes a considerable time). You can try by adding some delays between writes and reads (and also between different write operations when location is different). Cheers.Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 4:51 AM
Posted on May 17, 2011 at 13:51
Thanks chokos, After checking the code and seeing that I do indeed wait for the activity bit to be reset I looked back at the datasheet for the part's that I have attempted to communicate with and found the root of my problem.
I was only able to store data once the device has been erased.. and thats the key. The block/page that you need to write to has to have been erased to 0xFF so that the device will allow a state change of each bit/byte. So warning to anyone who is looking to use an SPI device as a non volatile storage device make sure you choose one that allows you to erase small blocks. to prevent huge holes in your memory mapping. I see now why they are used for firmware storage as they tend to be erased and written to as a complete image and only changed on a complete firmware update. I am attempting to use it as a replacement for an i2c device. Got there in the end though......