Unable to read tmc uart register IFCNT


I am trying to build a board from scratch, I think I did everything correctly with the connections and declarations, but when it comes to launching the command

The motor runs when I do not use the uart connection, but I am interested in using it in uart mode


it gives me an error…

I will continue looking for information but for now I will leave this here

Basic Information:

Printer Model: Raspberry pi pico

printer.cfg (564 Bytes)





and when I launch the command:


Unable to read tmc uart 'my_stepper' register GCONF
========== Queried registers ==========
SGTHRS: 00000000
TPOWERDOWN: 00000014 tpowerdown=20
COOLCONF: 00000000
TCOOLTHRS: 00000000
TPWMTHRS: 00000001 tpwmthrs=1
IHOLD_IRUN: 00080c0c ihold=12 irun=12 iholddelay=8
SLAVECONF: 00000200 senddelay=2
========== Write-only registers ==========

If you go through the discussion last week regarding how to connect the UART of the TMC2209, you’ll see that only one wire is required to communicate with the chip or TWO wires if there is a 1k resistor between them.

Looking at the images above, your wiring doesn’t follow either of those schemes - I’m not surprised as you left the conversation with a statement that gave me feeling that you didn’t understand what had been discussed.

Can I suggest that you comment out the “tx_pin:” line of your printer.cfg and go with one wire connected to pin 4 (“TX”) on the TMC2209 module. You might also want to add “uart_address: 0” to the “[tmc2209 manual_stepper my_stepper]” statement in your printer.cfg.

All your “MS#” pins (these are pins 2 & 3 of the TMC2209 module) should NOT BE DRIVEN in any way. They have internal pull downs and will give you the default UART address 0. Now, I don’t know what is the stepper module carrier board you’re using, but I would suggest that you start with the two switches “off”.

Your graphic drawing of your circuit is basically illegible and I can’t find the stepper module carrier that you are using with a simple Google search. Could you provide a higher resolution drawing where all the labeling is legible along with a link to the board’s information and schematic?

Yep, I didn’t fully understand the conversation the other day and I did my best with the connections.

already turn off the ms switches and comment the tx line
and add uart_address: 0

stepper module:

[tmc2209 manual_stepper my_stepper]
#tx_pin: gpio8
uart_address: 0
interpolate: True
run_current: 0.4
stealthchop_threshold: 9999

launch the command DUMP_TMC STEPPER=my_stepper


SG_RESULT: 00000000
PWM_AUTO: 000e0024 pwm_ofs_auto=36 pwm_grad_auto=14
PWM_SCALE: 0000001d pwm_scale_sum=29
PWMCONF: c80d0e24 pwm_ofs=36 pwm_grad=14 pwm_freq=1 pwm_autoscale=1 pwm_autograd=1 pwm_reg=8 pwm_lim=12
DRV_STATUS: c0190000 cs_actual=25 stealth=1 stst=1
CHOPCONF: 34030053 toff=3 hstrt=5 tbl=2 vsense=1 mres=4(16usteps) intpol=1 dedge=1
MSCURACT: 00f7000c cur_a=12 cur_b=247
MSCNT: 00000008 mscnt=8
TSTEP: 000fffff tstep=1048575
FACTORY_CONF: 0000000e fclktrim=14
IOIN: 21000041 enn=1 pdn_uart=1 version=0x21
OTP_READ: 0000000e otp_fclktrim=14
IFCNT: 0000000a ifcnt=10
GSTAT: 00000001 reset=1(Reset)
GCONF: 000001c0 pdn_disable=1 mstep_reg_select=1 multistep_filt=1
========== Queried registers ==========
SGTHRS: 00000000
TPOWERDOWN: 00000014 tpowerdown=20
COOLCONF: 00000000
TCOOLTHRS: 00000000
TPWMTHRS: 00000001 tpwmthrs=1
IHOLD_IRUN: 00081919 ihold=25 irun=25 iholddelay=8
SLAVECONF: 00000200 senddelay=2
========== Write-only registers ==========

It seems to have worked… I don’t know if that’s all right, but at least it’s a change.

something strange is that when launching the command


It only moves once…

but if I put a “-” if it moves


That’s great news you seem to be communicating with the chip.

I couldn’t find any schematics for the Maecoom expansion board you’re using - it also seems to go by the name “RepRap A4988 Expansion Board” and the last time anybody referenced it was in 2017. If things are talking and moving then I guess you have it set up right.

Now, as for the only moves once but if you go negative, I think that has to do with your endstop. I don’t know what the RP2040 reads as a pulled up pin but I believe it may be fooled into believing that the endstop is active so it will only go in one direction.

Try removing the “!” in front of the “pgio10” in your “dir_pin:” line in printer.cfg to see what happens - I think in this case the motor will only move in the other direction. If that happens then Put a “^” character in fron of the “!gpio6” in your “endstop_pin;” line.

Let’s see what happens here.

Again, great news that you can write/read the TMC2209 and you can move the motor.

Being declared as a manual motor it does not need an endstop, the problem with this is that the minimum and maximum position options are not available either… so I don’t know how to declare the maximum distance it can travel… I think what is What happens is that when you give MOVE a value it takes that as the maximum and the first time it moves but after that it will no longer move more than that, and it can only go back…

that is to say, you can only use this command once


After that you only have to return to move=0

What I need to do is really move without limits but I still don’t know how to achieve it.

Probably not as exciting as you would like but it shows that you have wired the TMC2209 driver module correctly and you can see it work.

Do you really need to get it to move “without limits”? You have a pretty marginal setup here and I’m not sure how much more you need to see it do.

marginal hmm… yep… I want to be able to add a conveyor belt to a delta, that’s why I need it to be “unlimited”

I need to be able to do a "print" "pull" loop

In that case, you’re going to have to first set up your RP2040 board and Maecoom as a secondary controller to your printer (connected to the host using USB).

Next, you should do a Google search on “Klipper Belt Printer” and see what other people have done, like:

It is not the same since my delta does not print at 45% like this example, that is why I need to add one more motor for the Belt and move it indefinitely.
but the example is appreciated

The MANUAL_STEPPER MOVE=<pos> command does not take a distance - it takes an absolute position. So, if you want to move it a 100mm (MANUAL_STEPPER STEPPER=my_stepper MOVE=100 SPEED=50) and then move it another 100mm you would issue MANUAL_STEPPER STEPPER=my_stepper MOVE=200 SPEED=50).

See the docs: G-Codes - Klipper documentation


1 Like