3 Replies Latest reply on Sep 24, 2020 1:59 AM by GaneshD_41

    PSOC5L slows down Emulated EEPROM reading as used size increases

    MaLe_2452796

      Hi,

      I am using a PSOC5L (CY8C5888LT1) in an application where I write some data structure to the emulated EEPROM. I defined a size that fits comfortably in the available flash (90112 bytes). The writings and sub-sequent readings are performed without error (I debugged this by immediately reading after writing) but if I power cycle or reset the uC and try to read back the EEPROM contents I notice the following :

       

      1) Reading the EEPROM up to the end of allocated size, just after programming, is fast (all data is zero, as the flash was erased as expected)

      3) Reading any number of bytes when the EEPROM is almost empty (let's say, a few % of total capacity) is also fast

      4) As I put more data, the readings becomes slower and  slower (although I did not noticed any degradation in the writing operation)

       

      Reading an almost full 90kBytes emulated EEPROM  takes almost 1s per each reading  (48 bytes) ! It seems that the code is spending a lot of time in the while loop in the GetRowAddrBySegNum routine of cy_em_eeprom.c ....  Except for the slow access, the data seems to be fine . The data written is a 48bytes structure and the operations are done with an almost exact copy, except for the structure written, to the EEPROM basic design project pointed by example in CE195313.

       

      Does anyone have some hint on what could be causing this ? I am using PSOC Creator 4.3 and Arm GCC compiler that comes with it ...

       

      Thanks & cheers,

      Marco

        • 1. Re: PSOC5L slows down Emulated EEPROM reading as used size increases
          GaneshD_41

          Hi Marco,

           

          Since the PSoC execultes compiled code, Ideally the speed of Emulated_EEPROM memory access doesn't depends on the amount it occupies the Flash. We need the following information to help you better:

           

          1. What is the size of Emulated_EEPROM you are using?

           

          2. We would like to see the firmware flow of your project and test the speed at our side. Can you please attach your project? Please let us know how are you measuring the speed of the Em_EEPROM read.

           

          3. Are you using custom board? If yes, can you please attach the schematic of your board?

           

          Thanks

          Ganesh

          • 2. Re: PSOC5L slows down Emulated EEPROM reading as used size increases
            MaLe_2452796

            Hi Ganesh,

            Thank you. Indeed I also would never expect this behavior... The size is 90112 bytes (together with the code it consumes about 83% of available flash on uC). Everything is being done in the CY8CKIT-059. The speed drop is noticeable just through the UART print of the structure : If all zeroes the screen rolls very fast, if a large part of eeprom is filled it is very slow. As for the code, it relies on many sensors in order to run, so it's a bit convoluted for you to bypass the algorithm and test without the sensors in place. I will try to send you as well a stripped version of it only with the writing/reading/printing part.

             

            Thanks,

            Marco   

            • 3. Re: PSOC5L slows down Emulated EEPROM reading as used size increases
              GaneshD_41

              Hi Marco,

               

              I am eager to know the status of this problem you observed. Any new observations?

               

              Thanks

              Ganesh