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

SPI interface with tmc 5160 drivers #17

Open
Joey-Orduna opened this issue Mar 23, 2023 · 1 comment
Open

SPI interface with tmc 5160 drivers #17

Joey-Orduna opened this issue Mar 23, 2023 · 1 comment

Comments

@Joey-Orduna
Copy link

Hi,

I've been trying to set up my machine with the Trinamic TMC 5160 drivers that use SPI mode. Looking through this current implementation, it doesn't look like the SPI bus was implemented as a HAL layer for the Arduino Due.

Before I start writing any HAL interface for the SPI bus of the Due, I just wanted to make sure this is not already implemented.

Looking through the different Trinamic configuration options, I see that there is an I2C->SPI bridge which is a bit confusing.

If anyone could point me in the right direction as to how to go about implementing this SPI functionality; that would be greatly appreciated.

What's currently getting me stumped is how to implement the chip-select (CSN) SPI specific functionality.

@terjeio
Copy link
Contributor

terjeio commented Mar 23, 2023

Before I start writing any HAL interface for the SPI bus of the Due, I just wanted to make sure this is not already implemented.

It is not.

Looking through the different Trinamic configuration options, I see that there is an I2C->SPI bridge which is a bit confusing.

I made it for my CNC Boosterpack BOB for TI LaunchPads - it has an I2C interface but no free pins for SPI. So making a I2C <> SPI bridge was the only option for me.

If anyone could point me in the right direction as to how to go about implementing this SPI functionality; that would be greatly appreciated.

What's currently getting me stumped is how to implement the chip-select (CSN) SPI specific functionality.

Take a look at one of the existing implementations. There are two modes for commuinicationg via SPI, a dedicated chip select for each driver or a single for all. The latter is by chaining all the drivers to create a single long register - all drivers are written to in a single transaction.

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

No branches or pull requests

2 participants