# Issues with stepper drift on latest Klipper

**URL:** <https://klipper.discourse.group/t/issues-with-stepper-drift-on-latest-klipper/23304>\
**Category:** General Discussion\
**Created:** [May 5, 2025, 4:58pm UTC](https://klipper.discourse.group/t/issues-with-stepper-drift-on-latest-klipper/23304 "2025-05-05T16:58:57Z")\
**Posts on this page:** 1\
**Showing post:** 26

<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:** [May 7, 2025, 6:16pm UTC](https://klipper.discourse.group/t/issues-with-stepper-drift-on-latest-klipper/23304/26 "2025-05-07T18:16:17Z")

</div>

One possible explanation for what is occurring here could be a difference in rise/fall times on the step pin and the direction pin. (The Manta M8P appears to have a level shifter on these pins that may have a faster fall time than rise time.) In that situation, it is conceivable that the stepper driver could observe a direction change before a step change, even though the code issues the step change first. The recent code optimizations to stm32h7 may have lowered the time between step and dir change to the point that this type of race is now statistically more likely.

This is just a possible theory - it could easily be something else.

I’ve put together some testing code at [GitHub - KevinOConnor/klipper-dev at work-stepdir-20250507](https://github.com/KevinOConnor/klipper-dev/tree/work-stepdir-20250507) . To test it, set `step_pulse_duration: 0.000000200` in all `[stepper_?]` config sections and load the code with something like:

```sh
sudo service klipper stop
cd ~/klipper
git fetch https://github.com/KevinOConnor/klipper-dev work-stepdir-20250507
git checkout FETCH_HEAD
sudo service klipper start

```

If anyone does run this test, let us know the results (success or failure).  
-Kevin

---

_[View the full topic](https://klipper.discourse.group/t/issues-with-stepper-drift-on-latest-klipper/23304)._
