waspinator / AccelStepper

Fork of AccelStepper
http://www.airspayce.com/mikem/arduino/AccelStepper/
Other
149 stars 87 forks source link

stm32fxxx support #37

Closed ibmthinkpad closed 5 months ago

ibmthinkpad commented 5 months ago

Hello,

I am attempting to use the AccelStepper library on a NUCLEO-F767ZI board with stm32duino, but it seems that none of the pins are toggled at all (did not measure any signal). What steps should I undertake to get it to work? Maybe the pin defines are lost in translation.

I tried to draw inspiration from a different project, but its unmaintained: https://github.com/JonathanGoldnauVogt/STM32_Stepper_Driver/tree/master

I tried to run the ConstantSpeed example with a iHSS42-24-07 integrated closed-loop stepper.

ibmthinkpad commented 5 months ago

I resolved my issue. It turned out that the pulses are generated on the correct pin, but the default period time was ~1.5µS which was too fast for my driver. By explicitly calling stepper.setMinPulseWidth(15) the problem went away!