cancel
Showing results for 
Search instead for 
Did you mean: 

I am using FREERTOS CMSIS_V2. I am trying to use Soft timer but MCU hangs at osTimerStart(myTimer01Handle, 500); and it doesn't proceed any further. While same configuration is working for CMSIS_V1 perfectly. Kindly help me.

TALHA
Associate II

void StartDefaultTask(void const * argument)

{

 /* USER CODE BEGIN 5 */

osTimerStart(myTimer01Handle, 500);

 /* Infinite loop */

 for(;;)

 {

 HAL_GPIO_TogglePin(GPIOC,GPIO_PIN_13);

 osDelay(1000);

 }

 /* USER CODE END 5 */ 

}

/* Callback01 function */

void Callback01(void const * argument)

{

 /* USER CODE BEGIN Callback01 */

HAL_GPIO_TogglePin(GPIOC,GPIO_PIN_14);

 /* USER CODE END Callback01 */

}

1 REPLY 1
toroid
Associate III

Late reply but maybe it is of help.

Did you create the timer?

osTimerNew(myTimer01Handle, osTimerPeriodic, (void *)0, NULL);

And do check the return value that it is not NULL.

Are software timers enabled in freertos? In Cubemx, freertos-config parameters-software timer definitions-use_timers. Or in code check for #define configUSE_TIMERS 1