You are here

eeprom | Cypress Semiconductor

eeprom

Summary: 5 Replies, Latest post by Bob Marlowe on 02 Dec 2016 07:33 AM PST
Verified Answers: 0
Last post
Log in to post new comments.
Chirag Modesara's picture
User
100 posts

how can i use eeprom on psoc-4.??

i read emulated eeprom component datasheet. there is only write function which can write the data but i cant find the function which can read the data from eeprom.

Rob1's picture
User
4 posts

i hope PSoC5 works with the similar API than your PSoC4 (it's highly probable)

it's used for EEPROM not an Em EEPROM, the functionalities between these 2 EEPROM are probably close. 

After add this 2 points above, please find below a basic function to read EEPROM :

void refresh_values(unsigned char *tab){

    int i=0;
    reg8 * Pointer = (reg8*) CYDEV_EE_BASE;
    EEPROM_Start();
    for(i=0;i<5;i++) tab[i] = Pointer[i];
    EEPROM_Stop();

}

I use this code to read 5 bytes into the EEPROM. You need to add a component EEPROM on your Topdesign.

It's a simple proposal to read EEPROM without use the read API: i hope it will be useful for you.

yours,

rob1

Chirag Modesara's picture
User
100 posts

Thanks rob1 for your valuable Reply.

but i want to tell you something.

 i think psoc-4 has not a eeprom component. There is only Emulated eeprom component.

user_1377889's picture
User
9581 posts

When reading from emeeprom it is quite the same as reading from flash, you just use a pointer / address and get the data. I frequently use a structure in flash and a copy in sram to work on. So I can check the number of eeprom writes and check for valid data.

On some BLE chips take care:  the clocks may be changed during the flash write, check the "System Reference Guide".

 

Bob

Chirag Modesara's picture
User
100 posts

okay thanks bob,

can you give me basic syntax which can read the memory and transfer to the SRAM??

user_1377889's picture
User
9581 posts

See here ...

 

Bob

 

 

Log in to post new comments.