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

Klipper gives "Unable to write tmc spi 'stepper_x' register GLOBALSCALER" error for TMC 5160 driver #43

Open
alphanci opened this issue Mar 1, 2023 · 0 comments

Comments

@alphanci
Copy link

alphanci commented Mar 1, 2023

I am using Klipper firmware for Fysetc S6(version 2.1) board. I installed Fysetc S5160(version 1.2) driver to X and Y driver sockets. I am getting "Unable to write tmc spi 'stepper_x' register GLOBALSCALER" error in both slots. 4 jumpers are installed on bottom positions as described in the README. TMC 2209 drivers work in these sockets with UART configuration. I tried 4 different 5160 drivers so this shouldn't be a faulty driver issue.

Klipper docs say that this error might be the result of shared SPI bus:

Note that if the driver is on a shared SPI bus with multiple devices then be sure to fully configure every device on that shared SPI bus in Klipper. If a device on a shared SPI bus is not configured, then it may incorrectly respond to commands not intended for it and corrupt the communication to the intended device. If there is a device on a shared SPI bus that can not be configured in Klipper, then use a static_digital_output config section to set the CS pin of the unused device high (so that it will not attempt to use the SPI bus). The board's schematic is often a useful reference for finding which devices are on an SPI bus and their associated pins.

I looked at the schematic but I couldn't find out if the SPI bus is shared. Sample config file for F6 has a static_digital_output section but sample config file for S6 doesn't have it so I am not sure.

My printer config file:

[mcu]
serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_32005B000F51303530323539-if00
restart_method: command

#[mcu]
#serial: /dev/ttyAMA0
#restart_method: command

[force_move]
enable_force_move: True

[printer]
kinematics: corexy
max_velocity: 300
max_accel: 3000
max_z_velocity: 25
max_z_accel: 30

[stepper_x]
step_pin: PE11
dir_pin: PE10
enable_pin: !PE9
microsteps: 16
rotation_distance: 40
endstop_pin: ^PA2
position_endstop: 0
position_max: 200
#homing_speed: 50

[tmc5160 stepper_x]
spi_bus: spi1
cs_pin: PE7
run_current: 0.8

[stepper_y]
step_pin: PD8
dir_pin: PB12
enable_pin: !PD9
microsteps: 16
rotation_distance: 40
endstop_pin: ^PA3
position_endstop: 0
position_max: 200
homing_speed: 50

[tmc5160 stepper_y]
spi_bus: spi1
cs_pin: PE15
run_current: 0.8

[stepper_z]
step_pin: PD14
dir_pin: PD13
enable_pin: !PD15
microsteps: 16
rotation_distance: 8
endstop_pin: ^PA0
position_endstop: 0.5
position_max: 200

[tmc2209 stepper_z]
uart_pin: PD12
run_current: 0.8
interpolate: False

[manual_stepper ex0]
step_pin: PD5
dir_pin: PD6
enable_pin: !PD4
rotation_distance: 5
microsteps: 8

[tmc2209 manual_stepper ex0]
uart_pin: PA15
run_current: 0.8
interpolate: False

[manual_stepper ex1]
step_pin: PE6
dir_pin: PC13
enable_pin: !PE5
rotation_distance: 5
microsteps: 8

[tmc2209 manual_stepper ex1]
uart_pin: PC5
run_current: 0.8
interpolate: False

[manual_stepper tool_lock_stepper]
step_pin: PE2
dir_pin: PE4
enable_pin: !PE3
endstop_pin: ^PA1
rotation_distance: 5
microsteps: 8

[tmc2209 manual_stepper tool_lock_stepper]
uart_pin: PE0
run_current: 0.8
interpolate: False

#[tmc2209 stepper_z]
#uart_pin: PD10
#run_current: 0.8
#interpolate: False

#[extruder]
#step_pin: PE2
#dir_pin: PE4
#enable_pin: !PE3
#microsteps: 16
#rotation_distance: 33.500
#nozzle_diameter: 0.400
#filament_diameter: 1.750
#heater_pin: PB15
#sensor_type: PT1000
#sensor_pin: PC0
#pullup_resistor: 4700
#control: pid
#pid_Kp: 22.2
#pid_Ki: 1.08
#pid_Kd: 114
#min_temp: 0
#max_temp: 500

#[heater_bed]
#heater_pin: PC8
#sensor_type: EPCOS 100K B57560G104F
#sensor_pin: PC3
#control: watermark
#min_temp: 0
#max_temp: 130

#[fan]
#pin: PB0
#hardware_pwm: True
#cycle_time: 0.00004

#[force_move]
#enable_force_move: True

[virtual_sdcard]
path: ~/gcode_files

[display_status]
[pause_resume]

[gcode_macro CANCEL_PRINT]
description: Cancel the actual running print
rename_existing: CANCEL_PRINT_BASE
gcode:
  TURN_OFF_HEATERS
  CANCEL_PRINT_BASE


My log file:
klippy.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant