diff options
Diffstat (limited to 'src/Movement/StepperDrivers/TMC2660.cpp')
-rw-r--r-- | src/Movement/StepperDrivers/TMC2660.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Movement/StepperDrivers/TMC2660.cpp b/src/Movement/StepperDrivers/TMC2660.cpp index 8bc88313..7a6e93dc 100644 --- a/src/Movement/StepperDrivers/TMC2660.cpp +++ b/src/Movement/StepperDrivers/TMC2660.cpp @@ -635,7 +635,8 @@ void TmcDriverState::Enable(bool en) noexcept void TmcDriverState::UpdateChopConfRegister() noexcept { - registers[ChopperControl] = (enabled) ? configuredChopConfReg : (configuredChopConfReg & ~TMC_CHOPCONF_TOFF_MASK); + // It's critical that TMC_DRVCONF_VSENSE is always set, so we or-it in here just in case + registers[ChopperControl] = ((enabled) ? configuredChopConfReg : (configuredChopConfReg & ~TMC_CHOPCONF_TOFF_MASK)) | TMC_DRVCONF_VSENSE; registersToUpdate |= (1u << ChopperControl); } |