Keil Logo

SWPACK: STM32F7xx: Processor halt


Information in this knowledgebase article applies to:

  • MDK-ARM V5

SYMPTOM

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'

CAUSE

Your application uses _WFI or _WFE instructions to execute low-power-mode.

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.

RESOLUTION

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:

- ULINKpro, ULINK2/ME, CMSIS-DAP

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.

MORE INFORMATION

SEE ALSO

ATTACHED FILES

Request the files attached to this knowledgebase article.

Last Reviewed: Wednesday, January 25, 2017


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.