From bee1c67416c0f05eda06078bf160edb8b6ce092e Mon Sep 17 00:00:00 2001 From: Alex Voinea Date: Sat, 4 Mar 2023 10:25:49 +0100 Subject: tmc5160: allow changing the globalscaler at runtime Previously, the globalscaler was calculated during the config parsing and set to a fixed value. If the current was changed for any reason after the initialization, only IRUN and IHOLD would be changed. This however caused issues: - If the new current was lower, then the resolution of the possible current values would be low since there are only 32 IRUN/IHOLD steps. - If the new current was higher, it wouldn't actually work since IRUN and IHOLD are capped at 31, so it wouldn't be possible to increase the current without increasing globalscaler. With this commit, the globalscaler is recalculated whenever necessary in order to ensure the correct range of IRUN/IHOLD is used. Signed-off-by: Alex Voinea --- docs/Config_Changes.md | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'docs/Config_Changes.md') diff --git a/docs/Config_Changes.md b/docs/Config_Changes.md index 3a38fd40..efe962d1 100644 --- a/docs/Config_Changes.md +++ b/docs/Config_Changes.md @@ -8,6 +8,14 @@ All dates in this document are approximate. ## Changes +20230304: The `SET_TMC_CURRENT` command now properly adjusts the globalscaler +register for drivers that have it. This removes a limitation where on tmc5160, +the currents could not be raised higher with `SET_TMC_CURRENT` than the +`run_current` value set in the config file. +However, this has a side effect: After running `SET_TMC_CURRENT`, the stepper +must be held at standstill for >130ms in case StealthChop2 is used so that the +AT#1 calibration gets executed by the driver. + 20230202: The format of the `printer.screws_tilt_adjust` status information has changed. The information is now stored as a dictionary of screws with the resulting measurements. See the -- cgit v1.2.3-70-g09d2