2017-11-13 08:44 AM
Hello Everyone,
I am working on the STM8AL3166 and try to handle a timer interrupt. My need is to wait 500ms and then check again a value (not pooling)
How/Where do I write the program when the interrupt occurs? Where can I find the header file?
I did several hours of searching and can not find anything, Please Help !
Thank,
David
#timer-interrupts #delay2017-11-29 04:37 AM
Hello Vyacheslav,
Just to give an answer, the RIDE7 give a timer for debugging.
Also, to use a timer with STM there is 5steps :
-Enable timer to get the clock with CLK_PCKENR1 register
-Configure the timer by setting prescaler, ARR and IER to enable TIM interrupt
-Enable general interrupt with the function _rim()_; from intrins.h file
-enable the timer by setting the first timer CR1 register to 1
It will go then to the interrupt handler created in function of the vector interrupt table.
Thank for the help.
Kind regards,
David
2017-11-29 08:25 AM
Hello David,
Unfortunately I do not use Raisonnance tools. And my hopes for using stm8 are not very come true. For a long time, I can not find answers to questions about the behavior of the interrupt system. This can change all my plans and preferences. Although from me, no longer does big business depend, I will not be able to implement my technical solutions and offer them to customers. As for the initialize the CLK_PCKENRx registers, I was considered this as a matter of course.