Skip to main content
mickminn
Associate II
August 22, 2019
Solved

Possible bug in STM32Cube_FW_H7_V1.5.0 SystemInit() function

  • August 22, 2019
  • 1 reply
  • 900 views

Hello,

I have been having problems with my debugger losing connection when i set the CM7 of my STM32H745 into CSleep mode. I have the DBGMCU flags set to enable debugging in low power, but I assumed I was still doing something incorrect with the domain low power modes or the flash memory.

However, I made a minimal example without the STM HAL and low power debugging worked as expected. The debugger did not lose the connection after the CPU entered CSleep mode.

I tracked it down to line 137 in file "STM32Cube_FW_H7_V1.5.0\Projects\NUCLEO-H745ZI-Q\Templates\BootCM4_CM7\Common\Src\system_stm32h7xx.c":

SCB->SCR |= SCB_SCR_SEVONPEND_Pos;

Based on the comment immediately before and the seeming intention of the line this should probably be: 

SCB->SCR |= SCB_SCR_SEVONPEND_Msk;

And indeed making the change allows the low power debugging to behave as intended with the debugger not losing the connection.

That line of code is all over the example and template sources as per the attached file, but seemingly only those where both cores boot simultaneously.

Hope that helps.

This topic has been closed for replies.
Best answer by Mike_ST

Thank you for reporting,

Internal ticket entered.

1 reply

Mike_ST
Mike_STBest answer
ST Technical Moderator
August 22, 2019

Thank you for reporting,

Internal ticket entered.

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.