cancel
Showing results for 
Search instead for 
Did you mean: 

STMCubeIDE places release core code for cpu2 in unreachable code?

MMitt.1
Associate

Hi,

I have used the Cube IDE to generate project code for a STM32WL55JC1 (Dual Core). I have activated FreeRTOS for the M4 core (cpu1). The generated code places the call to release the M0+ core (cpu2) after the kernel has been handled control (unreachable code). Is this a bug or am I missing something here?

/* Start scheduler */
  osKernelStart();
 
  /* We should never get here as control is now taken by the scheduler */
  /* Boot CPU2 */
  HAL_PWREx_ReleaseCore(PWR_CORE_CPU2);
 
  /* Infinite loop */
  /* USER CODE BEGIN WHILE */
  while (1)
  {
    /* USER CODE END WHILE */
 
    /* USER CODE BEGIN 3 */
  }
  /* USER CODE END 3 */

Thanks

Mark

2 REPLIES 2
TDK
Guru

Yeah seems like it's in the wrong order. It isn't that way in the examples.

https://github.com/STMicroelectronics/STM32CubeWL/blob/de65a6e5e3aa178705e20c71f7d78db198a80ccc/Projects/NUCLEO-WL55JC/Applications/FreeRTOS/FreeRTOS_HSEM_DualCore/CM4/Src/main.c#L110

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

Thanks, thought so, I placed a call to release the core just before FreeRTOS get initialized.