Emulated Eeprom

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

cross mob
Anonymous
Not applicable

I am using CY8C4124LQI-443 Psoc 4100 family in my project. I need to use emulated eeprom. There is an example in psoc. But I have problem when I use. I want to read the data written on eeprom after restart the system.

   

 

   

I use this command CY_GET_REG8(adress); or Data = (*((uint8 *) (adres)));. Data read is 0. 

What is the problem of this? Can anyone explain the detail of this? (I think after I close the system, Data written is deleted by the microcontroller.?)

   

 

   

Thanks for helping. 

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

@Malik, this is emulated eeprom which is flash memory. Smallest amount to write is a Row which will be erased automatically before writing.

   

Reading from emulated eeprom is done easiest by assigning the address to a pointer of the underlying type.

   

I normally use a structure which contains additionally some housekeepign data as number of writes to eeprom and a "Magic Number" which indicates that the structure has been written at least once.

   

 

   

Bob

View solution in original post

0 Likes
2 Replies
MaBa_1857101
Level 1
Level 1
First solution authored First like given Welcome!

Hi,

   

Before Write Data into EEPROM ..Just Erase the EEPROM then write the data.,

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

@Malik, this is emulated eeprom which is flash memory. Smallest amount to write is a Row which will be erased automatically before writing.

   

Reading from emulated eeprom is done easiest by assigning the address to a pointer of the underlying type.

   

I normally use a structure which contains additionally some housekeepign data as number of writes to eeprom and a "Magic Number" which indicates that the structure has been written at least once.

   

 

   

Bob

0 Likes