Device Lock and Protection Commands#

Debug Lock#

Locks access to the debug interface of the device. This feature is only supported on EFM32 and EFR32 devices. The --debug enable option is no longer required as of Simplicity Commander version 1.8.

Command Line Syntax

$ commander device lock [--debug enable]

Command Line Usage Output

Locking debug access...
DONE

Debug Unlock#

Unlocks access to the debug interface of the device. This triggers a mass erase if the device was locked before.

This feature is only supported on EFM32 and EFR32 devices.

Command Line Syntax

$ commander device lock --debug disable

Command Line Usage Output

ERROR: Could not get MCU information
Removing all locks/protection...
Unlocking debug access (triggers a mass erase)...
DONE

In Simplicity Commander version 1.8, an alternative command syntax was introduced.

Command Line Syntax

$ commander device unlock

Command Line Usage Output

Unlocking debug access (triggers a mass erase)...
Chip successfully unlocked.
DONE

Write Protect Flash Ranges#

Protects all flash pages affected by the given memory range from any writes or erases. The available granularity of flash write protection is device-dependent. Consult the device reference manual for details. For EFM32 and EFR32 devices, for example, the write protect feature operates on flash pages. On EM3xx devices, this works on 8 kB or 16 kB blocks.

For all devices, if the given range doesn't match the block size supported by the device, it will be extended to always protect entire regions.

Command Line Syntax

$ commander device protect ‑‑write --range <startaddress>:<endaddress>

Command Line Input Example

$ commander device protect --write --range 0x0:0x4000

Protects all flash pages in the first 16 kB from being erased or written to. Useful for protecting a bootloader from being modified by buggy application code, for example.

Command Line Output Example

Write protecting range 0x00000000 - 0x00004000
DONE

Write Protect Flash Region#

Protects all flash pages in the named region from being written to or erased.

Command Line Syntax

$ commander device protect ‑‑write --region @<region>

Command Line Input Example

$ commander device protect --write --region @mainflash

Protects the entire main flash from being written to or erased.

Command Line Output Example

Write-protecting all pages in main flash.
DONE

Disable Write Protection#

Disables write protection for all pages.

Command Line Syntax

$ commander device protect ‑‑write --disable

Command Line Output Example

Disabling all write protection...
DONE