- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi guys,
I am using the CY8C4125LQI-S432 in my project (PSoC4100s).
From what I read from the datasheet, I found that the smallest operation in flash is a row, which is 256 bytes in size.
If I use the last row (which is 7F00 to 8000) for the self flash, I will have to erase the whole row and re-write the whole row every time the system needs to save settings.
If I reserve more rows for self-flash (so that I can write to 7E00 first time, 7F00 second time...etc), the expected flash life cycle will be extended.
But my flash size is only 32KB, I don't think I will have that much flash space left after programming.
So I am wondering, is there a smaller size operation for the flash? or is it a limitation that it must be written and eased in 256 bytes?
Thanks guys
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The key point is about the buffer define like:
"const uint8_t Em_EEPROM_em_EepromStorage[Em_EEPROM_PHYSICAL_SIZE]"
If we use the "const" to declare the array "Em_EEPROM_em_EepromStorage", then it will allocate to the flash instead of RAM.
More about it, you can read the EMEEPROM datasheet.
But if you only want to use the flash write API, it only can operate a row every time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can download and learn the EmEEPROM code example about the PSoC4100s in the creator. Maybe it can meet your requirement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the reply.
If the flash is bound to write/ease by a row size (256 bytes), then what the EmEEPROM do is simply save you some trouble of processing (at least that's what I think, and also found this discussion concerning about this matter Re: Why the RAM memory is used for store data in emulated EEPROM )
btw I find the EmEEPROM component quite confusing since I am able to write and read at a certain size (16 bytes..etc), but I failed to comprehend how it was put in the flash memory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The key point is about the buffer define like:
"const uint8_t Em_EEPROM_em_EepromStorage[Em_EEPROM_PHYSICAL_SIZE]"
If we use the "const" to declare the array "Em_EEPROM_em_EepromStorage", then it will allocate to the flash instead of RAM.
More about it, you can read the EMEEPROM datasheet.
But if you only want to use the flash write API, it only can operate a row every time.