eeprom

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

cross mob
chmoc_1567941
Level 4
Level 4

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.

0 Likes
7 Replies
RoBO_1287886
Level 4
Level 4
First solution authored 25 replies posted 10 replies posted

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 = Pointer;
    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

0 Likes
chmoc_1567941
Level 4
Level 4

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.

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

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

0 Likes
chmoc_1567941
Level 4
Level 4

okay thanks bob,

   

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

0 Likes
lock attach
Attachments are accessible only for community members.
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

See here ...

   

 

   

Bob

0 Likes
chmoc_1567941
Level 4
Level 4

okay Thanks bob,

   

Can you tell me one more thing.

   

which number of row or memory i use for flash memory like emulated eeprom example project using this code

   


 static const uint8 CYCODE eepromArray[]=
                                { 0x46, 0x69, 0x72, 0x73,0x74, 0x20, 0x72, 0x75, 0x6E, 0x00, 0x00, 0x00, 0x00, 0x00 };
 
 uint8 array[]             ={ 0x50, 0x6F, 0x77, 0x65, 0x72, 0x43, 0x79, 0x63, 0x6C, 0x65, 0x23, 0x20, 0x30, 0x00 };
                                /* P     o     w     e     r     C     y     c     l     e     #           0*/

   

 

   

i want 10 array for non-volatile memory.

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

Didn't I comment in the example to use the upmost flash rows?

   

The emulated eeprom example works differently and cares for data located anywhere in flash.

   

 

   

Bob

0 Likes