Hi Morteza
Reading the content of the addresses from 0xE000 to 0xFFFF will inform the customer of whether the firmware has been erased: if the content of 0xE000 -> 0xFFFF is equal to 0xFF then it means it has been erased.
This can be read manually with CW debugger: after opening a debug session, go to the “Memory” panel and click on the green plus; enter address 0xE000 and click OK. This will display the content of the memory. Below the firmware has not been erased as the content is not 0xFF.

The section from 0xE000 to 0xFFFF contains firmware functions, interrupt vectors and trim coefficients.
Trim coefficients are between 0xFD40 and 0xFDFF.
If everything including trim coefficients has been erased then the device is lost.
But if trim coefficients have not been erased (addresses from 0xFD40 to 0xFDFF are not 0xFF), so only firmware functions and interrupt vectors have been erased, then the device is not lost and in this case.
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------