Welcome! Log In Create A New Profile

Advanced

Cannot use the same TX pin for both Z steppers (TMC2208 UART)

Posted by kulfuerst 
Cannot use the same TX pin for both Z steppers (TMC2208 UART)
October 24, 2020 12:48PM
Hello everybody.

I am currently running an old Marlin 2.0.x-bugfix version on my heavily modded 8-bit Anycubic i3 Mega with TMC2208s in UART mode. With my current setup, the two Z steppers both share a TX pin! This was not a problem at all with the bugfix version and would compile just fine. The two steppers are also working just fine being connected to the same TX pin, there are no problems whatsoever.

Today I decided to finally update the firmware to 2.0.7.2. This is where I am facing a problem when compiling. I get the following error:

"static assertion failed: Z2_SLAVE_ADDRESS conflicts with another driver using the same Z2_SERIAL_RX_PIN or Z2_SERIAL_TX_PIN"

So quite obviously, assigning one TX pin to both Z steppers is no longer allowed, which is a shame! I'd be very thankful if somebody could help me out here and let me know what I need to change to restore functionality. Thanks a lot everyone!
Re: Cannot use the same TX pin for both Z steppers (TMC2208 UART)
October 25, 2020 12:33AM
Not accurate...

If you share TX/RX pins you need to give the device a unique slave address and set the device to have a slave address with the jumpers MS1 and MS2 jumpers

This is so the controller can actually talk to each device individually.

before although it looks like it was working, it was really only reading and writing to the first device.

Ie you need to set unique numbers for
#define Z_SLAVE_ADDRESS 0
#define Z2_SLAVE_ADDRESS 0

NB as far as I know, this mode only works for TMC2209's
Re: Cannot use the same TX pin for both Z steppers (TMC2208 UART)
October 25, 2020 04:59AM
Of course I understand that my current setup is not one that was originally intended to be possible. It definitely works, though. if I make a change to one z stepper (e.g. change stepper current), both receive the signal and make the according change. This is intentional on my part as I want my z steppers to be in sync.

Is there not a place in the code that I can change that allows me to assign the same slave address to both drivers? or to simply disable this check during compiling so vs code just compiles it without asking any questions?

Edited 1 time(s). Last edit at 10/25/2020 04:59AM by kulfuerst.
Re: Cannot use the same TX pin for both Z steppers (TMC2208 UART)
October 25, 2020 09:33AM
Quote
kulfuerst
Of course I understand that my current setup is not one that was originally intended to be possible. It definitely works, though. if I make a change to one z stepper (e.g. change stepper current), both receive the signal and make the according change. This is intentional on my part as I want my z steppers to be in sync.

Is there not a place in the code that I can change that allows me to assign the same slave address to both drivers? or to simply disable this check during compiling so vs code just compiles it without asking any questions?

Why not just set the correct slave address (if possible with TMC2208) and be done with it, or maybe just use two other RX/TX pins? I suggest getting the hardware wiring correctly set up so there is less dependency on the firmware configurations.


http://www.marinusdebeer.nl/
Re: Cannot use the same TX pin for both Z steppers (TMC2208 UART)
October 25, 2020 09:37AM
The issue is when one stepper driver needs to say something different from the other stepper driver, the controller just gets garbage as they talk over each other
Re: Cannot use the same TX pin for both Z steppers (TMC2208 UART)
October 25, 2020 12:16PM
I see. I guess I'll just have to accept that this is no longer possible.
Re: Cannot use the same TX pin for both Z steppers (TMC2208 UART)
October 26, 2020 12:08AM
you have full source, you can just disable the static assertion, find the line, comment it out.
Sorry, only registered users may post in this forum.

Click here to login