Part of the Flash cannot be programmed any more

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

cross mob
User10696
Level 4
Level 4
First solution authored
We are using the XMC4500. We have about 50 boards in the department and all can be reprogrammed either with our own application code or the debugger (ULINK Pro), except for 2 boards, which have suddenly stopped working.
Both show exactly the same error. Both can be erased, but the reprogramming fails from address 0x0C040000. This seems a strange coincidence!

I have tried to understand the Reference Manual on the subject of Flash protection, but I am totally confused.
In Table 8-1 it is shown that the User Configuration Blocks start at address 0x0C000000, this is the same as the start of the Program Flash. Is this address correct?
I do not understand how the 3 UCB relate to the sectors in the Flash.

The Flash Status Register (0x58002010) is set ot zero and all three Flash Protections Configuration Registers are also zero. So it would seem nothing is protected, so why can I not program the Flash?
0 Likes
1 Reply
User10696
Level 4
Level 4
First solution authored
Update to my previous post:
If I set the debugger to do a "Full Chip Erase", I can reprogram the flash afterwards.

Can anyone explain why this solves the problem?
0 Likes