Sometimes it is possible to lose debug access to the MCU, unintentionally. A few examples include
If any of the above are done early in the program, a debugger will not have time to halt the MCU before it loses access.
There is a process for regaining debug access. When an EFM32 is reset, there is a small window where a module called Authentication Access Port (AAP) is connected to the debug interface. This window is 47 µs long and occurs right before the core starts executing code.
A debugger can use the AAP to initiate a Mass Erase, which will erase the entire main flash block, SRAM and the Lock Bits Page and give back debug access. This process is referred to as 'Debug Unlock' because it is the same method that is used to re-obtain debug access when the debug interface has been locked intentionally.
An EFM32 kit (STK/DK) must be used as a debugger to execute Debug Unlock. The unlock feature is not built into third party probes. See this guide for how to use a kit as debugger for your board. If you are debugging the on-board MCU on a kit, Debug Unlock works as well.
To execute Debug Unlock, open the energyAware Commander from Simplicity Studio and click the 'Debug Unlock' button in the Flash tab.
Note: energyAware Commander is no longer available, but many of the features originally found in this utility are now available elsewhere within Simplicity Studio. The "Debug Unlock" feature is now accessible in two locations:
1) from within the Simplicity Commander tool (more information in this KB article: Simplicity Commander) as depicted below:
2) a slightly different unlock algorithm is implemented in the [Flash Programmer] utility - which is one of the tiles that appears on the Simplicity Studio home/launcher screen when a debugger is connected - as depicted below:
Stubborn locked/bricked MCU devices (particularly those that reside on your own board) may respond better to this unlock utility than that within Simplicity Commander, or vice versa.
Simplicity commander also has a command line utility with a set of recovery techniques available in "device recover" command. Documentation for the command line utility is found in UG162. To execute this command open a terminal and enter the following:
cd C:\SiliconLabs\SimplicityStudio\v4\developer\adapter_packs\commander commander adapter dbgmode OUT commander device recover --device NAME_OF_TARGET_DEVICE
The process takes a few seconds. After this, reconnect with the Commander and make sure the 'MCU Information' is visible on the Kit tab. If the MCU Information screen shows 'Not Connected' the debugger does still not have access. In case it doesn't work check that
In Simplicity Commander, this appears as:
As with the "Unlock Debug Access" feature, the Debug Mode is also now depicted in a second location within Simplicity Studio - in the [Kit Manager] tool:
For more information about the debug interface and the AAP, please see AN0062 in Simplicity Studio.
I have a similar problem. Just bricked one EFM32G210F128 rev 1D in my only special prototype by accidentally in a hurry clicking the "Protect" button instead of the "Flash EFM32" in the energyAware Commander 2.84. That was with the default Flash Erase/Write Protection range of 00000 -> 00000.
No longer can I flash the firmware to it (any address) and I can not Remove Flash write protection. The debug port is working and I can access the MCU information via SWD. I also tried the new Flash Programmer tool with same bad result. It claims "TCF error FLASH MSC locked". I thought I could lock the debug port and then unlock it to clear the flash but locking failed. I use Segger J-Link.
I have successfully locked and unlocked flash memory before with proper memory ranges but it seems that strange default range 0->0 breaks something. Any suggestion how to unbrick my prototype without soldering?
(I'll check next if there are some MSC lock bits somewhere accessible via the debugger).
If I go into Flash Programmer I cannot find Unlock debug acces.
I have the new version of SS and cannot see this NOR can I find out how to get eA Commander back.
Was using EM4 mode now the board is locked.
NickCooke, I'm able to unlock debug access in my EFM32G210 using the Segger jlink command line terminal and giving the command:
It is silly that silabs tools are not able to unlock their own chips unless they are mounted in the evaluation kit. At least support was better before silabs bought energymicro. I scrapped my board and got a new one.
My Segger says the chip is unlocked, but the chip still won't flash. I had three boards - the two I tried to flash through Simplicity studio are bricked. The one I did through J-Flash runs. When I plug the board into the debug header of the EFm32 STK, nothing shows up in simplicity to say that it knows that board is there and there are no options under "Flasher" that allow me to tell it which chip to program -the utility that someone wrote for unlock EFm32_M0 doesn't do anything that corrects the problem. Going to check out the link above, but this is absurd.