HAL_Delay() is not working properly!!!
..
..
> it looks like with each delay, it lasts 1ms more!
This is how HAL_Delay() works - it provides you a *minimum* N ms delay.
It looks at a timer which ticks continuously once in 1ms. So, when you call it, it looks at that timer's value, say it's K, and then waits until that timer rolls over from K+N to K+N+1.
If you happen to call it just moments before it rolls over from K to K+1, the delay will be just slightly longer than N ms. If you happen to call it slightly after it rolls over from K-1 to K, the delay will be just slightly shorter than N+1 ms.
JW
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.