- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Folks,
I have seached but I haven't really found a way to simply access EEprom data!
I just want to save and retrieve non-volatile Data. And the simulated EE-prom API is unfortunatelly not available. Thank you for your help 🙂
LG NIklas
Solved! Go to Solution.
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Read "System Reference Guide" (to find under "Help" in Creator). See memory organization. Use top of flash for your data, there are consts defined for number pf bytes in a row, number of rows etc. No additional #include needed.
I would suggest to define a structure as large as a flash row or less. you can tpedefr a pointer to this structure ans assign the row's address to it. Will make handling easier. You'll need same structure in ram when you set new values and program the flash anew. Use a counter within the struct to see if struct is virgin (0) which needs an initialization and keep track of number of flash writes.
Bob
PS: Wo lebst Du? Ich bin nahe Bremen.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Welcome in the forum, Niklas!
The EmEEProm is not availlable for the BLE-chips because it infers with clock settings and interrupt availlability.
Only way out is to "put aside" some flash memory and use the CySysFlashWriteRow() API to store some data.
Happy coding
Bob
PS: Bei den Temperaturen gestern hab ich mich auch wie eine Bratwurst gefühlt.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ahhh thank you! 🙂
Ps: jaa ich wurde mit dem Namen gestern inspiriert 😄
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Read "System Reference Guide" (to find under "Help" in Creator). See memory organization. Use top of flash for your data, there are consts defined for number pf bytes in a row, number of rows etc. No additional #include needed.
I would suggest to define a structure as large as a flash row or less. you can tpedefr a pointer to this structure ans assign the row's address to it. Will make handling easier. You'll need same structure in ram when you set new values and program the flash anew. Use a counter within the struct to see if struct is virgin (0) which needs an initialization and keep track of number of flash writes.
Bob
PS: Wo lebst Du? Ich bin nahe Bremen.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Keep in mind your endurance un leveled is 100K cycles.
These might help on constants in FLASH -
http://www.cypress.com/?rid=91945
http://www.cypress.com/?id=4&rID=57109
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you guys for your help so far!
Unfortunately the CySysFlashWriteRow() function does not write to my desired Flash location ( I used
#define MY_FLASH_ROW (CY_FLASH_NUMBER_ROWS - 2) )
and the CYCODE or const declarator is not working for me because I need to be able to change the value (not very often so I am not destroying the flash)
What can I do to access the falsh memory safely?
Ps: Bin gebürtiger Oldenburger, wohne aber in Karlsruhe *schwitz*
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Supervisory Flash might be of use -
http://www.cypress.com/?rID=110097
And there is the general FLASH programming doc -
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Sflash sounds good but I just don't understand the pseudocode!
I can't use these macros and its not working writing data directly to 0x0FFFF200.
Can you give me an example on how to write a byte/row to the sflash?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
On the link for the supervisory flash page there is a project
you can look at.....
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you soooo much 🙂
Its working now exactly how I wanted it to.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Glad I could help.
Regards, Dana.