In some instances, especially on EFM8 devices with low-power modes (such as the EFM8SB1, EFM8SB2), a device may seem to be unrecoverable through the normal debug interface. Attempting to program or erase the device may give an error:
" 'Erasing flash' has encountered a problem.
TCF command failed"
It is often the case that the debugger built into the STK cannot recover these devices, but a legacy 8-bit debug adapter can. First, make sure to disable the on-board debugger on the STK by going to [Launcher] and selecting [Debug Mode]>[Off].
Then, connect the debug adapter to the C2 pins found on the upper right corner of the STK. It will be necessary to connect C2CK, C2D, and GND to the debug adapter.
Note: It is not necessary to connect all ground pins from the debug adapter to the STK, only one will be required.
Next, download and run the Flash Programming Utilties. After connecting to the device, an erasure should be able to recover it.
After recovering the device, the debug mode of the board can be set back to [MCU] to continue using the STK within Simplicity Studio.
To prevent this from occurring in the future, it is recommended to add a very long delay after reset (> 200ms) when running programs that utilize low power modes such as Sleep or Snooze. Other methods that cause the device to exit these low power modes and stay in either Idle or Active modes will also allow the STK to again communicate to the device.