PSOC5L slows down Emulated EEPROM reading as used size increases

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

cross mob
MaLe_2452796
Level 1
Level 1

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

0 Likes
3 Replies