- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For example
# pragma abs_address: 0x4000
static const uint32 MASTER = 0x22222222;
# pragma end_abs_address
I expect to read the memory with a PSoC programmer and see 22222222 in cell 4000, but the value puts into another cell.
Or so
uint8 ram_array[16]={0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,};
static const uint8 CYCODE eepromArray[]= {0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88 };
int main()
{
CyGlobalIntEnable;
EEPROM_Init(0x4000);
CyDelay(20000);
EEPROM_Write(ram_array,eepromArray,16);
}
I expect to read 888888 ..., turn on the device for 20 seconds and then read 1111111 ...
But I read 888888 in both cases ...
I cannot confirm email and add messages due to a bug on your site, the email section is not active
Solved! Go to Solution.
- Labels:
-
PSoC Creator & Designer Software
- Tags:
- eeprom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
> By the way, where can I find an explanation of this variable initialization format in ROM?
> "const uint8 store [Em_EEPROM_PHYSICAL_SIZE]__ALIGNED (CY_FLASH_SIZEOF_ROW"
Please refer to the component datasheet of Em_EEPROM,
which can be accessed by one of the following methods.
Note: The definitions are in "Quick Start" section
(1) Selecting "Datasheet" in the configuration dialog
(2) Selecting "Datasheet" in the symbol window of the Component Catalog
> I want to set the default value, for example
> const uint32 MASTER[1]__ALIGNED(1) = {0x12345678};
>
> And actually, I read the 0x616C6966
As write/read to/from Em_EEPROM is handled by the Em_EEPROM APIs,
I don't know if there is a method to statically define the initial contents of the Em_EEPROM.
I would check the content of Em_EEPROM at the beginning of the program (after Em_EEPROM_Init())
and if the content does not have expected values, use Em_EEPROM_Write() to initialize the content.
moto