Again Microsecond timer on STM32C011F6U6
Hi,
I tried to reach 1us delay. To do that I use a timer on 1MHz and try to reach more or less precision delay.
void delayMicro(uint16_t delayMc) {
__HAL_TIM_SET_COUNTER(&htim16,0); // set the counter value a 0
while (__HAL_TIM_GET_COUNTER(&htim16) < delayMc);
} HAL_TIM_Base_Start(&htim16);
while () {
delayMicro(100);
HAL_GPIO_TogglePin(OUT1_GPIO_Port, OUT1_Pin);
}


And the result is always desired delay+6-8us

Even if I set delay = 1us, I get 7-8us.
I did something wrong or is this GPIO or microcontroller limitation?
