HAL_Delay - out by 1ms ?
Hello,
I am using HAL2 and wrote the basic code below:
while (1) {
HAL_GPIO_TogglePin(LD1_PORT, LD1_PIN);
HAL_Delay(1);
}
I looked at the pin with an oscilloscope and I see that the signal stays 2ms low and 2ms high. If I change the code to HAL_Delay(0) I get a signal that stays low 1ms and high 1ms. It's as if the delay is actually the HAL_Delay parameter plus 1ms.
Any explanation?
-Gil
