TMC2130 Working with BTT Octopus Pro

Basic Information:

Printer Model: Custom 3D Printer
MCU / Printerboard: BTT Octopus Pro running latest version of Klipper
klippy.log (2.9 MB)
klippy.log.config0016.cfg (14.1 KB)
klippy.log.shutdown28645.log (136.5 KB)

Need some help getting TMC2130s to work with my BTT Octopus Pro. I’m running Dual-Z stepper motors in a corexy setup. I can confirm that my previous setup worked just fine in UART, TMC2209. But i needed more power to push my Bed up the shift which prompted me to look into these SMDs. I’m using TMC5150s in my X/Y config and it’s working just fine. However my Z returns this error when I try to move it.

Unable to obtain 'spi_transfer_response' response
Unable to write tmc spi 'stepper_z' register CHOPCONF

**With a fresh restart, TMC_DUMP returns **

DUMP_TMC stepper=stepper_z
========== Write-only registers ==========
IHOLD_IRUN: 0008120b ihold=11 irun=18 iholddelay=8
TPWMTHRS: 00000000
TPOWERDOWN: 00000000
COOLCONF: 00000000
========== Queried registers ==========
GCONF: ffffffff i_scale_analog=1(ExtVREF) internal_rsense=1 en_pwm_mode=1 enc_commutation=1 shaft=1(Reverse) diag0_error=1 diag0_otpw=1 diag0_stall=1 diag1_stall=1 diag1_index=1 diag1_onstate=1 diag1_steps_skipped=1 diag0_int_pushpull=1 diag1_pushpull=1 small_hysteresis=1 stop_enable=1 direct_mode=1 test_mode=1
GSTAT: ffffffff reset=1(Reset) drv_err=1(ErrorShutdown!) uv_cp=1(Undervoltage!)
IOIN: ffffffff step=1 dir=1 dcen_cfg4=1 dcin_cfg5=1 drv_enn_cfg6=1 dco=1 version=0xff
TSTEP: ffffffff tstep=1048575
XDIRECT: ffffffff
MSCNT: ffffffff mscnt=1023
MSCURACT: ffffffff cur_a=-1 cur_b=-1
CHOPCONF: ffffffff toff=15 hstrt=7 hend=15 fd3=1 disfdcc=1 rndtf=1 chm=1 tbl=3 vsense=1 vhighfs=1 vhighchm=1 sync=15 mres=15(0usteps) intpol=1 dedge=1 diss2g=1
DRV_STATUS: ffffffff sg_result=1023 fsactive=1 cs_actual=31 stallguard=1 ot=1(OvertempError!) otpw=1(OvertempWarning!) s2ga=1(ShortToGND_A!) s2gb=1(ShortToGND_B!) ola=1(OpenLoad_A!) olb=1(OpenLoad_B!) stst=1
PWM_SCALE: ffffffff pwm_scale=255
LOST_STEPS: ffffffff lost_steps=1048575

Ive gon through a fair share of github issue pages related to a similar issue with other boards, some suggesting cutting pins and I’m trying to avoid that as much as possible.
klippy.log (2.9 MB)
klippy.log.config0019.cfg (14.0 KB)

In your printer.cfg I do not see any TMC2130 config blocks. All I can see are settings for 5160 and 2209

Ahh, uploaded the wrong file. I have updated it now.

[tmc2130 stepper_z]
cs_pin = PC6
spi_bus = spi1
run_current = 0.800
sense_resistor = 0.075
interpolate = False
stealthchop_threshold = 999999
driver_iholddelay = 1
driver_tpowerdown = 4
driver_toff = 3
driver_hend = 0
driver_hstrt = 6

The sense_resistor does not look quite right. Typically 2130s have 0.11 Ohm
The driver_* settings are coming from where? I’d recommend to delete them if you are not sure that they really match your stepper and your application needs.

I’ve been trying different configurations found online but this is the current one below:

[stepper_z]
step_pin: PF11
dir_pin: !PG3
enable_pin: !PG5
rotation_distance: 8
microsteps: 16
endstop_pin: ~PG11
position_endstop: 5.91
position_max: 240
position_min: -10
homing_speed: 40

[tmc2130 stepper_z]
# uart_pin: PC6
cs_pin: PC6
spi_bus: spi1
run_current: .800
sense_resistor: 0.110
interpolate: False
stealthchop_threshold: 999999


[stepper_z1]
step_pin: PG4
dir_pin: !PC1
enable_pin: !PA0
rotation_distance: 8
microsteps: 16

[tmc2130 stepper_z1]
# uart_pin: PC7
cs_pin: PC7
spi_bus: spi1
run_current: .800
sense_resistor: 0.110
interpolate: False
stealthchop_threshold: 999999

The specific stepper is StepperOnline E Series Nema 17 Bipolar 0.9deg 30Ncm(42.48oz.in) 1.5A 42x42x38mm 4 Wires and can be found here

Whatever setup I’ve tried so far throws the same error.

My working setup using UART:

[stepper_z]
step_pin = PF11
dir_pin = !PG3
enable_pin = !PG5
rotation_distance = 8
microsteps = 16
endstop_pin = ~PG11
position_endstop = 5.91
position_max = 240
position_min = -10
homing_speed = 40

[tmc2209 stepper_z]
uart_pin = PC6
run_current = 1.2
sense_resistor = 0.110
interpolate = False
stealthchop_threshold = 0

[stepper_z1]
step_pin = PG4
dir_pin = !PC1
enable_pin = !PA0
rotation_distance = 8
microsteps = 16
full_steps_per_rotation = 200

[tmc2209 stepper_z1]
uart_pin = PC7
run_current = 1.2
interpolate = False
sense_resistor = 0.110
stealthchop_threshold = 0

The jumper settings of your board are set to SPI for the relevant steppers?

Yes.

Should anything be connected to the jumpers found here? If so I’m not quite sure how.

No
Do you have anything connected to EXP2?

Nothing is connected there.

Sorry, no further ideas.
Did you try the 2130s without the 5150s? Or a combination of the 2209s with 2130s?

I have the exact same issue. At this point I’m wondering if it could be a firmware issue?

This is my config

`CONFIG_LOW_LEVEL_OPTIONS=y
CONFIG_MACH_STM32=y
CONFIG_STEP_DELAY=2
CONFIG_BOARD_DIRECTORY=“stm32”
CONFIG_MCU=“stm32f446xx”
CONFIG_CLOCK_FREQ=180000000
CONFIG_USBSERIAL=y
CONFIG_FLASH_START=0x8008000
CONFIG_FLASH_SIZE=0x80000
CONFIG_RAM_START=0x20000000
CONFIG_RAM_SIZE=0x20000
CONFIG_STACK_SIZE=512
CONFIG_STM32_SELECT=y
CONFIG_MACH_STM32F446=y
CONFIG_MACH_STM32F4=y
CONFIG_HAVE_STM32_USBOTG=y
CONFIG_HAVE_STM32_CANBUS=y
CONFIG_STM32_FLASH_START_8000=y
CONFIG_STM32_CLOCK_REF_12M=y
CONFIG_CLOCK_REF_FREQ=12000000
CONFIG_STM32F0_TRIM=16
CONFIG_STM32_USB_PA11_PA12=y
CONFIG_CANBUS_FREQUENCY=500000
CONFIG_USB_VENDOR_ID=0x1d50
CONFIG_USB_DEVICE_ID=0x614e
CONFIG_USB_SERIAL_NUMBER=“btt-octopus-pro-446”

CONFIG_INITIAL_PINS=“”
CONFIG_HAVE_GPIO=y
CONFIG_HAVE_GPIO_ADC=y
CONFIG_HAVE_GPIO_SPI=y
CONFIG_HAVE_GPIO_I2C=y
CONFIG_HAVE_GPIO_BITBANGING=y
CONFIG_HAVE_STRICT_TIMING=y
CONFIG_HAVE_CHIPID=y
CONFIG_INLINE_STEPPER_HACK=y
`

I’d not be aware that there are any limitations especially targeted at TMC2130.

Since these drivers are quite old, you need to carefully check if the driver modules have been built for SPI control.
A lot of these modules have been configured for the so called “stand alone” mode and only allow to set Vref via a potentiometer but not to control current or other settings via SPI