cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

ryma_2948791
New Contributor

I consistently see that the start address I am intending to write to is shifted by 64 bytes and cannot understand why.

Using 'Em_EEPROM_Init', I set the start address to 0x7000 (EM_EEPROM_Init(0x7000))

I do a simple write to memory using the EEPROM API's, run the program, and then read the contents of FLASH and see the information is being written to 0x7040 instead of 0x7000.

Does anyone know why this is?

0 Likes
Reply
1 Solution
Ekta
Moderator
Moderator

Hello,

In order to store data at a particular address in case of EM_EEPROM please follow the steps provided in the section " Placing EEPROM Storage at Fixed Address " (page 3) in the EM_EEPROM component datasheet (https://www.cypress.com/documentation/component-datasheets/emulated-eeprom ).

This requires modifying the Linker script. Here you need to add the absolute address in flash where the EEPROM should start as well as the name of the section where the EEPROM storage will be placed.

Let me know if you face any difficulties with the same.

Regards

Ekta

View solution in original post

0 Likes
Reply
1 Reply
Ekta
Moderator
Moderator

Hello,

In order to store data at a particular address in case of EM_EEPROM please follow the steps provided in the section " Placing EEPROM Storage at Fixed Address " (page 3) in the EM_EEPROM component datasheet (https://www.cypress.com/documentation/component-datasheets/emulated-eeprom ).

This requires modifying the Linker script. Here you need to add the absolute address in flash where the EEPROM should start as well as the name of the section where the EEPROM storage will be placed.

Let me know if you face any difficulties with the same.

Regards

Ekta

View solution in original post

0 Likes
Reply