Coder Social home page Coder Social logo

tmc-api's Introduction

TMC-API

The TMC-API is a portable C library for working with Trinamic ICs in embedded projects. It is CPU-independent and self-contained (no external dependencies).

The TMC-API allows easy access to the registers of Trinamic ICs. It provides definitions for all IC registers and their bitfields.

Installation

To set up your project to use the TMC-API, simply copy the source files you need:

  • tmc/helpers/ contains helper files needed by all other TMC-API source files. Always copy this folder.
  • tmc/ic/ contains all the files for different ICs. For each IC you want to use, copy the corresponding folder.
  • tmc/ramp/ contains simple software linear ramp functions that can be used in applications. Copy them if needed by your project.

Usage

For a reference usage of the TMC-API, visit the TMC-Evalsystem

To use the TMC-API, perform the following steps in your code:

  • Implement the tmcXXXX_readWriteArray() function in in your code. This function provides the necessary hardware access to the TMC-API.
  • Call tmcXXXX_init() once for each Trinamic IC in your design. This function initializes an IC object which represents one physical IC.
  • Call tmcXXXX_periodicJob() periodically. Pass a millisecond timestamp as the tick parameter.
  • After initializing, calling tmcXXXX_reset() or tmcXXXX_restore(), the TMC-API will write multiple registers to the IC (referred to as IC configuration). Per call to tmcXXXX_periodicJob(), one register will be written until IC configuration is completed.
  • Once the IC configuration is completed, you can use tmcXXXX_readInt() and tmcXXXX_writeInt() to read and write registers.

Changelog

Version 3.06: (Beta)

  • Full TMC2160 support
  • Begin TMC7531 support
  • Begin TMC4672 support
  • Begin TMC2590 support
  • Added new software ramp generator (linear)
  • TMC2041 fixed missing register fields
  • Various bugfixes
  • Internal optimizations

Version 3.05: (Released)

tmc-api's People

Contributors

chrisidema avatar huskier avatar jonahammer avatar lionheart1810 avatar riggs avatar trinamic-jh avatar trinamic-jm avatar trinamic-lh avatar trinamic-sw avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.