XC888-8FF FLASH protection activated by faulty program

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

cross mob
Not applicable
I'm using the XC888-8FF with my students for basic microcontroller training and small projects (thesis).

In the process of learning, students (and professors alike) write faulty programs.
One of my students, on testing such a program, activated FLASH protection.
I assume this is because he accidentally activated ROM code.

The problem is that once the FLASH is protected, there is now way to deactivate this, unless you know
the password. Since the protection was activated by a faulty program, we do not know wat this password is.

I would like to know:
-is there a general password that can be used to erase the device, and make it usable again?
-is there any option in FLOAD ore MEMTOOL, to deactivate the protection and erase the device, without password?

If this is not the case, the only option is to replace the device.

For the infineon reader: you have equipped the device with a watchdog to reboot when somthing (power glitch?)
disturbed normal program flow. This could also activate ROM code, and thus making the device unaccessible for
the user.....
0 Likes
4 Replies
Not applicable
Hi,

in short, there is no general password and there is no way to deactivate protection without the password. On the other hand it's only a one-byte password so you don't have to try so many times.

Protection activation and deactivation is done in a specific part of the bootstrap-loader (BSL) routine (if the right commands are received via UART/LIN/CAN) which is located in ROM as you pointed out. How did the student accidentally activate the BSL routine? Normally it is only activated during startup if both the MBC and TMS pins are low. During normal operation, the MBC pin is high, so even if a watchdog reset occurs, the BSL routine won't be activated.
0 Likes
Juergen
Employee
Employee
Yes, FLOAD has a feature for un-protecting flash. You click the Flash (un) protect button. FLOAD then prompts you for a one byte password. There are only 256 options 🙂 once the correct one is entered, FLOAD will let you know but the flash will be erased. Its like cracking a safe only to find it empty...
0 Likes
Not applicable
Goed morning,

The BSL routines are activated by unintentional calls/jumps to the ROM area (stack errors, forgetting ret or jmp instructions,...). This part of the memory (ROM) stays active, even if BSL mode is not entered by hardware conditions.
So it is not surprising this happens.

Regards.
0 Likes
Not applicable
Thank you, but I already new. I was just hoping there was a default value.

Regards
0 Likes