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

feat: add TMC5160 driver to X/Y #289

Merged
merged 3 commits into from
Sep 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions config/hardware/axis/X/TMC/TMC5160.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# X TMC5160 definition

[gcode_macro _USER_VARIABLES]
variable_x_driver: "tmc5160"
gcode:

[tmc5160 stepper_x]
cs_pin: X_TMCUART
spi_software_sclk_pin: DRIVER_SPI_SCK
spi_software_mosi_pin: DRIVER_SPI_MOSI
spi_software_miso_pin: DRIVER_SPI_MISO
interpolate: True
run_current: 0.8
sense_resistor: 0.110
stealthchop_threshold: 0
15 changes: 15 additions & 0 deletions config/hardware/axis/Y/TMC/TMC5160.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Y TMC5160 definition

[gcode_macro _USER_VARIABLES]
variable_y_driver: "tmc5160"
gcode:

[tmc5160 stepper_y]
cs_pin: Y_TMCUART
spi_software_sclk_pin: DRIVER_SPI_SCK
spi_software_mosi_pin: DRIVER_SPI_MOSI
spi_software_miso_pin: DRIVER_SPI_MISO
interpolate: True
run_current: 0.8
sense_resistor: 0.110
stealthchop_threshold: 0
4 changes: 3 additions & 1 deletion config/mcu_definitions/main/BTT_Octopus_Max.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ aliases:
MCU_NEOPIXEL2=PE9 ,
MCU_PS_ON=PF13 ,
MCU_POWER_DET=PF12 ,
MCU_FWS0=PC0 , MCU_FWS1=PF10 ,
MCU_FWS0=PC0 , MCU_FWS1=PF10 ,

MCU_SPI4_MOSI=PE14 , MCU_SPI4_MISO=PE13 , MCU_SPI4_SCK=PE12 ,

# EXP1 header
EXP1_1=PG2 , EXP1_2=PD15 ,
Expand Down
2 changes: 2 additions & 0 deletions user_templates/mcu.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@
# [include config/hardware/axis/X/TMC/TMC2209.cfg]
# [include config/hardware/axis/X/TMC/TMC2209_V0specific.cfg] # Should only be used for early LDO V0 kits to mitigate the known VFAs issue
# [include config/hardware/axis/X/TMC/TMC2240.cfg]
# [include config/hardware/axis/X/TMC/TMC5160.cfg]
### 2. Y Drivers -------------------------------------------------------------------------
# [include config/hardware/axis/Y/TMC/TMC2209.cfg]
# [include config/hardware/axis/Y/TMC/TMC2209_V0specific.cfg] # Should only be used for early LDO V0 kits to mitigate the known VFAs issue
# [include config/hardware/axis/Y/TMC/TMC2240.cfg]
# [include config/hardware/axis/Y/TMC/TMC5160.cfg]
### 3. Z Drivers -------------------------------------------------------------------------
# [include config/hardware/axis/Z/TMC/TMC2209_1-Motor.cfg]
# [include config/hardware/axis/Z/TMC/TMC2209_3-Motors.cfg]
Expand Down
4 changes: 4 additions & 0 deletions user_templates/mcu_defaults/main/BTT_Octopus_Max.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ aliases:

E_STEP=MCU_MOTOR6_STEP , E_DIR=MCU_MOTOR6_DIR , E_ENABLE=MCU_MOTOR6_ENABLE , E_TMCUART=MCU_MOTOR6_UART ,

DRIVER_SPI_MOSI=MCU_SPI4_MOSI , # Used in case of SPI drivers such as TMC2240 or TMC5160
DRIVER_SPI_MISO=MCU_SPI4_MISO , # Used in case of SPI drivers such as TMC2240 or TMC5160
DRIVER_SPI_SCK=MCU_SPI4_SCK , # Used in case of SPI drivers such as TMC2240 or TMC5160

X_STOP=MCU_STOP0 , Y_STOP=MCU_STOP1 , Z_STOP=MCU_STOP2 ,
PROBE_INPUT=MCU_STOP7 ,
RUNOUT_SENSOR=MCU_FWS0 ,
Expand Down