Difference between revisions of "ST STM32"
(Tag: Undo) |
(Tag: Undo) |
||
Line 1: | Line 1: | ||
+ | __TOC__ |
||
+ | |||
+ | |||
+ | The STM32 Series is a popular family of Cortex-M devices by STMicroelectronics. |
||
+ | The following article contains information which applies to all members of the product family (e.g. readout protection). |
||
+ | Information which is more specific to the respective sub-family(e.g. QSPI programming) is provided in family specific articles. |
||
+ | |||
+ | A list of all ST devices supported by SEGGER can be found [https://www.segger.com/jlink_supported_devices.html?m=ST#sel here]. |
||
+ | For further information regarding the STM32 product family, please refer to the website and documentation by STMicroelectronics. |
||
+ | |||
+ | = MCU Security = |
||
+ | |||
+ | == Allow opt bytes device selection == |
||
+ | The "allow opt. bytes" device selection is only available for STM32F1 series devices. For later devices, memory mapped programming of the option bytes is not feasible as for some series, the option bytes become valid immediately which would cause immediate connection loss to a device (in case readout protection is enabled) before the option byte programming can be verified. |
||
+ | |||
+ | The STM32 series devices provide option bytes which allow "permanent" configuration as well as readout protection for the device. |
||
+ | In order to enable or disable readout protection, a sequence of multiple read / write accesses to special function registers of the STM32 MCU has to be performed. |
||
+ | The sequence is different for each sub-family of the STM32 device series and is described in the respective reference manual of the device. |
||
+ | A list of example J-Link commander files and J-Flash projects which enable or disable the readout protection of an STM32 device is provided below. |
||
+ | Please note that the provided files serves as an example / proof of concept. A user may alter them in order to suit their specific use case, e.g. using smaller timeouts, programming other values, etc. |
||
+ | |||
+ | {{Note|A power-on reset is required when securing the device while a debug probe is connected.}} |
||
+ | |||
+ | == Disabling readout protection == |
||
+ | |||
+ | === J-Link Commander and J-Flash === |
||
+ | J-Link Commander and J-Flash automatically detect secured STM32 devices and ask the user if it should be unlocked. Further information regarding this can be found here: [[Secured_ST_device_detected]] |
||
+ | |||
+ | === Flasher standalone mode === |
||
+ | In order to unlock a STM32 device in stand-alone mode, the unlock sequence needs to be configured in the init steps of the J-Flash project (see examples in the table below). |
||
+ | |||
+ | === Restoring factory defaults === |
||
+ | The standalone software tool STM32 Unlock can be used to reset the Option Bytes of a STM32 device to factory default settings. |
||
+ | STM32 Unlock is part of the [https://www.segger.com/jlink-software.html J-Link software & documentation pack]. |
||
+ | |||
This page is created to keep track about what the STM32 J-Link support currently covers. |
This page is created to keep track about what the STM32 J-Link support currently covers. |
||
__TOC__ |
__TOC__ |
Revision as of 11:54, 22 June 2022
Contents
The STM32 Series is a popular family of Cortex-M devices by STMicroelectronics.
The following article contains information which applies to all members of the product family (e.g. readout protection).
Information which is more specific to the respective sub-family(e.g. QSPI programming) is provided in family specific articles.
A list of all ST devices supported by SEGGER can be found here. For further information regarding the STM32 product family, please refer to the website and documentation by STMicroelectronics.
MCU Security
Allow opt bytes device selection
The "allow opt. bytes" device selection is only available for STM32F1 series devices. For later devices, memory mapped programming of the option bytes is not feasible as for some series, the option bytes become valid immediately which would cause immediate connection loss to a device (in case readout protection is enabled) before the option byte programming can be verified.
The STM32 series devices provide option bytes which allow "permanent" configuration as well as readout protection for the device. In order to enable or disable readout protection, a sequence of multiple read / write accesses to special function registers of the STM32 MCU has to be performed. The sequence is different for each sub-family of the STM32 device series and is described in the respective reference manual of the device. A list of example J-Link commander files and J-Flash projects which enable or disable the readout protection of an STM32 device is provided below. Please note that the provided files serves as an example / proof of concept. A user may alter them in order to suit their specific use case, e.g. using smaller timeouts, programming other values, etc.
A power-on reset is required when securing the device while a debug probe is connected.
Disabling readout protection
J-Link Commander and J-Flash
J-Link Commander and J-Flash automatically detect secured STM32 devices and ask the user if it should be unlocked. Further information regarding this can be found here: Secured_ST_device_detected
Flasher standalone mode
In order to unlock a STM32 device in stand-alone mode, the unlock sequence needs to be configured in the init steps of the J-Flash project (see examples in the table below).
Restoring factory defaults
The standalone software tool STM32 Unlock can be used to reset the Option Bytes of a STM32 device to factory default settings. STM32 Unlock is part of the J-Link software & documentation pack.
This page is created to keep track about what the STM32 J-Link support currently covers.
Device Table
DeviceFamily | DevSpecConnect | Unlock | OptionByte prog | STM32Utility | Status |
---|---|---|---|---|---|
STM32C0 | Hidden | ||||
STM32F0 | Public | ||||
STM32F1 | Public | ||||
STM32F2 | Public | ||||
STM32F3 | Public | ||||
STM32F4 | Public | ||||
STM32F7 | Public | ||||
STM32G0 | Public | ||||
STM32G4 | Public | ||||
STM32H7 | [1] | Public | |||
STM32L1 | Public | ||||
STM32L4 | [1] | Public | |||
STM32L5 | Public | ||||
STM32MP1 | Public | ||||
STM32U5 | Public | ||||
STM32W1 (not listed as family by ST) | Public | ||||
STM32WB | Public | ||||
STM32WL | Public |