Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UART support and higher level API #1

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open

Conversation

tommag
Copy link

@tommag tommag commented Dec 27, 2017

Hello Mike,

Here are some additions to your TMC5130 code which helped me a lot to get started with this chip !
The library now comes with :

  • UART support (tested with multiple drivers)
  • higher level ramp control with speeds in steps/s and accelerations in steps/s^2
  • complete register definitions

The API had to change a little to accomodate for these changes but existing code should still work with minor modifications.

Planned additions:

  • at the moment the positions are specified in full steps. Maybe a new function like setPositionResolution() could be added for applications needing microstep positioning.
  • in UART mode it could be interesting to have "safe" write and reads (check the transmission counter after writing, multiple retries in case of bad CRC after reading).

Also, what do you think about renaming the classes to TMC5130, TMC5130_SPI, etc. ? The class names are becoming rather verbose...

Let me know if you think that these changes should not be merged because of the API break or if you prefer to merge them later.

Thanks again for sharing the initial code :)

Cheers,
Tom

…initialization.

References have been changed to pointers to allow copy assignment and avoid
dynamic memory management.
… helper function to set all of the acceleration parameters at once.
…ad was successful and add an extra check when reading a register
…tecture

int is 16 bits long on this architecture !
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant