- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi.
I'm using the Em_EEPROM library to emulate a 2 KB EEPROM, with wear-leveling factor of 2, plus a redundant copy, for a total of 16 KB of the EE Emulation flash region of the PSoC 6.
I'd also like to implement the kv-store library. I would prefer to use the remainder of the EE Emulation flash region to store kv-store data, as well, rather than the main user flash. I presume that configuring kv-store with the appropriate addresses will accomplish that, but will Em_EEPROM and kv-info play nicely together?
For example, if I continue to use the first 16 KB of EE Emulation flash for EEPROM emulation via the Em_EEPROM library, can I then configure the kv-store library to use the upper 16 KB of the EE Emulation flash region and expect both libraries to function properly?
Thanks,
-Nick
Solved! Go to Solution.
- Labels:
-
PSoC 6 MCU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To follow up - it appears that both libraries can coexist and share the AUX (EM emulation) flash, but it turns out to make more sense to use only the kv-store library to store the EEPROM data along with the rest of the non-volatile data.
-Nick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Nick,
The Em_EEPROM Middleware uses the flash driver internally to write to flash. The Em_EEPROM middleware will not be aware If any changes are made to the Em_EEPROM region directly using the flash write APIs which might lead to data corruption. So as long as the direct flash API calls do not affect the region used by the Em_EEPROM and are not called simultaneously, it should not cause any issues.
Could you please share the link to the kv-store library that you are using? Would it be possible to redirect the library also to use Em_EEPROM APIs?
Rakshith M B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Rakshith.
I'm using the Infineon kv-store library (GitHub link here).
The Em_EEPROM API doesn't provide sufficient granularity for read/erase/write operations to be useable directly by the kv-store library.
As long as the Em_EEPROM middleware uses only the contiguous addresses range from the start of the EE Emulation region, and of length as calculated by the CY_EM_EEPROM_GET_PHYSICAL_SIZE macro, it seems that the two libraries shouldn't interfere with each other.
Thanks,
-Nick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Nick,
Thanks for the update. Yes, the Em_EEPROM middleware uses a contiguous address range.
Rakshith M B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To follow up - it appears that both libraries can coexist and share the AUX (EM emulation) flash, but it turns out to make more sense to use only the kv-store library to store the EEPROM data along with the rest of the non-volatile data.
-Nick