cancel
Showing results for 
Search instead for 
Did you mean: 

Startup sequence for STM32H7 (dual core)

PButc.1
Associate II

Hello,

is there any documentation regarding the startup on both cores as I see there are several possibilitiess to gate the other core or to let them run directly in parallel. Nevertheless, CubeMx generates a common startup file which is shared I assume. Does ST provide more information on this topic? Where can I find some reference material, e.g. ARM for a dual core approach?

1 REPLY 1
TDK
Guru

There are many ways to do this. The startup code generated by CubeMX is worth a look. It lets the CM7 initialize some stuff while the CM4 waits to be notified. The startup file is the same but it is not shared--there is a copy for each core and they can be modified independently according to your needs.

/* USER CODE BEGIN Boot_Mode_Sequence_1 */
  /*HW semaphore Clock enable*/
  __HAL_RCC_HSEM_CLK_ENABLE();
  /* Activate HSEM notification for Cortex-M4*/
  HAL_HSEM_ActivateNotification(__HAL_HSEM_SEMID_TO_MASK(HSEM_ID_0));
  /*
  Domain D2 goes to STOP mode (Cortex-M4 in deep-sleep) waiting for Cortex-M7 to
  perform system initialization (system clock config, external memory configuration.. )
  */
  HAL_PWREx_ClearPendingEvent();
  HAL_PWREx_EnterSTOPMode(PWR_MAINREGULATOR_ON, PWR_STOPENTRY_WFE, PWR_D2_DOMAIN);
  /* Clear HSEM flag */
  __HAL_HSEM_CLEAR_FLAG(__HAL_HSEM_SEMID_TO_MASK(HSEM_ID_0));
 
/* USER CODE END Boot_Mode_Sequence_1 */

There is also this but I think looking at the code is more useful:

https://www.st.com/resource/en/application_note/dm00629855-getting-started-with-projects-based-on-dualcore-stm32h7-microcontrollers-in-stm32cubeide-stmicroelectronics.pdf

If you feel a post has answered your question, please click "Accept as Solution".