HAL_Delay is stuck in the main function.
If I write HAL_Delay in the main function, then code execution gets stuck at this place.
int main
{
HAL_Delay(1);
}Code execution does not exit the loop at this point.
while((HAL_GetTick() - tickstart) < wait)I think because the SysTick_Handler interrupt is not executed and therefore uwTick is not incremented.
I set the SysTick timer to high priority, but nothing changed.
Why is SysTick_Handler not being executed?
SysTick_Handler should execute every 1 millisecond and increment the uwTick variable.
HAL_Delay in the while loop works correctly, HAL_Delay does not work in the main function.

