2019-08-22 02:10 AM
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.
Solved! Go to Solution.
2019-08-22 02:40 AM
2019-08-22 02:40 AM
Thank you for reporting,
Internal ticket entered.