Emulated EEPROM PSoC 4 CY8C4247AZI-M485

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

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

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

0 Likes
1 Solution
GeonaP_26
Moderator
Moderator
Moderator
250 solutions authored 100 solutions authored 50 solutions authored

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");

View solution in original post

0 Likes
2 Replies
GeonaP_26
Moderator
Moderator
Moderator
250 solutions authored 100 solutions authored 50 solutions authored

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");

0 Likes
Anonymous
Not applicable

I have found the solution. I now use CySysFlashWriteRow to write the flash, and the memcpy to read it and all works well.

0 Likes