Skip to main content
Associate II
September 19, 2025
Solved

FreeRTOS PROBLEM

  • September 19, 2025
  • 2 replies
  • 292 views

Post edited by ST moderator to be inline with the community rules especially with the code sharing. In next time please use </> button to paste your code. Please read this post: How to insert source code.

in STM32U073MCT6 microcontrollers, I have a problem which is like this;
in main.c I have

while (1)
{
 /* USER CODE END WHILE */
 HAL_GPIO_WritePin(ioOUT_DISP_A_GPIO_Port, ioOUT_DISP_A_Pin, 1);
 /* USER CODE BEGIN 3 */
}


and my led is blinked which is high 3.3 v
however, whenever I enable freertos, led is 0 v
what should I do?

Best answer by mƎALLEm

Hello,

As soon as osKernelStart() is called that infinite loop in main() is unreachable.

You need to handle that gpio state in one of the Tasks, example the default task.

2 replies

mƎALLEm
mƎALLEmBest answer
Technical Moderator
September 19, 2025

Hello,

As soon as osKernelStart() is called that infinite loop in main() is unreachable.

You need to handle that gpio state in one of the Tasks, example the default task.

"To give better visibility on the answered topics, please click on ""Accept as Solution"" on the reply which solved your issue or answered your question."
Technical Moderator
September 19, 2025

Hello @JamesMoriarty 

As @mƎALLEm mentioned you need to toggle your led in one of the tasks. 

Please check the example below as reference.

STM32CubeH7/Projects/NUCLEO-H743ZI/Applications/FreeRTOS/FreeRTOS_ThreadCreation at master · STMicroelectronics/STM32CubeH7 · GitHub 

"To give better visibility on the answered topics, please click on ""Accept as Solution"" on the reply which solved your issue or answered your question.Saket_Om"