STM32 HAL_DELAY hangs with HAL_GetTick=0
As an advanced STM32 user I can say that you did not handle the SysTick interrupt.

The HAL library enables the SysTick timer and interrupts for it.

In stm32f4xx_it.c file add this function call:

void SysTick_Handler(void) {
    HAL_IncTick();
}


Then it should work.