klipper
klipper copied to clipboard
tmc: external clock support
Allow the clock frequency of the tmc driver to be specified in case the user uses an external clock oscillator for the driver so that the velocity based thresholds are calculated correctly. If the external clock frequency is not specified, it is assumed that the internal clock is the one that is used, so the old behaviour is preserved. The valid range for the clock frequency was set according to the datasheet electrical characteristics values.
In terms of hardware support, the Prusa MK3.5, MK3.9, MK4 and XL need this change since they all use a shared 16MHz external clock for the TMC drivers. Without this change, all velocity based thresholds are calculated incorrectly. There is also support for an external clock with the SilentStepStick TMC5160 v1.3, but I doubt anyone is using that hardware configuration.
Thank you for your contribution to Klipper. Unfortunately, a reviewer has not assigned themselves to this GitHub Pull Request. All Pull Requests are reviewed before merging, and a reviewer will need to volunteer. Further information is available at: https://www.klipper3d.org/CONTRIBUTING.html
There are some steps that you can take now:
- Perform a self-review of your Pull Request by following the steps at: https://www.klipper3d.org/CONTRIBUTING.html#what-to-expect-in-a-review If you have completed a self-review, be sure to state the results of that self-review explicitly in the Pull Request comments. A reviewer is more likely to participate if the bulk of a review has already been completed.
- Consider opening a topic on the Klipper Discourse server to discuss this work. The Discourse server is a good place to discuss development ideas and to engage users interested in testing. Reviewers are more likely to prioritize Pull Requests with an active community of users.
- Consider helping out reviewers by reviewing other Klipper Pull Requests. Taking the time to perform a careful and detailed review of others work is appreciated. Regular contributors are more likely to prioritize the contributions of other regular contributors.
Unfortunately, if a reviewer does not assign themselves to this GitHub Pull Request then it will be automatically closed. If this happens, then it is a good idea to move further discussion to the Klipper Discourse server. Reviewers can reach out on that forum to let you know if they are interested and when they are available.
Best regards, ~ Your friendly GitIssueBot
PS: I'm just an automated script, not a human being.
Thanks. I guess I'm a little unsure on this as it isn't clear to me that there would be very many people that would set this low-level field. I wasn't aware that prusa had printers that synchronized the tmc clocks. Do you have a link to the hardware with this support?
-Kevin
@KevinOConnor Afaik, the schematics for the XL and MK4 electronics are not public yet. I asked for permission to post some snippets from the datasheet. Hope I'll get an answer soon. And I just noticed that in both printers only XYZ are synchronised, the extruder using the internal oscillator instead.
Okay, thanks. If this is for hardware that hasn't been released yet then I think we should hold-off until that hardware is in wide circulation. (As, for example, there might be other things that have to be addressed to actually use that hardware.)
Cheers, -Kevin
Unfortunately a reviewer has not assigned themselves to this GitHub Pull Request and it is therefore being closed. It is a good idea to move further discussion to the Klipper Discourse server. Reviewers can reach out on that forum to let you know if they are interested and when they are available.
Best regards, ~ Your friendly GitIssueBot
PS: I'm just an automated script, not a human being.
Hi, MK4's electronics schematics are now avaiable: https://www.prusa3d.com/page/open-source-at-prusa-research_236812/