bigtreetech / BIGTREETECH-GTR-V1.0

BIGTREETECH GTR V1.0 motherboard is a high-performance 3D printer main control board with the core controller STM32F407IGT6, which was launched by the 3D printing team of ShenZhen BigTree Technology CO.,LTD ., aiming at solving some problems existing in the motherboard market. The BIGTREETECH GTR V1.0 is the motherboard, and the BIGTREETECH M5 V1.0 is the expansion board.
90 stars 55 forks source link

TMC5160v1.2 not working #10

Closed klucky closed 4 years ago

klucky commented 4 years ago

Hello! i tried the TMC5160v1.2 with the following options:

Configuration.h:

define X_DRIVER_TYPE TMC5160

define Y_DRIVER_TYPE TMC5160

define Z_DRIVER_TYPE TMC5160

define E0_DRIVER_TYPE TMC5160

Configuration_adv.h:

define TMC_USE_SW_SPI

define TMC_DEBUG

if HAS_TRINAMIC

define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current

define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256

if AXIS_IS_TMC(X)

#define X_CURRENT       760        // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_CURRENT_HOME  X_CURRENT  // (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

if AXIS_IS_TMC(Y)

#define Y_CURRENT       760
#define Y_CURRENT_HOME  Y_CURRENT
#define Y_MICROSTEPS     16
#define Y_RSENSE          0.075
#define Y_CHAIN_POS      -1

endif

if AXIS_IS_TMC(Y2)

#define Y2_CURRENT      760
#define Y2_CURRENT_HOME Y2_CURRENT
#define Y2_MICROSTEPS    16
#define Y2_RSENSE         0.075
#define Y2_CHAIN_POS     -1

endif

if AXIS_IS_TMC(Z)

#define Z_CURRENT       760
#define Z_CURRENT_HOME  Z_CURRENT
#define Z_MICROSTEPS     16
#define Z_RSENSE          0.075
#define Z_CHAIN_POS      -1

endif

if AXIS_IS_TMC(Z3)

#define Z3_CURRENT      760
#define Z3_CURRENT_HOME Z3_CURRENT
#define Z3_MICROSTEPS    16
#define Z3_RSENSE         0.075
#define Z3_CHAIN_POS     -1

endif

if AXIS_IS_TMC(E0)

#define E0_CURRENT      760
#define E0_MICROSTEPS    16
#define E0_RSENSE         0.075
#define E0_CHAIN_POS     -1

endif

define STEALTHCHOP_XY

define STEALTHCHOP_Z

define STEALTHCHOP_E

define CHOPPER_TIMING CHOPPER_DEFAULT_24V

define MONITOR_DRIVER_STATUS

if ENABLED(MONITOR_DRIVER_STATUS)

#define CURRENT_STEP_DOWN     50  // [mA]
#define REPORT_CURRENT_CHANGE
#define STOP_ON_ERROR

endif

define HYBRID_THRESHOLD

But i only get this result:

Connecting... Printer is now online.

m122 SENDING:M122 X Y Z E E1 Enabled false false false false false Set current 800 800 800 800 800 RMS current 1436 1436 1436 1436 1436 MAX current 2025 2025 2025 2025 2025 Run current 25/31 25/31 25/31 25/31 25/31 Hold current 12/31 12/31 12/31 12/31 12/31 CS actual 0/31 0/31 0/31 0/31 0/31 PWM scale 0 0 0 0 0 vsense 0=.325 0=.325 0=.325 0=.325 0=.325 stealthChop false false false false false msteps 256 256 256 256 256 tstep 0 0 0 0 0 pwm threshold [mm/s] OT prewarn false false false false false OT prewarn has been triggered false false false false false off time 0 0 0 0 0 blank time 16 16 16 16 16 hysteresis -end -3 -3 -3 -3 -3 -start 1 1 1 1 1 Stallguard thrs DRVSTATUS X Y Z E E1 stst olb ola s2gb s2ga otpw ot 157C 150C 143C 120C s2vsa s2vsb Driver registers: X 0x00:00:00:00 Bad response! Y 0x00:00:00:00 Bad response! Z 0x00:00:00:00 Bad response! E 0x00:00:00:00 Bad response! E1 0x00:00:00:00 Bad response! Testing X connection... Error: All LOW Testing Y connection... Error: All LOW Testing Z connection... Error: All LOW Testing E connection... Error: All LOW Testing E1 connection... Error: All LOW

[ERROR] Can't read from printer (disconnected?) (SerialException): call to ClearCommError failed [ERROR] Can't write to printer (disconnected?) (SerialException): WriteFile failed (WindowsError(22, 'Das Ger\xe4t erkennt den Befehl nicht.'))

Is it still nessesary to cut the clk pin (like its mentioned here: https://github.com/bigtreetech/BIGTREETECH-TMC5160-V1.0/issues/2) on a new designed board with a new version of the driver?

klucky commented 4 years ago

I solved it myself. It's not nessesary to remove the clk pin but it works without the pin too. But its nessesary to remove this lines in the configuration.h:

define PSU_CONTROL

define PSU_NAME "Power Supply"