Using EEProm

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ivkac_4155501
Level 1
Level 1

Dear Community,

How do I exactly use the EEPROM module?

When I search the internet I find some tutorials which use functions like Eeprom_WriteByte; Emprom_ReadByte but in my build there are no such functions at all (the tutorial use 5lp prototyping kit controller, like me though).

What I have is the function Eeprom_Write.

But I do not really understand what this function expect me to put in.

This is what the datasheet says:

Em_EEPROM_Write (const uint8 srcBuf[], const uint8 eepromPtr[], uint16/uint32 byteCount)

Is the srcBuff[] a pointer to the information I want to save in the Eeprom?

Is the eepromPtr[] a pointer to the location of the EEProm?

If this is true how can I define the location of EEProm or how can determinate this location?

How can I read the stored Data.

Sorry if I did unstand it completely wrong, but the datasheet looks pretty cryptic to me.

0 Likes
1 Solution
GeonaP_26
Moderator
Moderator
Moderator
250 solutions authored 100 solutions authored 50 solutions authored

PSoC 5LP has two different components; the EEPROM component and the Emulated EEPROM component. The EEPROM component provides set of APIs to erase and write to non-volatile on-chip EEPROM memory. Whereas, the Emulated EEPROM component emulates an EEPROM device in the PSoC device flash memory. EEPROM_WriteByte and Em_EEPROM_Write are write API interfaces to EEPROM and Emulated EEPROM components respectively.

Please refer to PSoC Creator provided code examples to understand component usage. Please go to File > Code Example for EEPROM_Design and PSoC_EmEEPROM_PSoC5 code examples.

If you are using Em_EEPROM is your application, use EmEEPROM_Read (uint32 addr, void * eepromData, uint32 size) to read size units of data from logical address addr and write to array pointer eepromData. Please refer to Em_EEPROM component datasheet for more details on API.

View solution in original post

0 Likes
4 Replies