# Unable to read tmc uart register IFCNT

**URL:** <https://klipper.discourse.group/t/unable-to-read-tmc-uart-register-ifcnt/16977>\
**Category:** General Discussion\
**Created:** [June 11, 2024, 2:50am UTC](https://klipper.discourse.group/t/unable-to-read-tmc-uart-register-ifcnt/16977 "2024-06-11T02:50:11Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mago3D](https://avatars.discourse-cdn.com/v4/letter/m/97f17d/32.png) [@Mago3D](https://klipper.discourse.group/u/Mago3D)\
**Post date:** [June 11, 2024, 2:50am UTC](https://klipper.discourse.group/t/unable-to-read-tmc-uart-register-ifcnt/16977/1 "2024-06-11T02:50:11Z")

</div>

### Context:

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_

MANUAL\_STEPPER STEPPER=my\_stepper MOVE=10 SPEED=5

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

Config:  
[printer.cfg](https://klipper.discourse.group/uploads/short-url/7OHbrwKs89S04AUQoNPuYv3oV8V.cfg) (564 Bytes)

Connections:

 ![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/b/b37e2ec495f7f173d176eff7ea99b0fe11dccab1.jpeg)

Photo:

 ![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/a/ae9ba0892b706fffaa8ae027ba61e74b398445ce.jpeg)

### Error:

 ![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/6/6ba4c9ec7e67a11f6ef01eaf6b3d8732490a5416.png)

and when I launch the command:

### DUMP\_TMC STEPPER=my\_stepper

```auto
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 ==========

```

---

<div class="post-metadata">

**Author:** ![mykepredko](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/mykepredko/32/2085_2.png) [@mykepredko](https://klipper.discourse.group/u/mykepredko)\
**Post date:** [June 11, 2024, 3:20am UTC](https://klipper.discourse.group/t/unable-to-read-tmc-uart-register-ifcnt/16977/2 "2024-06-11T03:20:39Z")

</div>

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.

> [@Tmc2209 V1.3 Confusion and more confusion](https://klipper.discourse.group/t/tmc2209-v1-3-confusion-and-more-confusion/16896):
>
> MCU: Raspberry pi pico Hello, I am interested in using this driver but I have doubts, I don’t know how to connect the clock pin and if klipper would recognize it, also every time I look for a config for this I see this: [tmc2209 stepper\_x] uart\_pin: gpio9 tx\_pin: gpio8 tx from what I saw it also needs a 1k resistor… but I don’t understand which pin the uart\_pin would go on and if it needs a 1k resistor I looked for the manufacturer’s configuration and found this… and it confuse…

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?

---

<div class="post-metadata">

**Author:** ![Mago3D](https://avatars.discourse-cdn.com/v4/letter/m/97f17d/32.png) [@Mago3D](https://klipper.discourse.group/u/Mago3D)\
**Post date:** [June 11, 2024, 3:34am UTC](https://klipper.discourse.group/t/unable-to-read-tmc-uart-register-ifcnt/16977/3 "2024-06-11T03:34:30Z")

</div>

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:  
[https://es.aliexpress.com/item/1005003166428228.html](https://es.aliexpress.com/item/1005003166428228.html)

---

<div class="post-metadata">

**Author:** ![Mago3D](https://avatars.discourse-cdn.com/v4/letter/m/97f17d/32.png) [@Mago3D](https://klipper.discourse.group/u/Mago3D)\
**Post date:** [June 11, 2024, 3:40am UTC](https://klipper.discourse.group/t/unable-to-read-tmc-uart-register-ifcnt/16977/4 "2024-06-11T03:40:55Z")

</div>

[tmc2209 manual\_stepper my\_stepper]  
uart\_pin:gpio9  
#tx\_pin: gpio8  
uart\_address: 0  
interpolate: True  
run\_current: 0.4  
stealthchop\_threshold: 9999

launch the command `DUMP_TMC STEPPER=my_stepper`

AND

```auto
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 ==========
DUMP_TMC STEPPER=my_stepper

```

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

---

<div class="post-metadata">

**Author:** ![Mago3D](https://avatars.discourse-cdn.com/v4/letter/m/97f17d/32.png) [@Mago3D](https://klipper.discourse.group/u/Mago3D)\
**Post date:** [June 11, 2024, 3:46am UTC](https://klipper.discourse.group/t/unable-to-read-tmc-uart-register-ifcnt/16977/5 "2024-06-11T03:46:40Z")

</div>

something strange is that when launching the command

```auto
MANUAL_STEPPER STEPPER=my_stepper MOVE=10 SPEED=5

```

It only moves once…

but if I put a “-” if it moves

`MANUAL_STEPPER STEPPER=my_stepper MOVE=-10 SPEED=5`

---

<div class="post-metadata">

**Author:** ![mykepredko](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/mykepredko/32/2085_2.png) [@mykepredko](https://klipper.discourse.group/u/mykepredko)\
**Post date:** [June 11, 2024, 4:04am UTC](https://klipper.discourse.group/t/unable-to-read-tmc-uart-register-ifcnt/16977/6 "2024-06-11T04:04:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Mago3D](https://avatars.discourse-cdn.com/v4/letter/m/97f17d/32.png) [@Mago3D](https://klipper.discourse.group/u/Mago3D)\
**Post date:** [June 11, 2024, 5:51am UTC](https://klipper.discourse.group/t/unable-to-read-tmc-uart-register-ifcnt/16977/7 "2024-06-11T05:51:05Z")

</div>

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

```auto
MANUAL_STEPPER STEPPER=my_stepper MOVE=100 SPEED=50

```

After that you only have to return to move=0

---

<div class="post-metadata">

**Author:** ![Mago3D](https://avatars.discourse-cdn.com/v4/letter/m/97f17d/32.png) [@Mago3D](https://klipper.discourse.group/u/Mago3D)\
**Post date:** [June 11, 2024, 5:55am UTC](https://klipper.discourse.group/t/unable-to-read-tmc-uart-register-ifcnt/16977/8 "2024-06-11T05:55:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mykepredko](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/mykepredko/32/2085_2.png) [@mykepredko](https://klipper.discourse.group/u/mykepredko)\
**Post date:** [June 11, 2024, 5:57am UTC](https://klipper.discourse.group/t/unable-to-read-tmc-uart-register-ifcnt/16977/9 "2024-06-11T05:57:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Mago3D](https://avatars.discourse-cdn.com/v4/letter/m/97f17d/32.png) [@Mago3D](https://klipper.discourse.group/u/Mago3D)\
**Post date:** [June 11, 2024, 6:01am UTC](https://klipper.discourse.group/t/unable-to-read-tmc-uart-register-ifcnt/16977/10 "2024-06-11T06:01:48Z")

</div>

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`

---

<div class="post-metadata">

**Author:** ![mykepredko](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/mykepredko/32/2085_2.png) [@mykepredko](https://klipper.discourse.group/u/mykepredko)\
**Post date:** [June 11, 2024, 6:11am UTC](https://klipper.discourse.group/t/unable-to-read-tmc-uart-register-ifcnt/16977/11 "2024-06-11T06:11:16Z")

</div>

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:

> **[GitHub - akslick/Klipper-Belt-E3-config: Klipper configuration files for Belt...](https://github.com/akslick/Klipper-Belt-E3-config)**
>
> Klipper configuration files for Belt E3 Printer (Ender 3 Belt conversion Kit) - akslick/Klipper-Belt-E3-config

---

<div class="post-metadata">

**Author:** ![Mago3D](https://avatars.discourse-cdn.com/v4/letter/m/97f17d/32.png) [@Mago3D](https://klipper.discourse.group/u/Mago3D)\
**Post date:** [June 11, 2024, 6:17am UTC](https://klipper.discourse.group/t/unable-to-read-tmc-uart-register-ifcnt/16977/12 "2024-06-11T06:17:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![koconnor](https://avatars.discourse-cdn.com/v4/letter/k/aca169/32.png) [@koconnor](https://klipper.discourse.group/u/koconnor)\
**Post date:** [June 19, 2024, 8:38pm UTC](https://klipper.discourse.group/t/unable-to-read-tmc-uart-register-ifcnt/16977/13 "2024-06-19T20:38:39Z")

</div>

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](https://www.klipper3d.org/G-Codes.html#manual_stepper)

-Kevin

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/klipper/original/1X/64419bf2aac6639e6ef5cef200dcd456b0a01ac3.png) [@system](https://klipper.discourse.group/u/system)\
**Post date:** [July 20, 2024, 6:39am UTC](https://klipper.discourse.group/t/unable-to-read-tmc-uart-register-ifcnt/16977/14 "2024-07-20T06:39:05Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
