<p>I have the same idea on the same board, but I think to stay with the DIR/STEP mode first.
The CLK is useless for the DIR/STEP mode, then I suppose that it is useful for UART mode.
But this datasheet is very strange, often there is Rx and Tx UART close to STEP pin
<a href="https://i.sstatic.net/XOLQC.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/XOLQC.jpg" alt="STM2209 wiring" /></a></p>
<p>When I read the Bigtreetech documentation from your link, only one wire is used for the UART (Rx/Tx). This is strange, or it is to be compatible with other driver and the CLK is useless.</p>
<p>I never used the TMC2209 with the uart, only in STEP/DIR mode and directly drove with a Raspberry Pico.</p>

CC BY-SA 4.0
2023-02-10T13:39:45.337Z
Welcome to 3D Printing! and thank you for your contribution. When you get a chance, please take the [tour] to understand how the site works and how it is different than others.
agarza
CC BY-SA 4.0
2023-02-10T12:44:15.150Z
2023-03-13T08:16:39.807Z
2023-03-13T08:16:39.807Z
Chalain
<p>I haven't started on the hardware for this project yet as I'm still waiting for delivery, but I would just like to sense-check my current software mods and hardware plans to see if I'm along the right lines. I am going to take the BIGTREETECH SKR mini E3 V3.0 board and add a 5th stepper driver to get independent control of the Z axes on my printer. Having studied the <a href="https://github.com/bigtreetech/BIGTREETECH-SKR-mini-E3/blob/master/hardware/BTT%20SKR%20MINI%20E3%20V3.0/Hardware/BTT%20E3%20SKR%20MINI%20V3.0_PIN.pdf" rel="nofollow noreferrer">pins</a> on the board and the <a href="https://github.com/bigtreetech/BIGTREETECH-SKR-mini-E3/blob/master/hardware/BTT%20SKR%20MINI%20E3%20V3.0/Hardware/BTT%20E3%20SKR%20MINI%20V3.0_SCH.pdf" rel="nofollow noreferrer">schematics</a> of the various ICs, my plan is to connect the TMC2209 to some spare pins on the board.</p>
<p>Using the BIGTREETECH PCB version of the driver:</p>
<p><a href="https://i.sstatic.net/nuoPq.png" rel="nofollow noreferrer" title="Diagram of the BIGTREETECH SKR mini E3 PCB"><img src="https://i.sstatic.net/nuoPq.png" alt="Diagram of the BIGTREETECH SKR mini E3 PCB" title="Diagram of the BIGTREETECH SKR mini E3 PCB" /></a></p>
<p>I plan to attach the enable pin to PD0 on the SKR, MS1, and MS2 to ground, UART Tx/Rx to the first PDN as detailed in the <a href="https://github.com/bigtreetech/BIGTREETECH-TMC2209-V1.2/blob/master/manual/TMC2209-V1.2-manual.pdf" rel="nofollow noreferrer">manual</a>, VM to the power supply, GND to the power supply, A2/A1/B1/B2 to the motor, VDD to a 3.3V pin from the SPI 1 block of pins on the SKR, and GND to ground.</p>
<p>I think this makes sense as the driver runs in UART mode - it is set to 0x0 by tying MS1 and MS2 to ground - and my present understanding is that in UART mode the CLK, STP, and DIR pins are not needed. I am not 100% on that point so I could be wrong there. If I do need to add it then STP and DIR are easy, CLK would be a bit more challenging but I believe UART does not require a clock signal.</p>
<p>As far as software changes are concerned, the main additions are in <code>pins.h</code> of Marlin 2.1.x where I have added:</p>
<pre><code>#define Z2_ENABLE_PIN                       PD0  
#define Z2_STEP_PIN                         PD2 // not needed in uart mode?  
#define Z2_DIR_PIN                          PD3 // not needed in uart mode? 
</code></pre>
<p>And then to hijack some hardware serial pins:</p>
<pre><code>#define X_HARDWARE_SERIAL  MSerial4 // original code
#define Y_HARDWARE_SERIAL  MSerial4 // original code
#define Z_HARDWARE_SERIAL  MSerial4 // original code
#define Z2_HARDWARE_SERIAL MSerial1 // my addition
#define E0_HARDWARE_SERIAL MSerial4 // original code
</code></pre>
<p>Here is where I have the most doubt, I'm assuming that <code>MSerial1</code> corresponds to the Rx1 and Tx1 pins in the EXP1 block on the board.</p>
<p>In summary, my main questions are: do I need the CLK, STP, and DIR pins (maybe just STP and DIR?), and does using <code>MSerial1</code> correspond to the Rx1 and Tx1 pins?</p>

<marlin><stepper-driver><bigtreetech><serial-connection><tmc2209>
Adding a TMC2209 driver to BIGTREETECH SKR mini E3 V3.0 control board using Marlin
eng_giraffe
# Adding a TMC2209 driver to BIGTREETECH SKR mini E3 V3.0 control board using Marlin

(Asked by: username_0 on 2023-01-21)

I haven't started on the hardware for this project yet as I'm still waiting for delivery, but I would just like to sense-check my current software mods and hardware plans to see if I'm along the right lines. I am going to take the BIGTREETECH SKR mini E3 V3.0 board and add a 5th stepper driver to get independent control of the Z axes on my printer. Having studied the pins on the board and the schematics of the various ICs, my plan is to connect the TMC2209 to some spare pins on the board.
Using the BIGTREETECH PCB version of the driver:

I plan to attach the enable pin to PD0 on the SKR, MS1, and MS2 to ground, UART Tx/Rx to the first PDN as detailed in the manual, VM to the power supply, GND to the power supply, A2/A1/B1/B2 to the motor, VDD to a 3.3V pin from the SPI 1 block of pins on the SKR, and GND to ground.
I think this makes sense as the driver runs in UART mode - it is set to 0x0 by tying MS1 and MS2 to ground - and my present understanding is that in UART mode the CLK, STP, and DIR pins are not needed. I am not 100% on that point so I could be wrong there. If I do need to add it then STP and DIR are easy, CLK would be a bit more challenging but I believe UART does not require a clock signal.
As far as software changes are concerned, the main additions are in pins.h of Marlin 2.1.x where I have added:
#define Z2_ENABLE_PIN                       PD0  
#define Z2_STEP_PIN                         PD2 // not needed in uart mode?  
#define Z2_DIR_PIN                          PD3 // not needed in uart mode? 

And then to hijack some hardware serial pins:
#define X_HARDWARE_SERIAL  MSerial4 // original code
#define Y_HARDWARE_SERIAL  MSerial4 // original code
#define Z_HARDWARE_SERIAL  MSerial4 // original code
#define Z2_HARDWARE_SERIAL MSerial1 // my addition
#define E0_HARDWARE_SERIAL MSerial4 // original code

Here is where I have the most doubt, I'm assuming that MSerial1 corresponds to the Rx1 and Tx1 pins in the EXP1 block on the board.
In summary, my main questions are: do I need the CLK, STP, and DIR pins (maybe just STP and DIR?), and does using MSerial1 correspond to the Rx1 and Tx1 pins?

**Tags:** marlin, stepper-driver, bigtreetech, serial-connection, tmc2209

---

## 1 answers

### Answer by username_1 on 2023-02-10. Score: 1

I have the same idea on the same board, but I think to stay with the DIR/STEP mode first.
The CLK is useless for the DIR/STEP mode, then I suppose that it is useful for UART mode.
But this datasheet is very strange, often there is Rx and Tx UART close to STEP pin
[![STM2209 wiring](https://i.sstatic.net/XOLQC.jpg)](https://i.sstatic.net/XOLQC.jpg)

When I read the Bigtreetech documentation from your link, only one wire is used for the UART (Rx/Tx). This is strange, or it is to be compatible with other driver and the CLK is useless.

I never used the TMC2209 with the uart, only in STEP/DIR mode and directly drove with a Raspberry Pico.

> **Comments:**
> **username_2**: Welcome to 3D Printing! and thank you for your contribution. When you get a chance, please take the [tour] to understand how the site works and how it is different than others.  

---

