Skip to content

Commit f8f4be8

Browse files
committed
TMC2209 SPI connection set
1 parent 38413dc commit f8f4be8

File tree

4 files changed

+21
-19
lines changed

4 files changed

+21
-19
lines changed

Marlin/Configuration.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -678,14 +678,14 @@
678678
* TMC5130, TMC5130_STANDALONE, TMC5160, TMC5160_STANDALONE
679679
* :['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']
680680
*/
681-
#define X_DRIVER_TYPE TMC2209_STANDALONE
682-
#define Y_DRIVER_TYPE TMC2209_STANDALONE
683-
#define Z_DRIVER_TYPE TMC2209_STANDALONE
681+
#define X_DRIVER_TYPE TMC2209
682+
#define Y_DRIVER_TYPE TMC2209
683+
#define Z_DRIVER_TYPE TMC2209
684684
//#define X2_DRIVER_TYPE A4988
685685
//#define Y2_DRIVER_TYPE A4988
686686
//#define Z2_DRIVER_TYPE A4988
687687
//#define Z3_DRIVER_TYPE A4988
688-
#define E0_DRIVER_TYPE TMC2209_STANDALONE
688+
#define E0_DRIVER_TYPE TMC2209
689689
//#define E1_DRIVER_TYPE A4988
690690
//#define E2_DRIVER_TYPE A4988
691691
//#define E3_DRIVER_TYPE A4988

Marlin/Configuration_adv.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -2035,7 +2035,7 @@
20352035
#endif
20362036

20372037
#if AXIS_IS_TMC(E0)
2038-
#define E0_CURRENT 800
2038+
#define E0_CURRENT 1000
20392039
#define E0_MICROSTEPS 16
20402040
#define E0_RSENSE 0.11
20412041
#define E0_CHAIN_POS -1
@@ -2117,14 +2117,14 @@
21172117
* on the same serial port, either here or in your board's pins file.
21182118
*/
21192119
#define X_SLAVE_ADDRESS 0
2120-
#define Y_SLAVE_ADDRESS 0
2121-
#define Z_SLAVE_ADDRESS 0
2120+
#define Y_SLAVE_ADDRESS 1
2121+
#define Z_SLAVE_ADDRESS 2
21222122
#define X2_SLAVE_ADDRESS 0
21232123
#define Y2_SLAVE_ADDRESS 0
21242124
#define Z2_SLAVE_ADDRESS 0
21252125
#define Z3_SLAVE_ADDRESS 0
21262126
#define Z4_SLAVE_ADDRESS 0
2127-
#define E0_SLAVE_ADDRESS 0
2127+
#define E0_SLAVE_ADDRESS 3
21282128
#define E1_SLAVE_ADDRESS 0
21292129
#define E2_SLAVE_ADDRESS 0
21302130
#define E3_SLAVE_ADDRESS 0
@@ -2175,7 +2175,7 @@
21752175
* M912 - Clear stepper driver overtemperature pre-warn condition flag.
21762176
* M122 - Report driver parameters (Requires TMC_DEBUG)
21772177
*/
2178-
//#define MONITOR_DRIVER_STATUS
2178+
#define MONITOR_DRIVER_STATUS
21792179

21802180
#if ENABLED(MONITOR_DRIVER_STATUS)
21812181
#define CURRENT_STEP_DOWN 50 // [mA]
@@ -2260,7 +2260,7 @@
22602260
* Enable M122 debugging command for TMC stepper drivers.
22612261
* M122 S0/1 will enable continous reporting.
22622262
*/
2263-
//#define TMC_DEBUG
2263+
#define TMC_DEBUG
22642264

22652265
/**
22662266
* You can set your own advanced settings by filling in predefined functions.

Marlin/src/pins/stm32/pins_MKS_ROBIN_NANO.h

+8-8
Original file line numberDiff line numberDiff line change
@@ -131,31 +131,31 @@
131131
//
132132

133133
#ifndef X_SERIAL_TX_PIN
134-
#define X_SERIAL_TX_PIN PB2 //LED_PIN
134+
#define X_SERIAL_TX_PIN PA6 //E1_STEP_PIN
135135
#endif
136136
#ifndef X_SERIAL_RX_PIN
137-
#define X_SERIAL_RX_PIN PE6 //MAX6675_SS_PIN
137+
#define X_SERIAL_RX_PIN PA1 //E1_DIR_PIN
138138
#endif
139139

140140
#ifndef Y_SERIAL_TX_PIN
141-
#define Y_SERIAL_TX_PIN PB2 //LED_PIN
141+
#define Y_SERIAL_TX_PIN PA6 //E1_STEP_PIN
142142
#endif
143143
#ifndef Y_SERIAL_RX_PIN
144-
#define Y_SERIAL_RX_PIN PE6 //MAX6675_SS_PIN
144+
#define Y_SERIAL_RX_PIN PA1 //E1_DIR_PIN
145145
#endif
146146

147147
#ifndef Z_SERIAL_TX_PIN
148-
#define Z_SERIAL_TX_PIN PB2 //LED_PIN
148+
#define Z_SERIAL_TX_PIN PA6 //E1_STEP_PIN
149149
#endif
150150
#ifndef Z_SERIAL_RX_PIN
151-
#define Z_SERIAL_RX_PIN PE6 //MAX6675_SS_PIN
151+
#define Z_SERIAL_RX_PIN PA1 //E1_DIR_PIN
152152
#endif
153153

154154
#ifndef E0_SERIAL_TX_PIN
155-
#define E0_SERIAL_TX_PIN PB2 //LED_PIN
155+
#define E0_SERIAL_TX_PIN PA6 //E1_STEP_PIN
156156
#endif
157157
#ifndef E0_SERIAL_RX_PIN
158-
#define E0_SERIAL_RX_PIN PE6 //MAX6675_SS_PIN
158+
#define E0_SERIAL_RX_PIN PA1 //E1_DIR_PIN
159159
#endif
160160
#endif
161161

platformio.ini

+3-1
Original file line numberDiff line numberDiff line change
@@ -484,10 +484,12 @@ lib_ignore = Adafruit NeoPixel, SPI
484484
platform = ststm32
485485
board = genericSTM32F103VE
486486
build_flags = !python Marlin/src/HAL/HAL_STM32F1/build_flags.py
487-
${common.build_flags} -std=gnu++14
487+
${common.build_flags} -std=gnu++14 -DHAVE_SW_SERIAL
488488
build_unflags = -std=gnu++11
489489
extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_nano.py
490490
src_filter = ${common.default_src_filter} +<src/HAL/HAL_STM32F1>
491+
lib_deps =
492+
TMCStepper=https://github.com/bigtreetech/TMCStepper
491493
lib_ignore = Adafruit NeoPixel, SPI
492494

493495
#

0 commit comments

Comments
 (0)