AnsweredAssumed Answered

CubeMX 4.12.0 Bug Report

Question asked by Misagh92 on Jan 24, 2016
Latest reply on Jan 25, 2016 by STM32Cube-T
Hello everybody,
When I use FreeRTOS, the cubemx generates following code for SysTick_Handler():


void SysTick_Handler(void)
{
  /* USER CODE BEGIN SysTick_IRQn 0 */

  /* USER CODE END SysTick_IRQn 0 */
  osSystickHandler();
  /* USER CODE BEGIN SysTick_IRQn 1 */
   
  /* USER CODE END SysTick_IRQn 1 */
}


Therefore, HAL_Delay() doesn't work. When we use LSI, HAL library will call HAL_Delay(1) function while initializing clock in SystemClock_Config() and the program will go to infinite loop.
So I added this code to SysTick_Handler():

void SysTick_Handler(void)
{
  /* USER CODE BEGIN SysTick_IRQn 0 */

  /* USER CODE END SysTick_IRQn 0 */
  osSystickHandler();
  /* USER CODE BEGIN SysTick_IRQn 1 */
    HAL_IncTick();
  /* USER CODE END SysTick_IRQn 1 */
}

I hope this problem solve in next CubeMX versions.
Bests,
Misagh

Outcomes