How to set up the TMC2209 drivers

Version 2.10 of the firmware adds two new boards to the collection of viable controller boards for the SMuFF:

This move was necessary to overcome the lack of SKR mini V1.1 boards on the market and also enables the SMuFF to utilize Trinamic TMC2209 stepper drivers and their very specific features.

On the SKR mini E3 V1.2 (or even V2.0) you don't have to care about the wiring at all, since those stepper drivers are being soldered onto the controller board and have already been wired up correctly for UART mode.

In contrast to this, on the SKR mini E3-DIP V1.1 you still have the option to use any A4988 compatible stepper drivers but also the TMC2209 served in UART mode. To do so, you need to configure the SKR mini E3-DIP mode by setting the jumpers of the stepper driver socket first.

For the A4988 compatible stepper drivers, you'll use the MS1 / MS2 / MS3 jumper pins as usual, and configure them according to the type of driver you have.


For the TMC2209 in UART mode you have to jumper MS3 as shown in the picture below:


Please notice, that this configuration highly depends on the brand of your TMC2209 stepper driver and it's best to refer to the vendors website of your stepper driver for more information on that topic.

As the configuration above might be feasible for the Bigtreetech TMC2209 stepper drivers (just guessing, haven't tested it), it doesn't work right away with the Silentstepstick because of the different pin assignment.

You have either the option to wire your Silentstepstick or you do it the unconventional way and plug the jumper at a 45 degree angle, so that the TX/RX signal from the MCU goes to the according pin (UART) on the Silentstepstick, as shown in the picture on the left.

Please keep in mind: If you're going to use TMC2209 drivers, you don't necessarily need all drivers to be TMC2209. You can easily mix them up as needed. In the future development, the Selector (X-Axis) will use the Stall Detection feature, so it's ok just to equip this slot with a TMC2209.

Next, you have to configure the TMC2209 to be used in UART mode in the SMuFFs settings.

Go into the settings under Stepper/Servo -> Selector -> TMC Settings and set Mode to UART. Be aware, that although this setting offers you SPI, this mode is not supported by the TMC2209 driver.
Also set up the other parameters for your driver, such as Power and Microstepping. One important setting is the Stealth Mode value. StealthChop (for StallGuard) is going to be activated only if this is set to Yes. Otherwise, the stepper driver will be set for SpreadCycle mode.
Another important setting is the R-Sense value, which influences the Power setting directly. This value usually is supplied by your stepper driver manufacturer. On the Silentstepstick it's 0.11 and must not be changed. More about theses settings and their meanings can be found here.

Save your settings and reset the SMuFF.


After reset, go into the Status Info of the Main Menu and pick the TMC Driver X/Y/Z option according to which axis is being driven by the TMC2209.

This screen will tell you some of the values sent by TMC driver. It's important that Ph. A/B are neither open nor short (to GND). If that's the case, check your stepper motor wiring.

Configuration for stall detection / handling

To use the new stall detection / handling feature, you have to configure your SMuFF accordingly (beside the configuration mentioned above).
As mentioned before, the major switch to use this feature is the Stealth Mode parameter of the axis in charge. As long as this parameter is set to No, the stepper driver will be used in SpreadCycle mode and behave just like a regular stepper driver and thus no stall detection or handling will take place. A Yes puts the TMC2209 stepper driver into StealthChop mode, which is where the magic happens.

To get the best results you have to configure a few other parameters as well. So far, I've figured the following values to work best for this purpose:

  • Power - set this value to 1400 (about twice as high as the value you're using for SpreadCycle mode)

  • Stall - set this value to 50

  • MaxSpeed - set this value not faster than 250 mm/s on the Selector; not faster than 20 mm/s on the Feeder

  • Acceleration - set this value not faster than 15 mm/s (Selector); not faster than 3 mm/s on the Feeder

  • InsertSpeed - set this value not faster than 7 mm/s (Feeder only)

  • StopOnStall - set this to true (enables the stall handling in firmware)

  • MaxStallCount - set this value to 10.

The MaxStallCount value is a threshold value. Every stall signal which arrives from the stepper driver gets counted (for the current movement) and if it exceeds the threshold, the stall handling will take place in case StopOnStall is being set.
This threshold setting is necessary because accelerating or moving the axis can already trigger a stall signal on the driver but not every of theses signals mean the stepper motor is in trouble. Using a threshold makes the whole thing more reliable / fail save.

If you're not happy with these settings on your SMuFF, try modding these values - either from the menus or the GCode interface - one by one, until you've found the configuration that works best for you.

In order to receive stall signals from the stepper driver, you have to wire up a physical connection between the diag (diag0) pin of the stepper driver and the controller board (using a Dupont wire or similar). On the controller board (SKR mini E3/E3-DIP) two input pins have been predefined in the firmware (see Pins.h):

  • SWDIO Pin - for the X-Axis (Pin 2)

  • SWCLK Pin - for the Z-Axis (Pin 4)

Both pins can be located on the SWD / ICSP header of the controller board (which also means the debugging via ST-Link is disabled).

Stall handling

Stall handling on the Selector triggers on movements as a tool change is being processed (either through Tx or G0 GCode command). As soon as a stall is triggered by the firmware (according to the conditions described above), the SMuFF will do the following:

  • Stop the current movement

  • Nudge the filament back a couple of millimetres (value defined by the InsertLength setting of the configuration)

  • Home the Selector slowly

  • Reposition the Selector on the tool initially requested

This procedure is repeated a maximum of three times. If after this three retries the position of the Selector still isn't set, the tool change will report a failure and a user interaction is required.

On the Feeder, stall handling takes place while the filament is being loaded / unloaded. In case the firmware detects a stall on the Feeder, it'll slow down the feed speed by 25% and retry feeding the filament. This step will repeat 3 times until the SMuFF gives up. In such case, reduce the overall feed speed (MaxSpeed) and try again.

Please notice: If stall handling gets activated on the Feeder, it's necessary to slow down the overall feeding speed. This means: Your tool changes will take roughly three times longer than without stall handling. Though, it's more reliable / fail save in the long run.

To be continued...