Electronic – FreeRtos stm32f4 stuck in vTaskDelay

armfreertosstm32f4

hello i'am using FreeRtos API with stm32f4 microcontroller , the program gets stuck when it enters vTaskDelay , when I debug it I see that it is stuck in this line (2588 of tasks.c at function vTaskDelay)

            if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ tskIDLE_PRIORITY ] ) ) > ( UBaseType_t ) 1 )
        {
            taskYIELD();
        }

thank a lot for your help

Best Answer

well I found the reason why this error happened it's just that time doesn't seem to advance because the systick interruption was like doing nothing , and this because i used a FreeRTOSConfig.h generated with stmcube and the following was commented

/* IMPORTANT: This define MUST be commented when used with STM32Cube firmware, 
to prevent overwriting SysTick_Handler defined within STM32Cube HAL */
/* #define xPortSysTickHandler SysTick_Handler*/

, I decommented it , i also had to comment the definition of the systick interruption in stm32f4xx__it.c to avoid duplicate definition