You are here

SFlash Writing target byte | Cypress Semiconductor

SFlash Writing target byte

Summary: 3 Replies, Latest post by Bob Marlowe on 31 Aug 2016 10:45 AM PDT
Verified Answers: 2
Last post
Log in to post new comments.
DaveDischord's picture
User
53 posts

I've been through the SFlash example and has success in applying the method to an application with small amounts of information, usually not even a rows worth, but now I'm looking at storing more information that's more dynamic in certain areas.  In the example, the writing function (WriteUserSFlashRow) accepts a row number and a 32-bit array pointer as parameters.  I'm don't really understand the inner-workings of the function, but was wondering if there were checks to not have to rewrite bytes in the row that weren't changed, or if there was a way to change/write to a specific byte(s) within a given row, or if you can only write an entire row at a time. If it makes any difference, I wouldn't want to write all 128u if I just want to change a few in a given row.

user_1377889's picture
User
10686 posts

The smallest amount to program flash is a row. You cannot reprogram only part of it, or you have to make a copy, insert your modified data and then erase & program that row again.

 

Bob

DaveDischord's picture
User
53 posts

Ok. Thank you. Would I have to erase, or would calling the function again just write over the existing data?

user_1377889's picture
User
10686 posts

Refer to the description of the function you want to use. Normally the erase and temperature measurement is done automatically.

 

Bob

Log in to post new comments.