Hi Kui,
let me jump into this thread.
I used this procedure during testing of CSE: anytime I had some troubles, I tried to do mass erase. I usually use Lauterbach debugger, so I tried flash.UNSECUREerase command. If whole flash was erased, I could start over. If not, it meant that I need to use CMD_DBG_HAL and CMD_DBG_AUTH commands to reset the partition/CSE. If this doesn't work too, then there's last option - MASTER_ECU_KEY is missing, so it's necessary to load it and then run the command to reset partition. With this approach, I was always able to get back to start point. Notice that you need to know MASTER_ECU_KEY otherwise you won't be able to execute CMD_DBG_AUTH.
Regards,
Lukas