- Hardware & Machines
- Driver Boards
- Anyone figured out how to get Trinamic's TMC5160 drivers working with LinuxCNC?
Anyone figured out how to get Trinamic's TMC5160 drivers working with LinuxCNC?
- amanker
- Offline
- Senior Member
-
Less
More
- Posts: 61
- Thank you received: 1
08 Feb 2025 19:36 #321016
by amanker
Replied by amanker on topic Anyone figured out how to get Trinamic's TMC5160 drivers working with LinuxCNC?
I am using Octopus Pro board with remora-spi. Can you help me with working TMC5160 (stepsticks) drivers. Previously I used TMC5160 with tinybee board flashed with FluidNC in daisy chain config, they were working fine.
Please Log in or Create an account to join the conversation.
- 3404gerber
- Offline
- New Member
-
Less
More
- Posts: 14
- Thank you received: 4
10 Feb 2025 18:47 #321180
by 3404gerber
Replied by 3404gerber on topic Anyone figured out how to get Trinamic's TMC5160 drivers working with LinuxCNC?
From what I see in the Remora docs and source code, it only supports TMC2208/2209 with UART communication. As far as I know, the TMC5160 cannot be configured to use step/dir with UART configuration; it can only mix SPI and step/dir.
Please Log in or Create an account to join the conversation.
- amanker
- Offline
- Senior Member
-
Less
More
- Posts: 61
- Thank you received: 1
11 Feb 2025 15:18 #321238
by amanker
Replied by amanker on topic Anyone figured out how to get Trinamic's TMC5160 drivers working with LinuxCNC?
Yes. I wanted to communicate via spi only. Since I also configured it in spi mode in daisy chain config in FluidNC. Remora communicate with LinuxCNC via spi. If possible I can send spi config data to tmc via some module in LinuxCNC. Or if you modded remora-spi source to suit tmc 5160
Please Log in or Create an account to join the conversation.
- meister
- Offline
- Platinum Member
-
Less
More
- Posts: 519
- Thank you received: 325
11 Feb 2025 17:57 #321255
by meister
Replied by meister on topic Anyone figured out how to get Trinamic's TMC5160 drivers working with LinuxCNC?
someone has probably done it:
I have now also ordered some to try to integrate them into RIO
I have now also ordered some to try to integrate them into RIO
Please Log in or Create an account to join the conversation.
- 3404gerber
- Offline
- New Member
-
Less
More
- Posts: 14
- Thank you received: 4
11 Feb 2025 18:55 #321264
by 3404gerber
Replied by 3404gerber on topic Anyone figured out how to get Trinamic's TMC5160 drivers working with LinuxCNC?
That was me, link is on page 1.

The following user(s) said Thank You: meister
Please Log in or Create an account to join the conversation.
- 3404gerber
- Offline
- New Member
-
Less
More
- Posts: 14
- Thank you received: 4
11 Feb 2025 19:13 #321265
by 3404gerber
I want to try to control the SPI device on the RPi without the use of BCM2835 library to avoid compatibility problems. Give me a week to try and I'll publish my code after that. I didn't even try to modify the spi-remora code, as this is way above my coding skills.
Replied by 3404gerber on topic Anyone figured out how to get Trinamic's TMC5160 drivers working with LinuxCNC?
If you can make a direct SPI connection between the Raspberry Pi and the TMC drivers, then it should be very easy to adapt my code; all it does is sending the registers value to the drivers according to values you set via parameters until all the registers have been set, and then it reads the motor position. And another function sends velocity command. You'd just need to remove the write velocity part (or, simply said, not addf TMC5160.write) and not connect the position feedback pin. In theory you could still use the SPI line to get TMC status bit and be informed if one driver has an error.Yes. I wanted to communicate via spi only. Since I also configured it in spi mode in daisy chain config in FluidNC. Remora communicate with LinuxCNC via spi. If possible I can send spi config data to tmc via some module in LinuxCNC. Or if you modded remora-spi source to suit tmc 5160
I want to try to control the SPI device on the RPi without the use of BCM2835 library to avoid compatibility problems. Give me a week to try and I'll publish my code after that. I didn't even try to modify the spi-remora code, as this is way above my coding skills.
Please Log in or Create an account to join the conversation.
- amanker
- Offline
- Senior Member
-
Less
More
- Posts: 61
- Thank you received: 1
12 Feb 2025 18:12 #321360
by amanker
Replied by amanker on topic Anyone figured out how to get Trinamic's TMC5160 drivers working with LinuxCNC?
I think if you look into remora code. They are also sending hex codes payoad via spi such as estop is 0x65737470.
If you would integrate that into remora then it would be more useful.
If you would integrate that into remora then it would be more useful.
Please Log in or Create an account to join the conversation.
- 3404gerber
- Offline
- New Member
-
Less
More
- Posts: 14
- Thank you received: 4
13 Feb 2025 06:33 #321417
by 3404gerber
Yes, the Remora-spi LCNC module sends SPI data to... a microcontroller. The microcontroller then translates the message into steps, or digital ins/outs, among other. To make TMC5160 work with Remora you'll need to adapt the Remora firmware. There's already a part of the TMCStepper library implemented to work with TMC2208/2209 over UART, and you configure the drivers options in the Remora config file, not in LinuxCNC ( like explained here ). The TMC5160 over SPI is not implemented yet, but most of the code is written and dispatched over the GRBLHAL/TMCStepper/FluidNC code. I think you have a better chance to find someone with the needed skills and knowledge to help you in the Remora thread.
Replied by 3404gerber on topic Anyone figured out how to get Trinamic's TMC5160 drivers working with LinuxCNC?
More useful to whom? I do have a RPi and TMC drivers and want to avoid to buy an extra device. And the tests I made with FluidNC showed me that I was not able to get smooth acceleration at higher rates, that's why I decided to go full SPI. Maybe the audience would be larger if I'd add the functionality to the Remora code, but it would be useless for me.I think if you look into remora code. They are also sending hex codes payoad via spi such as estop is 0x65737470.
If you would integrate that into remora then it would be more useful.
Yes, the Remora-spi LCNC module sends SPI data to... a microcontroller. The microcontroller then translates the message into steps, or digital ins/outs, among other. To make TMC5160 work with Remora you'll need to adapt the Remora firmware. There's already a part of the TMCStepper library implemented to work with TMC2208/2209 over UART, and you configure the drivers options in the Remora config file, not in LinuxCNC ( like explained here ). The TMC5160 over SPI is not implemented yet, but most of the code is written and dispatched over the GRBLHAL/TMCStepper/FluidNC code. I think you have a better chance to find someone with the needed skills and knowledge to help you in the Remora thread.
Please Log in or Create an account to join the conversation.
- amanker
- Offline
- Senior Member
-
Less
More
- Posts: 61
- Thank you received: 1
13 Feb 2025 10:02 #321431
by amanker
Replied by amanker on topic Anyone figured out how to get Trinamic's TMC5160 drivers working with LinuxCNC?
Can we other spi on rpi5 other than used by remora-spi to send config data to tmc5160. Tmc5160 spi config pins connected to rpi spi pins. And remora will treat 5160 as regular step/dir mode.
I am also communicating with cakeslob who is another developer for remora via discord.
I am also communicating with cakeslob who is another developer for remora via discord.
Please Log in or Create an account to join the conversation.
- 3404gerber
- Offline
- New Member
-
Less
More
- Posts: 14
- Thank you received: 4
15 Feb 2025 14:08 #321639
by 3404gerber
I did some quick tests on RPi 4 with the use of ioctl controlling /dev/spidev0.0 rather than the bcm2835 library and it seems to be slower/less regular. I just quickly compared my read and write functions time. As I have also read in another thread (a RPi 5 thread on this forum) this morning that the spidev option was not real-time, I will stick to the same idea as the Remora SPI, meaning using bcm2835 and rp1 library for RPi 4 and RPi5.
Replied by 3404gerber on topic Anyone figured out how to get Trinamic's TMC5160 drivers working with LinuxCNC?
I should be able to make it work; all I have to do is to add an option when you load the module to specify the use of the second SPI channel.Can we other spi on rpi5 other than used by remora-spi to send config data to tmc5160. Tmc5160 spi config pins connected to rpi spi pins. And remora will treat 5160 as regular step/dir mode.
I am also communicating with cakeslob who is another developer for remora via discord.
I did some quick tests on RPi 4 with the use of ioctl controlling /dev/spidev0.0 rather than the bcm2835 library and it seems to be slower/less regular. I just quickly compared my read and write functions time. As I have also read in another thread (a RPi 5 thread on this forum) this morning that the spidev option was not real-time, I will stick to the same idea as the Remora SPI, meaning using bcm2835 and rp1 library for RPi 4 and RPi5.
Please Log in or Create an account to join the conversation.
Moderators: PCW, jmelson
- Hardware & Machines
- Driver Boards
- Anyone figured out how to get Trinamic's TMC5160 drivers working with LinuxCNC?
Time to create page: 0.083 seconds