-
|
Hi, Is it possible to set or change pulse duration? BR Thorsten |
Beta Was this translation helpful? Give feedback.
Answered by
gin66
Feb 10, 2026
Replies: 2 comments 6 replies
-
|
There is no possibility to change the pulse duration. The duration is depending on the used uC and the related driver implementation/HW capabilities. What is your use case? |
Beta Was this translation helpful? Give feedback.
6 replies
-
|
I really appreciate the tip as to where to add the delay.
Sure there's not room for a #define to add? I guess it's not worth your
time to test and maintain, but maybe a comment in code?
Thanks for a cool library
…On Thu, May 28, 2026, 5:43 p.m. gin66 ***@***.***> wrote:
Atmeg328p uses a timer to set the Low->High precisely and High->Low will
be done in the interrupt (around 4-5us after the transition, or even longer
if another interrupt is served). The current design offers 50kSteps/s with
single stepper and only 37kStep/s with dual stepper. Reason is, that the
interrupts of parallel running steppers are delaying/impacting each other.
So the interrupt service routine does not contain any delays. Extending to
e.g. 8us would increase the ISR time and would need to reduce the max
stepper rate. You could patch the driver and add a delayMicroseconds(3)
right before line 154 in src/pd_avr/avr_queue.cpp
https://github.com/gin66/FastAccelStepper/blob/6f935e9d2fb35b6f0edc4c2ca381e35702dcba1e/src/pd_avr/avr_queue.cpp#L154-L157
From driver side, I do not plan to change this.
If the High->Low would be done by interrupt, then the ISR rate will be
doubled, which again would force a reduction of max speed. So I too do not
plan to change this.
Hope for your understanding, but the AtMega328p is not a powerful device.
There must be compromises accepted.
—
Reply to this email directly, view it on GitHub
<#346?email_source=notifications&email_token=A4XHIGDRAQDOHHPQRORLZVD45CXI3A5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCNZQHE3TKMZZUZZGKYLTN5XKOY3PNVWWK3TUUVSXMZLOOSWGM33PORSXEX3DNRUWG2Y#discussioncomment-17097539>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A4XHIGBKQ4BPEFHCY7UH3GD45CXI3AVCNFSM6AAAAACZRPYJZCVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTOMBZG42TGOI>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/A4XHIGBG42E2ARQMXHQWR5345CXI3A5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCNZQHE3TKMZZUZZGKYLTN5XKOY3PNVWWK3TUUVSXMZLOOSVGM33PORSXEX3JN5ZQ>
and Android
<https://github.com/notifications/mobile/android/A4XHIGHRBYQRF7ODFVPO2HD45CXI3A5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCNZQHE3TKMZZUZZGKYLTN5XKOY3PNVWWK3TUUVSXMZLOOSXGM33PORSXEX3BNZSHE33JMQ>.
Download it today!
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Are you using espidf5.x or espidf4.x Only the latter still offers mcpwm module. Both provide rmt and for rmt the step pulse is for high speed with 50% duty cycle and for low speed fixed at 2ms. Hardly can tune anything.
You are at the limit of 200kSteps/s and need more ?