Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
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 ...
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.