cancel
Showing results for 
Search instead for 
Did you mean: 

STM8S TIMER1 ONE PULSE MODE

Chayan Roy
Associate III
Posted on July 15, 2017 at 07:28

Hello everyone ,

I am trying to program STM8S timer1 in One Pulse mode, after reading the data-sheet of STM8S003F3P6,I have understood that how to program timer1 in one pulse mode but I don't understand that after  programming in one pulse mode,after one trigger event , i.e after generating one pulse, do I have to re-initialize the timer for every pulse..?? Or just timer run signal is enough??Thanx

1 REPLY 1
Posted on July 17, 2017 at 12:59

do I have to re-initialize the timer for every pulse

No. In the One-Pulse mode, when you run the timer and it reaches the point where it generates the Update Event (i.e. in the usual upcounter mode when CNT reaches ARR and then returns to 0), it clears its own TIMx_CR1.CEN  and stops. It's enough to set TIMx_CR1 to restart it.

JW

PS. This is an STM32 forum, and there's also an

https://community.st.com/community/stm8-community/stm8-mcus

where your STM8-related questions might be better answered. Luckily, both STM32 and STM8 timers are the same with only little differences in the very details.