TIM4 weird results
Hello, I am using stm8s003f3 and I wanted to count with 1 ms of precision and it works well.
I use a prescaler of 128 and a period of 125 and if I use my delay function with 1000 as parameter, I get the second.
However if I use a prescaler of 16 and period of 1, normally I get 1 �s precision but my delay function with 1000000 is logically 1 second too but it's +- 7s
I don't know what I'm doing wrong so if someone can help me.
My main.c
stm8_interrupt_vector.c
Thanks !
#tim4 #timer