teemuatlut / TMCStepper

MIT License
501 stars 196 forks source link

Need Immediate Motor Stop Strategy via SPI Commands without Hardware Changes #295

Open cuishuang413 opened 7 months ago

cuishuang413 commented 7 months ago

Greetings,

I'm seeking assistance with my application that requires an immediate (abrupt) stop of the motor using software commands in full SPI mode. I am unable to incorporate any additional hardware modifications to the driver as indicated in the datasheet's "Emergency Stop" section. Is there a specific command or approach to halt the ramp generator and immediately stop the motor via SPI commands without undergoing any deceleration process? It's important to note that deactivating the DRV_ENN pin is not a feasible solution for my case, as I need to avoid the motor entering a freewheel state and maintain the holding current to act as a "brake" for the motor. Besides, disabling DRV_ENN doesn't suffice since the ramp generator continues to operate, causing the XACTUAL to move uninformed of the DRV_ENN status change. Could anyone direct me towards a solution for this issue?

Thank you.