Most likely your firmware did it. You may also check how reliable is your external brown own detector circuit on /RESET pin, low voltage detector. As you know this is required for S12D family. Without it bad things may happen when supply voltage falls down slowly.
You can reliably prevent writes to 0x?7FD, setting up 0x?7FD to 0xF0 immediately after flashing your code, so
that 0x?7C0 to 0x?7FF are write protected.