7 Replies Latest reply on Dec 9, 2016 7:45 AM by JoMe_264151



      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.

        • 1. Re: eeprom

          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;
              for(i=0;i<5;i++) tab[i] = Pointer[i];




          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.





          • 2. Re: eeprom

            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.

            • 3. Re: eeprom

              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".





              • 4. Re: eeprom

                okay thanks bob,


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

                • 5. Re: eeprom

                  See here ...





                  • 6. Re: eeprom

                    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.

                    • 7. Re: eeprom

                      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.