cancel
Showing results for 
Search instead for 
Did you mean: 

n-Pulse generation : REP_CNT register

Neo M
Associate II
Posted on September 13, 2017 at 23:53

I am using

https://community.st.com/0D50X00009XkdsSSAR

 method to drive a servo-like motor interface. In the system, if E-Stop is pressed, I'lI have stop the motor immediately. Is there a way to find out the number of pulses the timer has put out to the motor, so that I can know the exact position the motor was stopped?

User manual points to 'REP_CNT related down-counter', which I am not able to find. 

#stm32f7 #n-pulse #one-pulse
3 REPLIES 3
Posted on September 14, 2017 at 00:19

Don't recall the repeat counter or prescaler being read-able. If you have a free TIM you could loop back the output so you can count pulses independently.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Gavin Baker
Associate III
Posted on June 15, 2018 at 03:47

Did you ever find an answer to this question?

In the reference manual (RM0008) in Section 14.4.13 describing TMx_RCR, it mentions REP_CNT, and 'Figure 52: Advanced control timer block diagram' has boxes showing the 'REP Register' and 'Repetition Counter', but I can't find any more info on the subject.

I need a way to reset the REP_CNT when the PWM output is stopped and re-started, otherwise there is a residual value in REP_CNT which causes a glitch or phase shift in the output.

Posted on June 15, 2018 at 13:21

REP_CNT is not readable. I used external counter to count the number of pulses generated. 

I do not think there is a way to reset REP_CNT.