Fixed bug in STM HAL + FreeRTOS integration.