From 86c51359827b08c62c9584bef3d69fbb38186ea3 Mon Sep 17 00:00:00 2001 From: Mathieu Choplain Date: Tue, 27 May 2025 13:52:03 +0200 Subject: [PATCH] soc: st: stm32: hsem: update description for fifth HSEM The fifth HSEM (#define is equal to 4 due to zero-indexing) is used on STM32H7 to synchronize the two cores. Update the comment above the SEMID define to reflect this alternate usage. Also remove the associated define CFG_HW_ENTRY_STOP_MODE_MASK_SEMID, which is unused. Signed-off-by: Mathieu Choplain --- soc/st/stm32/common/stm32_hsem.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/soc/st/stm32/common/stm32_hsem.h b/soc/st/stm32/common/stm32_hsem.h index 1f74c92c27f..b0888a86e04 100644 --- a/soc/st/stm32/common/stm32_hsem.h +++ b/soc/st/stm32/common/stm32_hsem.h @@ -28,9 +28,13 @@ /* Index of the semaphore used to access the RCC */ #define CFG_HW_RCC_SEMID 3U -/* Index of the semaphore used to manage the entry Stop Mode procedure */ +/** + * Index of the semaphore used to manage the entry Stop Mode procedure. + * On STM32H7, this semaphore is instead used to gate the Cortex-M4 core + * until Cortex-M7 has finished initializing the system, and remains owned + * by CM7 afterwards. + */ #define CFG_HW_ENTRY_STOP_MODE_SEMID 4U -#define CFG_HW_ENTRY_STOP_MODE_MASK_SEMID (1U << CFG_HW_ENTRY_STOP_MODE_SEMID) /** * Index of the semaphore used to manage the CLK48 clock configuration