J-Link STM32 Utility
J-Link STM32 Unlock (JLinkSTM32.exe) is a free command line based tool which can be used with STM32 devices, to disable the hardware watchdog (activated by programming the option bytes). Additionally, on connect, it unsecures a read-protected STM32 device by re-programming the option bytes to factory defaults. The J-Link STM32 Unlock utility is part of the J-Link Software and Documentation Pack, which is available for download on the SEGGER webpage.
Note: Unsecuring a secured device will cause a mass erase of the flash memory.
- 1 Command Line Options
Command Line Options
The following command line options can be passed to the J-Link STM32 Unlock utility.
|Command line option||Explanation|
|-IP||Selects IP as host interface to connect to J-Link. Default host interface is USB.|
|-USB||Connects to a J-Link with a specific S/N over USB|
|-Speed||Starts the J-Link STM32 Unlock Utility with a given initial interface speed.|
|-SetPowerTarget||Enables target power supply via pin 19.|
|-SetDeviceFamily||Specifies a device family|
|-Exit||J-Link STM32 Unlock will close automatically|
Selects IP as host interface to connect to J-Link. Default host interface is USB.
JLinkSTM32.exe -IP 192.168.1.17
To select from a list of all available emulators on Ethernet, please use * as <IPAddr>.
Connect to a J-Link with a specific serial number via USB. Useful if multiple J-Links are connected to the same PC.
JLinkSTM32.exe -USB 580011111
Starts J-Link STM32 Unlock Utility with a given initial speed. Available parameters are "adaptive", "auto" or a freely selectable integer value in kHz. It is recommended to use either a fixed speed or, if it is available on the target, adaptive speeds. Default interface speed is 1000 kHz.
The connected debug probe will power the target via pin 19 of the debug connector.
JLinkSTM32.exe -SetPowerTarget 1
This command allows to specify a device family, so that no user input is required to start the unlocking process.
There are two different options to specify the device family to be used:
a) Pass the list index from the list which shows all supported families on start up
b) Pass the defined device name
 STM32H743_53_50  STM32H745_47_55_57  STM32L0xxxx  STM32L1xxxx  STM32L4xxxx  STM32G0x0xx  STM32G0x1xx  STM32G4xxxx
|9||STM32H743, STM32H753, STM32H750|
|10||STM32H745, STM32H747, STM32H755, STM32H757|
JLinkSTM32.exe -SetDeviceFamily 10 // Selects STM32L1 series JLinkSTM32.exe -SetDeviceFamily STM32F2xxxx // Selects STM32F2 series
In general, the J-Link STM32 utility waits at the end of the unlock process for any user input before application closes. This option allows to skip this step, so that the utility closes automatically.
JLinkSTM32.exe -Exit 1 // J-Link STM32 utility closes automatically