- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Doing the following -
#define CYDEV_EE_BASE 0x40008000u // This is Creator generated
uint8 nSavedEE = 0;
I get a warning on line 420, but does not show up in warnings notice window after compile., Still stays however
when doing further code work. Warning shown below.
Regards, Dana.
Solved! Go to Solution.
- Labels:
-
PSoC Creator Software
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dana,
At first, the compiler converted the 32-bit (unsigned int) value 0x40008000 (1073774592) into a 16-bit (unsigned short) value 0x8000 (32768) to pass the value to the function EEPROM_ReadByte() as the argument.
The function receives a 16-bit value 0x8000 (32768) and calculates the actual address as following statement.
retByte = *((reg8 *) (CYDEV_EE_BASE + address));
So, the returned value will be read from 0x40010000 which is a "Digital interconnect configuration" register area.
I don't know why you think the program is working fine.
But this is an incorrect use of EEPROM_ReadByte() function.
Anyway, EEPROM_WriteByte() function has a protection not to access an invalid address. So, the "Digital interconnect configuration" are will not be destroyed.
Regards,
Noriaki