2020-12-03 12:06 AM
Hi Everyone!
Last few days I start to learn about Timer, especially about Timer with interrupt. I have a question about this.
When I start timer, the interrupt immediately occurred and then after every 3 seconds.
Is there any possibility to skip the first interrupt and get the first interrupt 3 seconds after starting the Timer?
Best regards,
DomenI
2020-12-03 04:10 AM
Best is you avoid that by cleaning up before enabling the timer irq. Otherwise, have a static variable set to 0. increment in the irq and return immediate when == 1
2020-12-03 11:26 AM
Good idea, thanks. I will use it.
I was just think, maybe there is some predefined function.
All the best,
Domen
2020-12-04 12:51 AM