Fixed bug with HAL library and FreeRTOS. The HAL needs a tick from systick handler as well