Skip to main content
Visitor II
February 4, 2025
Question

STM32H7 - Stop a core (M4) from the other core (M7)

  • February 4, 2025
  • 1 reply
  • 674 views

Looking through the HAL for the dual core processors, its pretty easy to stop a core from itself by calling HAL_PWREx_EnterSTOPMode() or similar. However, I don't see an obvious route to, for example, stop the M4 core from code which is running in the M7 (acknowledging the additional management this might require). Is there a call you can make in the M7 to disable the D2 domain (as a specific example). 

Finding the specific controls and calls is probably easy but I can't work out the strategy for doing this from the reference manual. In fact it seems a bit odd to me that you would put the D2 domain to sleep from within the D2 domain!

I think this issue is different to just flipping the Boot M4 bit in the options bytes which seems like a workaround and this then needs to be re-enabled (probably worth mentioning I'm looking at a bootloader right now). At present, the M4 is just sitting and waiting until it receives a flag from the M7 and is probably fine as any change to its program in flash is likely to result in a crash but I am really looking at making sure it's off to avoid any risks.

Has anyone got any thoughts around that or can identify the right STM example project? 

Thanks

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    February 12, 2025

    Hi @microprogrammer ,

    Probably an example like https://github.com/STMicroelectronics/STM32CubeH7/tree/master/Projects/NUCLEO-H745ZI-Q/Examples/PWR/PWR_D1ON_D2OFF is what you look for.

    Following 2 articles as well as references provided there can be helpful for you: 

    -Amel