Skip to content

Commit

Permalink
TMC2209 SPI connection set
Browse files Browse the repository at this point in the history
  • Loading branch information
petrzmax committed Jan 21, 2020
1 parent 38413dc commit f8f4be8
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 19 deletions.
8 changes: 4 additions & 4 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -678,14 +678,14 @@
* TMC5130, TMC5130_STANDALONE, TMC5160, TMC5160_STANDALONE
* :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'L6474', 'POWERSTEP01', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
*/
#define X_DRIVER_TYPE TMC2209_STANDALONE
#define Y_DRIVER_TYPE TMC2209_STANDALONE
#define Z_DRIVER_TYPE TMC2209_STANDALONE
#define X_DRIVER_TYPE TMC2209
#define Y_DRIVER_TYPE TMC2209
#define Z_DRIVER_TYPE TMC2209
//#define X2_DRIVER_TYPE A4988
//#define Y2_DRIVER_TYPE A4988
//#define Z2_DRIVER_TYPE A4988
//#define Z3_DRIVER_TYPE A4988
#define E0_DRIVER_TYPE TMC2209_STANDALONE
#define E0_DRIVER_TYPE TMC2209
//#define E1_DRIVER_TYPE A4988
//#define E2_DRIVER_TYPE A4988
//#define E3_DRIVER_TYPE A4988
Expand Down
12 changes: 6 additions & 6 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2035,7 +2035,7 @@
#endif

#if AXIS_IS_TMC(E0)
#define E0_CURRENT 800
#define E0_CURRENT 1000
#define E0_MICROSTEPS 16
#define E0_RSENSE 0.11
#define E0_CHAIN_POS -1
Expand Down Expand Up @@ -2117,14 +2117,14 @@
* on the same serial port, either here or in your board's pins file.
*/
#define X_SLAVE_ADDRESS 0
#define Y_SLAVE_ADDRESS 0
#define Z_SLAVE_ADDRESS 0
#define Y_SLAVE_ADDRESS 1
#define Z_SLAVE_ADDRESS 2
#define X2_SLAVE_ADDRESS 0
#define Y2_SLAVE_ADDRESS 0
#define Z2_SLAVE_ADDRESS 0
#define Z3_SLAVE_ADDRESS 0
#define Z4_SLAVE_ADDRESS 0
#define E0_SLAVE_ADDRESS 0
#define E0_SLAVE_ADDRESS 3
#define E1_SLAVE_ADDRESS 0
#define E2_SLAVE_ADDRESS 0
#define E3_SLAVE_ADDRESS 0
Expand Down Expand Up @@ -2175,7 +2175,7 @@
* M912 - Clear stepper driver overtemperature pre-warn condition flag.
* M122 - Report driver parameters (Requires TMC_DEBUG)
*/
//#define MONITOR_DRIVER_STATUS
#define MONITOR_DRIVER_STATUS

#if ENABLED(MONITOR_DRIVER_STATUS)
#define CURRENT_STEP_DOWN 50 // [mA]
Expand Down Expand Up @@ -2260,7 +2260,7 @@
* Enable M122 debugging command for TMC stepper drivers.
* M122 S0/1 will enable continous reporting.
*/
//#define TMC_DEBUG
#define TMC_DEBUG
/**
* You can set your own advanced settings by filling in predefined functions.
Expand Down
16 changes: 8 additions & 8 deletions Marlin/src/pins/stm32/pins_MKS_ROBIN_NANO.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,31 +131,31 @@
//

#ifndef X_SERIAL_TX_PIN
#define X_SERIAL_TX_PIN PB2 //LED_PIN
#define X_SERIAL_TX_PIN PA6 //E1_STEP_PIN
#endif
#ifndef X_SERIAL_RX_PIN
#define X_SERIAL_RX_PIN PE6 //MAX6675_SS_PIN
#define X_SERIAL_RX_PIN PA1 //E1_DIR_PIN
#endif

#ifndef Y_SERIAL_TX_PIN
#define Y_SERIAL_TX_PIN PB2 //LED_PIN
#define Y_SERIAL_TX_PIN PA6 //E1_STEP_PIN
#endif
#ifndef Y_SERIAL_RX_PIN
#define Y_SERIAL_RX_PIN PE6 //MAX6675_SS_PIN
#define Y_SERIAL_RX_PIN PA1 //E1_DIR_PIN
#endif

#ifndef Z_SERIAL_TX_PIN
#define Z_SERIAL_TX_PIN PB2 //LED_PIN
#define Z_SERIAL_TX_PIN PA6 //E1_STEP_PIN
#endif
#ifndef Z_SERIAL_RX_PIN
#define Z_SERIAL_RX_PIN PE6 //MAX6675_SS_PIN
#define Z_SERIAL_RX_PIN PA1 //E1_DIR_PIN
#endif

#ifndef E0_SERIAL_TX_PIN
#define E0_SERIAL_TX_PIN PB2 //LED_PIN
#define E0_SERIAL_TX_PIN PA6 //E1_STEP_PIN
#endif
#ifndef E0_SERIAL_RX_PIN
#define E0_SERIAL_RX_PIN PE6 //MAX6675_SS_PIN
#define E0_SERIAL_RX_PIN PA1 //E1_DIR_PIN
#endif
#endif

Expand Down
4 changes: 3 additions & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -484,10 +484,12 @@ lib_ignore = Adafruit NeoPixel, SPI
platform = ststm32
board = genericSTM32F103VE
build_flags = !python Marlin/src/HAL/HAL_STM32F1/build_flags.py
${common.build_flags} -std=gnu++14
${common.build_flags} -std=gnu++14 -DHAVE_SW_SERIAL
build_unflags = -std=gnu++11
extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_nano.py
src_filter = ${common.default_src_filter} +<src/HAL/HAL_STM32F1>
lib_deps =
TMCStepper=https://github.com/bigtreetech/TMCStepper
lib_ignore = Adafruit NeoPixel, SPI

#
Expand Down

0 comments on commit f8f4be8

Please sign in to comment.