Can you try the suggestion in STM32FreeRTOS vTaskDelay() not returning - #2 by maxgerhardt (equivalent this)?