AnsweredAssumed Answered

stm32CubeMX HAL_Delay bug?

Question asked by vnv on Dec 15, 2015
Latest reply on Dec 21, 2015 by vnv
Hi all,

Could someone also verify if there is a bug inside cube.
Steps involved to reproduce:

1. Generate basic template (stm32f407 discovery in my case) inside CubeMX
2. Inside main file write:

char buffer[]="some text\n\r";
 while (1)
  {
         HAL_UART_Transmit(&huart6,buffer,strlen(buffer),200);
        HAL_Delay(1000);
  }


Result: it works.

Now repeat same procedure but add FreeRTOS support.
Before kernel init and start run the same code.


while(1){
 
  HAL_UART_Transmit(&huart6,buffer,strlen(buffer),200);
        HAL_Delay(1000);

}

  /* USER CODE END 2 */

  /* Call init function for freertos objects (in freertos.c) */
  MX_FREERTOS_Init();

  /* Start scheduler */
  osKernelStart();
 
HAL_Delay function doesn't work!

Outcomes