2017-09-13 02:53 PM
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-pulse2017-09-13 03:19 PM
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.
2018-06-14 06:47 PM
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.
2018-06-15 06:21 AM
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.