Sometimes a user error may result in a device becoming locked. When a device is locked, it’s memory cannot be written to, nor can it’s memory be read from. This is a security feature in many MCUs.
This module provides functions for unlocking a locked device.
Unlocking a device results in a mass-erase. Do not unlock a device if you do not want it be erased.
Unlocks a J-Link’s target device.
- jlink (JLink) – the connected J-Link device
- name (str) – the MCU name (e.g. Kinetis)
- Supported Names:
Trueif the device was unlocked, otherwise
NotImplementedError– if no unlock method exists for the MCU.
Unlock for Freescale Kinetis K40 or K60 device.
Parameters: jlink (JLink) – an instance of a J-Link that is connected to a target. Returns:
Trueif the device was successfully unlocked, otherwise
ValueError– if the J-Link is not connected to a target.