cancel
Showing results for 
Search instead for 
Did you mean: 

FreeRTOS PROBLEM

JamesMoriarty
Associate II

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?

2 REPLIES 2
mƎALLEm
ST Employee

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.
Saket_Om
ST Employee

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