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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-01-15 12:38 AM
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 */
}
- Labels:
-
FreeRTOS
-
STM32CubeIDE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-11-20 4:05 AM
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
