- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm trying to use the emulated EEPROM of a CY8C4247AZI-M485.
I want to fill the Emulated EEPROM by default on the .hex file (to store some default settings), then I need to be able to have access to that part of FLASH to override the default values.
I have tried to modify the example code of the PSoC creator but without success. I'm able to store the default constant on a fix address ( I have also modified the linker),
but I'm not able to read and write to it correctly. I have attached the project.
I have also see some example of code that use pointers to the constant, but they seems old and doesn't work for me.
There are any pieces of code that can help me ?
Thank you
Riccardo
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The shared project works at my end. The Em_EEPROM_Read API updates the user array called eepromArray as expected. You can add following lines after Em_EEPROM read to print the array over UART.
/*Print EEPROM contents to console*/
UART_PutArray(eepromArray, LOGICAL_EEPROM_SIZE);
UART_PutString("\n\r");
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The shared project works at my end. The Em_EEPROM_Read API updates the user array called eepromArray as expected. You can add following lines after Em_EEPROM read to print the array over UART.
/*Print EEPROM contents to console*/
UART_PutArray(eepromArray, LOGICAL_EEPROM_SIZE);
UART_PutString("\n\r");
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have found the solution. I now use CySysFlashWriteRow to write the flash, and the memcpy to read it and all works well.