Permanent damage to XMC1300 caused by E_EEPROM_XMC1 Dave 4 APP

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

cross mob
User10611
Level 1
Level 1
Hi,

I have the problem that flash write operations via the E_EEPROM_XMC1 APP (shipped with Dave 4) sporadically causes irreversible damage to our XMC1302 chips.
Our software stores some variables into the flash memory using the mentioned APP upon request. Generally, this is working fine, but three out of eight controllers died after some 10 to 100 write operations. I tried to repair the hardware by erasing and reprogramming the entire chip, but without success.
When I debug the damaged devices through SWD/J-Link, it always shows that the software is stuck in random, unimplemented Interrupt Handlers which should never be entered.

I think that this behavior could be connected to errata NVM_CM.001 "NVM Write access to trigger NVM erase operation must NOT be executed from NVM" and modified the method "void XMC_FLASH_WriteBlocks" in "xmc1_flash.c" to run from SRAM by adding "__attribute__ ((section (".text.fastcode")))".
I tested this modification by executing several thousand write operations on a test device without any problems.
However, I'm not fully convinced that this is really the solution to our problem. Did anybody else experienced such permanent damages through flash operations?

Best regards,
OS1981
0 Likes
3 Replies
Not applicable
Hi OS1981,

It seems that the error you are seeing is caused during garbage collection in the APP where an erase operation is called to free up the sector.

Could you please try the following solution in your project: Replace the API routine for XMC_FLASH_ErasePages with the following:

File: xmc1_flash.c (this is inside project folder: Libraries\XMCLib\src )
Routine: XMC_FLASH_ErasePages

/* Erase flash pages */
void XMC_FLASH_ErasePages(uint32_t *address, uint32_t num_pages)
{
uint32_t page;

XMC_ASSERT("XMC_FLASH_ErasePages: Starting address not aligned to Page",
((uint32_t)address & FLASH_PAGE_ADDR_MASK) == 0U)

for (page = 0U; page < num_pages; ++page)
{
/* A write access to the starting memory location of the page triggers the erase operation*/
(void)XMC1000_NvmErasePage(address);

/* Increment the page address for the next erase */
address += XMC_FLASH_WORDS_PER_PAGE;

}

}


Would you also be able to share the project with us, with only the code portion where the routine APIs are called and the settings for the APP. I would like to replicate the observation in my board.

Regards,
Daryl
0 Likes
User11140
Level 1
Level 1
Is this problem solved ?
Because I also have problem with damaged EEPROM data. At some XMC1100 devices the stored data is lost after a few reboots.
I´m working with Dave3.

I also have the problem that the XMC is in the productive Mode and in the Debug Mode i cant reproduce the loss of data.
0 Likes
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

DAVE4 E_EEPROM_XMC1 APP is using the ROM function to erase the flash as recommened by the errata.

Regards,
Jesus
0 Likes