- 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
Take a look at this -
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Another way to save your data in EEPROM as shown here
http://www.cypress.com/?app=forum&id=2492&rID=105370
odissey1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your problem has to be solved in different steps
Putting a variable into flash instead of sram
static const uint16 MyVar = 0x20c0ffee; // This can be done with s struct to get more space
Initialization is required
Retrieving the data from flash:
Due to compiler optimization an assignment like
NewVar = MyVar;
Will assign 0x20c0ffee to Newvar, even when its value was re-programmed, so use memcpy() instead
Programming new values using the em_EEProm component
Result = Em_EEPROM_Write(&RamVar,&MyVar, sizeof(MyVar)); // Program the value of RamVar into flash, setting MyVar
The above needs some type-castings to uint8[]* to avoid warnings.
Hope that helps.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Note if doing a PSOC 4 BLE design, the eeprom component not
currently implemented. But the basic FLASH write techniques
can still be used.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using the
Pioneer development board so I had to use the flash method. Works good.
Thanks.