Skip to content

Commit 4e96219

Browse files
committed
OpenAMP semaphore init before first use
HSEM clock was enabled after first use, resulting in endless loop without error exception. Moved HSEM clock enable before first use.
1 parent e3be6d3 commit 4e96219

File tree

2 files changed

+7
-5
lines changed
  • Projects/STM32MP157C-DK2/Applications/OpenAMP

2 files changed

+7
-5
lines changed

Projects/STM32MP157C-DK2/Applications/OpenAMP/OpenAMP_TTY_echo/Src/main.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,13 @@ int main(void)
9797
((HAL_GetHalVersion() >> 24) & 0x000000FF),
9898
((HAL_GetHalVersion() >> 16) & 0x000000FF),
9999
((HAL_GetHalVersion() >> 8) & 0x000000FF));
100+
/*HW semaphore Clock enable*/
101+
__HAL_RCC_HSEM_CLK_ENABLE();
102+
100103
BSP_LED_Init(LED7);
101104
BSP_LED_On(LED7);
102105
/* USER CODE END Init */
103106

104-
/*HW semaphore Clock enable*/
105-
__HAL_RCC_HSEM_CLK_ENABLE();
106107
/* IPCC initialisation */
107108
MX_IPCC_Init();
108109
/* OpenAmp initialisation ---------------------------------*/

Projects/STM32MP157C-DK2/Applications/OpenAMP/OpenAMP_for_signed_fw/Src/main.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,13 @@ int main(void)
9797
((HAL_GetHalVersion() >> 24) & 0x000000FF),
9898
((HAL_GetHalVersion() >> 16) & 0x000000FF),
9999
((HAL_GetHalVersion() >> 8) & 0x000000FF));
100+
/*HW semaphore Clock enable*/
101+
__HAL_RCC_HSEM_CLK_ENABLE();
102+
100103
BSP_LED_Init(LED7);
101104
BSP_LED_On(LED7);
102105
/* USER CODE END Init */
103-
104-
/*HW semaphore Clock enable*/
105-
__HAL_RCC_HSEM_CLK_ENABLE();
106+
106107
/* IPCC initialisation */
107108
MX_IPCC_Init();
108109
/* OpenAmp initialisation ---------------------------------*/

0 commit comments

Comments
 (0)