cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

YoIs_1298666
Contributor II

Hello,

I have a question regarding CE195313.

Unless the Em_EEPROM_1_em_EepromStorage array in the FLASH area used by the Emulated EEPROM is set to 00 by the compiler and linker, CY_EM_EEPROM_BAD_CHECKSUM will be returned in the following line.

pastedImage_0.png

Can’t we set any initial value to Emulated EEPROM using compiler and linker?

Certainly, due to the structure of the Emulated EEPROM, it seems difficult to set arbitrary values in advance.

We have to do something like the sample code to give the initial value, right?

pastedImage_0.png

Best regards,

Yocchi

メッセージ編集者: Yoshiharu Ishii

0 Likes
Reply
1 Solution
AikoO_51
Employee

>Can’t we set any initial value to Emulated EEPROM using compiler and linker?

- Answer is “Yes”.

The initial value would be meant just a data to write on the top of the area for EEPROM.

Em_EEPROM_1_Write() is just a process to write data to Em_EEPROM_1, and eepromReturnValue is just a value to make sure whether writing to EEPROM is succeeded or not.

Em_EEPROM_1_Read() is also same, so there is nothing data to read if you didn’t put any data above.

So you can put some data you want into “array” in Em_EEPROM_1_Write(), and then it would be succeeded.

Aiko Ohtaka
Infineon Technologies

View solution in original post

0 Likes
Reply
2 Replies
AikoO_51
Employee

>Can’t we set any initial value to Emulated EEPROM using compiler and linker?

- Answer is “Yes”.

The initial value would be meant just a data to write on the top of the area for EEPROM.

Em_EEPROM_1_Write() is just a process to write data to Em_EEPROM_1, and eepromReturnValue is just a value to make sure whether writing to EEPROM is succeeded or not.

Em_EEPROM_1_Read() is also same, so there is nothing data to read if you didn’t put any data above.

So you can put some data you want into “array” in Em_EEPROM_1_Write(), and then it would be succeeded.

Aiko Ohtaka
Infineon Technologies

View solution in original post

0 Likes
Reply
YoIs_1298666
Contributor II

Hello,

Ok. Thank you very much.

Best regards,

Yocchi

0 Likes
Reply