- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
i had used cy4245 and Em_eeprom component in 4.1. it was working well. after updating to 4.2 Em_EEprom component updated to 2.0.
i updated the functions according to 4.2 api
in 4.1
Em_EEPROM_Write(bytearray,(eeptr+2),2u);
in 4.2
Em_EEPROM_Write((EEaddress+2),bytearray,(2u));
later on its not working.
while debugging i see that the library returns failure in many conditions..
for example in cy_em_eeprom.c line 186 & 430
if((0u != size) && ((addr + size) <= (context->eepromSize)) && (NULL != eepromData))
1.How does address+ size will be less than eeprom size, in my case eeprom size is 64, & addr is 0x00007C00 ,size is 1,
looks like EM_EEPROM 2.0 has lots of bugs..or may be i am doing some mistake. Can some one help me how to make it work and provide a sample code for EM_eeprom for psoc4. Thank u
with regards
Dr.N.Chandra sekhar,M.tech,phd
Solved! Go to Solution.
- Labels:
-
PSoC 4 Architecture
- Tags:
- em_eeprom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It looks like you are using the address of the variable, I think the library is referring to the address where you want to store/access the EEPROM value?
0x00007C00 in decimal is 7*256*16 + 12*256 which is much larger than 64....
My guess is that the EEPROM address needs to go from 0 to EEPROM.size for it to function properly, otherwise it won't work well
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It looks like you are using the address of the variable, I think the library is referring to the address where you want to store/access the EEPROM value?
0x00007C00 in decimal is 7*256*16 + 12*256 which is much larger than 64....
My guess is that the EEPROM address needs to go from 0 to EEPROM.size for it to function properly, otherwise it won't work well
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thank you. address seems to be virtual locations from eeprom starting location. for size of 64 (address 0 to 63)..or 1 to 64. but i thought addr as direct physical eeprom location. Thanks for your input. removing EEaddress solved my problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
You're welcome. I'm glad that fixed it