TMC2208 won't disable

Hi.
I bought a SKR v1.4 Turbo with 5 TMC2208’s UART mode and have been trying to get it going with dual motors and dual endstops.
I think I have gotten most things going, even though Y2 is going faster than Y for some reason…

Anyway, that is a question for later.
The issue I have is that one of the stepper drivers don’t respond to an M84.
If I do an M122 I can see in the printout that a particular stepper is constantly enabled. I can’t physically turn it either, so it really is enabled.

If I move the stepper driver to another position on the board the issue follows, so I don’t really think this is a software issue?
Did I get a borked stepper driver? It seems to work fine in general use.

Sounds like a broken stepper driver. Or maybe one of the config solder joints is broken.

Is this one of your Y steppers drivers?

It doesn’t matter where I put it on the board, whether it’s a X or Y. It still performs the same, not being able to disable.
I checked it under a microscope and couldn’t see any bad solders, and the UART jumper is in the correct position.
Might try and resolder it just in case.

Thanks Jeff.

I was wondering if it also explains your Y2 moving too far.

Ah, good question. I can’t check it right now, but I will do tonight and come back with an answer.
I contacted the seller anyway and requested a replacement. Not easy to find the drivers outside 5-packs… :-/

Just checked this and it has nothing to do with the faulty driver.
It is the one stepper connected to the rightmost driver (E1M).
Can’t say why it goes so much faster, I would say twice the speed.

Do I need to add to the #define DEFAULT_AXIS_STEPS_PER_UNIT { 100, 100, 400, 100 } when I use dual steppers? As in {100, 100, 400, 100, 100} instead?

No, but there are configuration options for TMC driver’s and their microstepping settings. I believe they are separate for X2 and Y2, so you may have a mistake there. Does the TMC_DEBUG show the microstepping settings?

This is the setting I’m referring to:

It needs to be the same as the Y.

I thought you actually had it there Jeff, but all the settings are identical.

Something is odd though, because M122 only shows the four first drivers. X, Y, Z & E:

X	Y	Z	E
Enabled		false	false	false	false
Set current	800	800	800	800
RMS current	795	795	795	795
MAX current	1121	1121	1121	1121
Run current	25/31	25/31	25/31	25/31
Hold current	12/31	12/31	12/31	12/31
CS actual	12/31	12/31	12/31	12/31
PWM scale	14	14	14	14
vsense		1=.18	1=.18	1=.18	1=.18
stealthChop	true	true	true	true
msteps		16	16	16	16
tstep		max	max	max	max
PWM thresh.
[mm/s]
OT prewarn	false	false	false	false
triggered
 OTP		false	false	false	false
off time	3	3	3	3
blank time	24	24	24	24
hysteresis
 -end		-1	-1	-1	-1
 -start		1	1	1	1
Stallguard thrs
DRVSTATUS	X	Y	Z	E

The fifth one is definately enabled, since it runs in tandem with Y, just faster.

Sorry for the incoming code wall…

In configuration.h I have these steppers enabled:
#define X_DRIVER_TYPE TMC2208
#define Y_DRIVER_TYPE TMC2208
#define Z_DRIVER_TYPE TMC2208
#define E0_DRIVER_TYPE TMC2208
#define E1_DRIVER_TYPE TMC2208

Dual Steppers and dual endstops are enabled in config_adv.h:
#define X_DUAL_STEPPER_DRIVERS
#if ENABLED(X_DUAL_STEPPER_DRIVERS)
#define INVERT_X2_VS_X_DIR true // Set ‘true’ if X motors should rotate in opposite directions
#define X_DUAL_ENDSTOPS
#if ENABLED(X_DUAL_ENDSTOPS)
#define X2_USE_ENDSTOP XMAX
#define X2_ENDSTOP_ADJUSTMENT 0
#endif
#endif

#define Y_DUAL_STEPPER_DRIVERS
#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
#define INVERT_Y2_VS_Y_DIR true // Set ‘true’ if Y motors should rotate in opposite directions
#define Y_DUAL_ENDSTOPS
#if ENABLED(Y_DUAL_ENDSTOPS)
#define Y2_USE_ENDSTOP YMAX
#define Y2_ENDSTOP_ADJUSTMENT 0
#endif
#endif

And finally I have these pin settings in pins_BTT_SKR_V1_4.h:

//
// Steppers
//
#define X_STEP_PIN P2_02
#define X_DIR_PIN P2_06
#define X_ENABLE_PIN P2_01
#ifndef X_CS_PIN
#define X_CS_PIN P1_10
#endif

#define Y_STEP_PIN P0_19
#define Y_DIR_PIN P0_20
#define Y_ENABLE_PIN P2_08
#ifndef Y_CS_PIN
#define Y_CS_PIN P1_09
#endif

#define Z_STEP_PIN P0_22
#define Z_DIR_PIN P2_11
#define Z_ENABLE_PIN P0_21
#ifndef Z_CS_PIN
#define Z_CS_PIN P1_08
#endif

#define E0_STEP_PIN P2_05
#define E0_DIR_PIN P2_05
#define E0_ENABLE_PIN P2_05
#ifndef E0_CS_PIN
#define E0_CS_PIN P2_05
#endif

#define E1_STEP_PIN P2_13
#define E1_DIR_PIN P0_11
#define E1_ENABLE_PIN P2_12
#ifndef E1_CS_PIN
#define E1_CS_PIN P1_04
#endif

#define E2_STEP_PIN P1_15
#define E2_DIR_PIN P1_14
#define E2_ENABLE_PIN P1_16
#ifndef E2_CS_PIN
#define E2_CS_PIN P1_01
#endif

Can you off the top of your head see anything wrong here?

Hmmm. I happen to be logged into my machine, and it shows Y2 and Z2 (I have a low rider, in a rotated configuration) in the TMC_DEBUG output.

Actually, instead of E0_DRIVER_TYPE TMC2208 and E1, those should be X2_DRIVER_TYPE and Y2.

Yeah I have tried that before also, but then I get a compile error stating:
Marlin\src\module\stepper…/…/inc/…/pins/pins.h:1245:21: error: ‘E2_SERIAL_RX_PIN’ was not declared in this scope; did you mean ‘X2_SERIAL_RX_PIN’?

It sounds like it should be the right thing though, I just don’t understand the code in pins.h.

Any clues? Thanks again. :slight_smile:

Have you tried leaving the pins alone and setting EXTRUDERS=0?

This is my (pretty old) skr 1.3 2209 firmware. Maybe it is a decent reference:

You mean not shuffling the extruder pins around?
I thought I had to do that in order to utilize the endstops?

I tried earlier to set Extruders=0, but that gave me a sanity check error where it told me that XMAX was not mapped or something like that.
I then checked against Teaching Techs skr firmware and noticed that he had extruders=1, which got it working to the degree it is now.

But I will check your code and diff it against mine.
I will also try and fiddle with the extruders and pins.

A new driver is on its way also. So that’s nice. :slight_smile:

Oh, another thing. If I check the status of the endstops with M119, they all get reported as Xmin, Ymin, X2min, Y2min.
Is this ok? I would have thought that X2 and Y2 should me _max?
They work hardware wise, as in I can trigger them. But will the software understand that it has hit the correct endstops?

/Johan

That sounds right to me.

You can either shuffle the pins and create a dummy E2. Leaving E0. Or you can use EXTRUDERS=0. Not both. I’m not sure what that has to do with xmax. I’d need to see the exact error. But also, it is working in my branch, so I’m sure you can figure it out.

Z2 is handled differently than Y2. In configuration.h set -

#define Z2_DRIVER_TYPE TMC2208

in configuration_adv change -

#define E2_STEP_PIN P1_15
#define E2_DIR_PIN P1_14
#define E2_ENABLE_PIN P1_16
#ifndef E2_CS_PIN
#define E2_CS_PIN P1_01
#endif

to

#define Z2_STEP_PIN P1_15
#define Z2_DIR_PIN P1_14
#define Z2_ENABLE_PIN P1_16
#ifndef Z2_CS_PIN
#define Z2_CS_PIN P1_01
#endif

and try it again

Well I’ll be damned. Jeff you are a genius. :slight_smile:
It’s actually working!

All motors are running at correct speed, they all get reported correctly when doing a M122 and all the endstops seems to be working.

I looked through your config files and did like you said; Extruders to 0 and set the E0/E1 pins to the real ones, without a dummy.

The faulty driver is still not disabling, and I noticed that it ignores the setting in config to go the other way.
But I can live with that until a new driver arrives. I’ll probably move it to Z for now and just turn the connector to make it go the right way.

Thanks so much for your help Jeff! I can’t wait to have the machine up and running again!

1 Like

Thanks Mike.
I’m using this for a MPCNC, so a Z2 won’t be used.