Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix short circuit handling on TMC220x #20731

Merged
merged 2 commits into from
Jan 11, 2021

Conversation

devin122
Copy link
Contributor

@devin122 devin122 commented Jan 9, 2021

Description

Currently with STOP_ON_ERROR, Marlin ignores short circuit conditions. However there is commented out code which checks s2a and s2b. I suspect the fact that it was not updated to use is_s2g as part of #13135 was simply an oversight.

In addition the short-circuit bitmask used for TMC220x drivers is incorrect. The bits we are interested in are 2..5 (which is reflected in the comment), but the current mask is actually for 1..4

Benefits

  • When STOP_ON_ERROR and MONITOR_DRIVER_STATUS are enabled, Marlin will halt on a TMC driver reporting a short circuit condition.

  • Short circuit flags are properly identified for TMC220x drivers

Configurations

requires a TMC220x driver, STOP_ON_ERROR and MONITOR_DRIVER_STATUS

Detect short circuit conditions in monitor_tmc_driver.
Update the bitmask to match both the existing comment, and the datasheet
@thinkyhead thinkyhead merged commit 8ff87c1 into MarlinFirmware:bugfix-2.0.x Jan 11, 2021
susisstrolch pushed a commit to susisstrolch/Marlin that referenced this pull request Feb 16, 2021
… into bugfix-2.0.x

* 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin: (29 commits)
  More MKS UI prelim. cleanup
  MKS WiFi for TFT_LVGL_UI (MarlinFirmware#20191)
  [cron] Bump distribution date (2021-01-14)
  Ignore M22 during SD print
  Move WRITE_FAN
  whitespace
  MKS UI prelim. cleanup (MarlinFirmware#20763)
  Rotary encoder cleanup (MarlinFirmware#20753)
  Fix comments (MarlinFirmware#20759)
  [cron] Bump distribution date (2021-01-13)
  Ok to use C++11 'auto'
  Multi-platform DWIN_CREALITY_LCD support (MarlinFirmware#20738)
  [cron] Bump distribution date (2021-01-12)
  Fix TMC220x short circuit (MarlinFirmware#20731)
  Fixes for TFTGLCD (MarlinFirmware#20734)
  NO_SD_DETECT option (MarlinFirmware#20741)
  Fix joystick include
  Tweak STM32F1 pin r/w/t
  Clean up some includes
  Update Slovak glyphs
  ...
kpishere pushed a commit to kpishere/Marlin that referenced this pull request Feb 19, 2021
zillarob pushed a commit to zillarob/Marlin that referenced this pull request Feb 25, 2021
W4tel-BiDi pushed a commit to W4tel-BiDi/Marlin that referenced this pull request Apr 5, 2021
thinkyhead pushed a commit to thinkyhead/Marlin that referenced this pull request Apr 29, 2021
thinkyhead pushed a commit that referenced this pull request Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants