Erase a single page on XMC4500

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

cross mob
Not applicable
I am right that it is not possible to erase a singel page on the XMC4500??

Because on the XMC1xxx I can use the XMC_FLASH_ErasePages funciton.

Thanks
mathias
0 Likes
2 Replies
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

The XMC4 family distiguish between logical and physical sectors.
Sector-wise erase on logical and physical sectors are possible:
void XMC_FLASH_EraseSector(uint32_t *address); // logical erase
void XMC_FLASH_ErasePhysicalSector(uint32_t *address); // physical erase

It is recommended to erase physical sectors rather than logical sectors erase. The logical sector erase lowers the retention of the adjacent logical sectors (see datasheet, parameters tRET and tRETL for more details)

Regards,
Jesus
0 Likes
Not applicable
hi jesus,

Many thanks, can you give me a number of the manual? I did not find that. ... But there is no possibility to erase a smaller amount of flash? And it is not possible to rewrite a flash without erase first?
I need a solution to save a CRC value in the flash. So on the the XE167 it was possible to erase a page and rewrite the page. So for the XMC that means copy 16kByte to RAM - modify it erase the sector and rewrite
the 16kByte to that flash sector that´s not a good solution. So my problem is that I cannot use a eeprom because i calculate the CRC at build time and save it with srecord into the hex line. Do you have any Idea what I can do?
0 Likes