Hi,
If MASTER_ECU_KEY is not programmed, it is not possible to reset the device back to factory state. The key is either loaded or the slot is considered as empty. There’s no default key value. Yes, it’s equal to all 1s but it’s not considered as default and valid key. This behavior is required by SHE specification.
Once CSE is enabled by partitioning, the only way to destroy the partition is to run CMD_DEBUG_CHAL and CMD_DEBUG_AUTH with knowledge of the MASTER_ECU_KEY. There’s no workaround for that.
Such sporadic problem should not happen. That means something obviously went wrong during previous steps. Unexpected reset/power-down during partitioning could also be the reason. Or are you sure you are not operating the device out of specification? In production, the partitioning is supposed to be done only once per lifetime of the device. It should be done in factory under controlled conditions, so such situation cannot happen.
I’m not really sure what’s the root cause of your troubles. Can you see that on one device only? Or is more of them affected?
Regards,
Lukas