MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.3k stars 19.25k forks source link

[BUG] TMC homing current stays while printing #16284

Closed Lyr3x closed 4 years ago

Lyr3x commented 4 years ago

Bug Description

I've set a specific homing current for my TMC5160 to make the sensorless homing working more reliable. However the set homing current is still used when starting the print, which may cause issues due to the lower current.

My Configurations

Board: SKR Pro 1.1 Marlin: bugfix-2.0 Driver: TMC5160

 #if AXIS_IS_TMC(X)
    #define X_CURRENT       950        // (mA) RMS current. Multiply by 1.414 for peak current.
    #define X_CURRENT_HOME  500  // (mA) RMS current for sensorless homing
    #define X_MICROSTEPS     16    // 0..256
    #define X_RSENSE          0.075
    #define X_CHAIN_POS      -1    // <=0 : Not chained. 1 : MCU MOSI connected. 2 : Next in chain, ...
  #endif

Configuration.zip

Steps to Reproduce

  1. Set homing current to e.g. 500mA for X and Y and X/Y_current to 950mA
  2. Start a print
  3. Check motor currents when the print started

Expected behavior: Motor current is at 500mA while homing and at 950mA as soon as the homing is done

Actual behavior: Motor current stays at 500mA

I checked the according code pieces and couldn't find any issue by myself. Maybe it is just a configuration issue or something else. The G28 current change and restore looks good to me.

boelle commented 4 years ago

@Lyr3x is this still a problem?

Lyr3x commented 4 years ago

I'll update to the latest state tonight and will report then.

Lyr3x commented 4 years ago

Seems to be working fine again.

github-actions[bot] commented 4 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.