Difference between revisions of "ST STM32F2"
(Created page with "__TOC__ This article describes device specifics of the ST STM32F2 series devices. == Debugging with software watchdog enabled == If the device shall be debugged with o...") |
|||
Line 1: | Line 1: | ||
+ | This article describes device specifics of the ST STM32F2 series devices. |
||
+ | The STM32F2 devices are Cortex-M3 based MCUs with low-power functionality. |
||
__TOC__ |
__TOC__ |
||
+ | == Internal Flash == |
||
− | This article describes device specifics of the ST STM32F2 series devices. |
||
+ | The following flash regions are supported by J-Link. |
||
− | == Debugging with software watchdog enabled == |
||
+ | {| class="seggertable" |
||
− | If the device shall be debugged with one of the software watchdogs (independed watchdog / window watchdog) enabled, there is an additional init step necessary to make the watchdog counter stop when the CPU is halted by the debugger. This is configured in the DBGMCU_CR register. The following sequence can be used to enable debugging with software watchdogs enabled: |
||
+ | |- |
||
− | // |
||
+ | ! Device !! Range !! Total size |
||
− | // Configure both watchdog timers to be halted if the CPU is halted by the debugger |
||
+ | |- |
||
− | // |
||
+ | | STM32F2xxxB || 0x0800_0000 - 0x0801_FFFF || 128 KB |
||
− | *((volatile int *)(0xE0042004)) |= (1 << 8) | (1 << 9); |
||
+ | |- |
||
+ | | STM32F2xxxC || 0x0800_0000 - 0x0803_FFFF || 256 KB |
||
+ | |- |
||
+ | | STM32F2xxxE || 0x0800_0000 - 0x0807_FFFF || 512 KB |
||
+ | |- |
||
+ | | STM32F2xxxF || 0x0800_0000 - 0x080B_FFFF || 768 KB |
||
+ | |- |
||
+ | | STM32F2xxxG || 0x0800_0000 - 0x080F_FFFF || 512 KB |
||
+ | |- |
||
+ | | All (opt. bytes) || 0x1FFF_C000 - 0x1FFF_C00F || 16 bytes |
||
+ | |} |
||
+ | |||
+ | == Reset == |
||
+ | For the STM32F2 devices, the [[J-Link_Reset_Strategies#Type_0:_Normal | Cortex-M default reset strategy]] is used. |
||
+ | |||
+ | == Debug specific == |
||
+ | * If no connection can be established the J-Link will try to connect to the device via a connect under reset. |
||
+ | * On connect, some DBGMCU registers will be written to |
||
+ | ** freeze the watchdogs during halt to prevent unintended resets while debugging. |
||
+ | ** prevent the debug connection from breaking after the CPU enters deepsleep. |
||
+ | * When closing the J-Link connection, the DBGMCU registers are reset. |
||
+ | |||
+ | == Securing/unsecuring the device == |
||
+ | Please refer to [[STM32#MCU_Security | the related article here]]. |
Revision as of 12:14, 21 November 2022
This article describes device specifics of the ST STM32F2 series devices. The STM32F2 devices are Cortex-M3 based MCUs with low-power functionality.
Internal Flash
The following flash regions are supported by J-Link.
Device | Range | Total size |
---|---|---|
STM32F2xxxB | 0x0800_0000 - 0x0801_FFFF | 128 KB |
STM32F2xxxC | 0x0800_0000 - 0x0803_FFFF | 256 KB |
STM32F2xxxE | 0x0800_0000 - 0x0807_FFFF | 512 KB |
STM32F2xxxF | 0x0800_0000 - 0x080B_FFFF | 768 KB |
STM32F2xxxG | 0x0800_0000 - 0x080F_FFFF | 512 KB |
All (opt. bytes) | 0x1FFF_C000 - 0x1FFF_C00F | 16 bytes |
Reset
For the STM32F2 devices, the Cortex-M default reset strategy is used.
Debug specific
- If no connection can be established the J-Link will try to connect to the device via a connect under reset.
- On connect, some DBGMCU registers will be written to
- freeze the watchdogs during halt to prevent unintended resets while debugging.
- prevent the debug connection from breaking after the CPU enters deepsleep.
- When closing the J-Link connection, the DBGMCU registers are reset.
Securing/unsecuring the device
Please refer to the related article here.