XMC4400 Reset during Erase Logical Sector S2 : BootROM Normal Boot does not work

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

cross mob
User7757
Level 2
Level 2
Here are the steps to reproduce my problem :

1- Erase Logical Sector S2
2- Before the erase is finished, power-cycle the device. Flash memory in Sector 2 is now corrupted.
3- The code won't run to Main after the power-cycle when sector 2 is corrupted.
4- To recover from this, erase logical Sector 2 using infineon MemTool

Is this a normal behaviour? It does not happen if I power-cycle while logical sector S4 is being erased. I put all my code in S8, and the interruption vector are in S0 as required.

Thanks,
Cedric
0 Likes
1 Reply
User10215
Level 4
Level 4
First like received
Hi Cedric,

only knowing the XMC4500 but I guess in the XMC4400 it's pretty similar.
Here a quote from the XMC4500 reference manual:

"A reset or power failure during an ongoing Flash operation (i.e. program or erase) must
be considered as violation of stable operating conditions. However the Flash was
designed to prevent damage to non-addressed Flash ranges when the reset is applied
as defined in the data sheet. The exceptions are erasing logical sectors and UCBs.
Aborting an erase process of a logical sector can leave the complete physical sector
unreadable."

In the XMC4500 the Logical Sector 2 belongs to Physical Sector 0 which means interrupting the erase-operation of Logical Sector 2 can corrupt the whole Physical Sector 0. So if your code is in Logical Sector 0 it will be also corrupted.
Logical Sector 4 belongs to another Physical Sector so that an interruption of an erase-operation won't corrupt the Sector your code is in.

Best regards,
Niclas
0 Likes