SWPACK: STM32F7xx: Processor halt
Information in this knowledgebase article applies to:
My target is a STM32F7xx. I have MDK-ARM V5 installed.
During debugging, after some time, my application freezes all of a sudden.
Other effects can be:
- the program just stops, but I can continue with Run
- the Debugger crashes (no connection), and I can't reconnect until I re-power to board
- the Debugger stops and the program still is running
- The System Viewer reports an 'Overflow Warning'
- I see the error message 'Cannot access Memory'
The ST chips have the feature to configure the behavior of some peripheral and also the debug component in certain low-power modes. Default is, they are off in low-power modes.
When in such a situation the Debugger tries to read from the target, the device provides wrong information, leading to various strange effects.
The Debugger must have set these debug configuration registers to change the low-power mode behavior at the DBGMCU_CR register:
- DBG_SLEEP, DBG_STOP and DBG_STANDBY
Since version 2.5.0 of the STM32F7xx_DFP, the CMSIS Debug Description should fully include this configuration and will work for the following debug adapters:
a) For Debugger with CMSIS Pack Debug Description support:
You need to ensure that the Debug Description is enabled (Debug Setup Dialog -> Pack-Tab (if present)-> Enable)
...and that the correct settings are done in the dbgconf file (click Edit in the Pack-Tab of the Debug/Settings-dialogue, use the Configuration Wizard to assign this setting):
IMPORTANT: Do not use the attached INI files if using Debug Description. This may conflict and is not the intended use case.
b) For Debugger without CMSIS Pack Debug Description support:
A way to have these bits configured is to use the attached INI-files:
- STM32F7xx_TP.ini: adjusts the Sync Trace Port using the device's Trace Port Interface Unit
- STM32F7xx_SWO.ini: adjusts the Serial Wire Output mode
The ini-file is configured in the following manner:
With a version of STM32F7xx_DFP that is older than V2.5.0, Debug Description is not supported. In this case just use the attached INI files.
Request the files attached to this knowledgebase article.
Last Reviewed: Wednesday, January 25, 2017
of your data.