2017-01-11 06:21 AM
I am trying to interface a Teknic Clearpath SDSK motor to STM32F7 Nucleo Dev Board. It is a Brushless DC motor with a stepper like interface. The motor moves a set distance based on the number of pulses it receives. The speed is determined by the frequency of the pulses, like a stepper motor. What is the best way to generate a fixed number of pulses reliably from STM32 F7?
One of the solutions that I came across is to feed a PWM out back in to a timer in counter mode, and stop the PWM out when the required number of pulses have been generated. Is there a novel way of doing this without the need of feedback and ISRs?
‌ ‌#stm32-pwm-timers #n-pulse #reset-stm322017-01-11 07:20 AM
TIM1/TIM8 have a repetition counter TIMx_RCR, which together with one-pulse mode can be used for generating a given number of pulses (and in F7 it's 16-bit, in contrast to F4 where it was 8 bit only).
JW
2017-01-11 09:05 AM
if the pulses in the future need to be dynamically modulated (duty cycle), DMA buffer feeding a Timer output compare could also be an alternative solution.
2017-01-11 09:06 AM
+1 One-Shot w/Repetition
2017-01-12 09:31 AM
Keeping track of what you're doing would certainly negate the need to count it externally. The size of the pattern buffer, and use of HT/TC interrupts on the DMA could decimate the interrupt loading.
2017-11-13 07:28 PM
Hi,how can I generate an interrupt when the given numbers of pulses is stopped?(I use TIM1 on stm32f427)
2017-11-14 12:16 AM
The Update Event (thus the interrupt resulting from it, if enabled) happens only after the number of cycles given by Repetition Counter elapsed.
JW