Coule we update EEPROM contents of XMC4800 with TwinCAT

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

cross mob
User15672
Level 1
Level 1
Hello,Everyone!
Our company are now trying to use XMC4800 for EtherCAT slave controller and MCU application. Because EEPROM is emulated from internal Flash, so my problem is Could we update contents of EEPROM using normal
method from TwinCAT(2 or 3.1),that means when we update EEPROM data from Twincat, contents would be programmed into internal Flash and after power up again,the new EEPROM data could be used?
And do you have any document relating to how does EEPROM emulation work in XMC4800?
Thank you in advance!
0 Likes
2 Replies
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

Yes, it is possible to write to the emulated EEPROM using TwinCAT.
Regarding the documentation about how the emulated EEPROM is implemented please have a look to the documentation of the E_EEPROM_XMC4 APP in DAVE4.

Regards,
Jesus
0 Likes
User16578
Level 1
Level 1
Hello,

currently, I am developing a SW that has an EtherCAT connection using the EtherCAT APP on a custom made XMC 4800 board. While I finally got the basic functionality operational, I still have a huge problem with EEPROM updates via the EtherCAT master:
When I call the function E_EEPROM_XMC4_UpdateFlashContents() to write the contents of the EEPROM to FLASH, the next start of the program fails in DAVE_Init() with the error code of E_EEPROM_XMC4_STATUS_ERROR_OLD_DATA at the initializationn of the EtherCAT APP.

I have tried the demo program from the documentation of the EEPROM APP of DAVE. The program works as expected, if I compile it in the form it is given in the documentation (i.e. EEPROM Data Size 504 bytes). But the moment I change the APP configuration to the one used by the EtherCAT APP (i.e. EEPROM Data Size 2048bytes), I get the same behavior as with my own program.

Can anyone tell me, how to write the contents of the EEPROM emulation from RAM back to FLASH so that the next time the program starts the new data is used?
0 Likes