- Hardware & Machines
- Computers and Hardware
- Remora - Rpi Software Stepping Using External Microcontroller via SPI
Remora - Rpi Software Stepping Using External Microcontroller via SPI
- amanker
- Offline
- Premium Member
-
Less
More
- Posts: 108
- Thank you received: 2
12 Jan 2026 16:13 #341313
by amanker
Replied by amanker on topic Remora - Rpi Software Stepping Using External Microcontroller via SPI
@3404gerber thanks for your all response. Finally I was able to make it working. Added spi_clk_div=32 in remora-spi arguments.
But it was never required earlier. I am using raspberry pi 4b.
But it was never required earlier. I am using raspberry pi 4b.
Please Log in or Create an account to join the conversation.
- 3404gerber
- Offline
- Senior Member
-
Less
More
- Posts: 43
- Thank you received: 12
15 Jan 2026 06:13 #341411
by 3404gerber
Replied by 3404gerber on topic Remora - Rpi Software Stepping Using External Microcontroller via SPI
Happy to hear you solved your problem! In case you need some extra SPI cable length, you could balance the signal. I did a test and was able to transmit a 4MHz SPI signal to a driver over several meters of cable. I think it could get way faster than 4MHz, but I did try it so far as it is the max frequency of my driver.
Please Log in or Create an account to join the conversation.
- amanker
- Offline
- Premium Member
-
Less
More
- Posts: 108
- Thank you received: 2
15 Jan 2026 07:30 - 15 Jan 2026 07:40 #341419
by amanker
Replied by amanker on topic Remora - Rpi Software Stepping Using External Microcontroller via SPI
I didnt understand what do you mean by balancing the signal? Please explain.
I was follwing your work on TMC5160 on LinuxCNC.
How can I use TMC5160 on LinuxCNC on this board. I need just TMC5160 is configured via connected SPI cable nothing else. And remora will operate as regular step/dir mode.
I was follwing your work on TMC5160 on LinuxCNC.
How can I use TMC5160 on LinuxCNC on this board. I need just TMC5160 is configured via connected SPI cable nothing else. And remora will operate as regular step/dir mode.
Last edit: 15 Jan 2026 07:40 by amanker.
Please Log in or Create an account to join the conversation.
- 3404gerber
- Offline
- Senior Member
-
Less
More
- Posts: 43
- Thank you received: 12
15 Jan 2026 19:29 #341438
by 3404gerber
Replied by 3404gerber on topic Remora - Rpi Software Stepping Using External Microcontroller via SPI
I think Wikipedia will explain balanced signal better than me:
en.wikipedia.org/wiki/Balanced_line
. I made a small pcb that uses DS90LV/DS90LT line transceiver to turn the SPI into a balanced signal, and one at the end of the line that turn it back to an TTL SPI signal.
For the TMC5160, if you use the Remora-STM32F4xx-PIO or Remora-STM32H7xx-PIO, you'll have the possibility to configure your drivers via SPI. If you prefer to use my library, it would benefit from some changes; mainly removing the read/write functions that aren't needed and just make a configure and status check function. But you could try to use it without changes for a test, as the driver won't accept any SPI command related to internal ramp if the SPI mode isn't activated by a jumper on your board.
For the TMC5160, if you use the Remora-STM32F4xx-PIO or Remora-STM32H7xx-PIO, you'll have the possibility to configure your drivers via SPI. If you prefer to use my library, it would benefit from some changes; mainly removing the read/write functions that aren't needed and just make a configure and status check function. But you could try to use it without changes for a test, as the driver won't accept any SPI command related to internal ramp if the SPI mode isn't activated by a jumper on your board.
Please Log in or Create an account to join the conversation.
- amanker
- Offline
- Premium Member
-
Less
More
- Posts: 108
- Thank you received: 2
16 Jan 2026 08:54 #341448
by amanker
Replied by amanker on topic Remora - Rpi Software Stepping Using External Microcontroller via SPI
I will try changing SPI cable with LAN cable. Which might work better in shielding external interference.
I have already tried STM32F4xx-PIO and STM32H7xx-PIO branches. H7xx works ok on SKR3 board.
But F4xx branch is not working with tmc5160 but working in step/dir mode. I have tested ben-jacobson branch github.com/ben-jacobson/Remora-STM32F4xx-PIO.git who is orginal developer of F4xx branch. I have posted issue on GIT about this but didnt got reply. Didnt tested remora-cnc branch which 28 commits less than ben's branch. and since it was forked out of ben's branch so didnt thought that it will work on remora-cnc branch.
for configuring tmc5160 via spi I have to change jumpers on board for SPI. Other option is, I should remain board jumpers in step/dir mode and run external spi wires connected to stepsticks (daisy chain) to RPI, which will make really mess.
I have already tried STM32F4xx-PIO and STM32H7xx-PIO branches. H7xx works ok on SKR3 board.
But F4xx branch is not working with tmc5160 but working in step/dir mode. I have tested ben-jacobson branch github.com/ben-jacobson/Remora-STM32F4xx-PIO.git who is orginal developer of F4xx branch. I have posted issue on GIT about this but didnt got reply. Didnt tested remora-cnc branch which 28 commits less than ben's branch. and since it was forked out of ben's branch so didnt thought that it will work on remora-cnc branch.
for configuring tmc5160 via spi I have to change jumpers on board for SPI. Other option is, I should remain board jumpers in step/dir mode and run external spi wires connected to stepsticks (daisy chain) to RPI, which will make really mess.
Please Log in or Create an account to join the conversation.
- 3404gerber
- Offline
- Senior Member
-
Less
More
- Posts: 43
- Thank you received: 12
16 Jan 2026 19:24 #341459
by 3404gerber
Replied by 3404gerber on topic Remora - Rpi Software Stepping Using External Microcontroller via SPI
Changing the cable can help a little. You can also try to go even lower with the SPI frequency; it really depends on how fast your servo thread is and as long as your SPI communication is faster than the servo thread, it shouldn't be a problem.
I agree that the wiring would be a mess if you had to wire the TMC directly to the RPi. I was surprised when you said that the H7 version worked but not the F4, as they share the same remora-core repo, which contains the tmc module. I think I found out why: on the SKR (H7), the remora comms is on one SPI channel, and the drivers are on another one. Scotta decided to use SoftwareSPI to communicate with the drivers. On the Octopus pro (F4), the remora comms and the motor drivers share the SPI 1 channel, so my guess is that is causing the issue. To my understanding, the same SPI channel cannot be a master and a slave at the same time, and it is a slave for the Remora component. If you want it to work on the Octopus, you'd have to connect the RPi on a different SPI channel and adapt your platform.ini file accordingly. I don't have a board myself, but as far as I could see on the product datasheet you could use the SPI 3 channel on the J74 header.
I agree that the wiring would be a mess if you had to wire the TMC directly to the RPi. I was surprised when you said that the H7 version worked but not the F4, as they share the same remora-core repo, which contains the tmc module. I think I found out why: on the SKR (H7), the remora comms is on one SPI channel, and the drivers are on another one. Scotta decided to use SoftwareSPI to communicate with the drivers. On the Octopus pro (F4), the remora comms and the motor drivers share the SPI 1 channel, so my guess is that is causing the issue. To my understanding, the same SPI channel cannot be a master and a slave at the same time, and it is a slave for the Remora component. If you want it to work on the Octopus, you'd have to connect the RPi on a different SPI channel and adapt your platform.ini file accordingly. I don't have a board myself, but as far as I could see on the product datasheet you could use the SPI 3 channel on the J74 header.
Please Log in or Create an account to join the conversation.
- amanker
- Offline
- Premium Member
-
Less
More
- Posts: 108
- Thank you received: 2
17 Jan 2026 13:53 #341483
by amanker
Replied by amanker on topic Remora - Rpi Software Stepping Using External Microcontroller via SPI
I was also suspecting SPI is the issue, since as soon as I use SPI for tmc5160, The blinking LED which I configured to know if firmware is working, glows continuously insteed of blinking.
There is somthing different in ben-jecobson F4 port, since console output on uart gives garbage, no readable output.
As per your suggestion, I comapred both repos, for TMCsteppers both are same, no changes. And both F4 and H7 uses software SPI for tmc communication.
There is somthing different in ben-jecobson F4 port, since console output on uart gives garbage, no readable output.
As per your suggestion, I comapred both repos, for TMCsteppers both are same, no changes. And both F4 and H7 uses software SPI for tmc communication.
Please Log in or Create an account to join the conversation.
- cakeslob
- Offline
- Platinum Member
-
Less
More
- Posts: 925
- Thank you received: 276
18 Jan 2026 18:21 #341542
by cakeslob
Replied by cakeslob on topic Remora - Rpi Software Stepping Using External Microcontroller via SPI
ashok he is saying that the comms SPI the tmc spi both use spi channel1, PA_5/6/7. we will need change it to use spi2 or 3 for comms. im not sure the other parts
Please Log in or Create an account to join the conversation.
- amanker
- Offline
- Premium Member
-
Less
More
- Posts: 108
- Thank you received: 2
18 Jan 2026 18:31 #341544
by amanker
Replied by amanker on topic Remora - Rpi Software Stepping Using External Microcontroller via SPI
Hi @cakeslob nice to see you again.
I understand that. He was explaining that in case of h7xx they are using software spi for tmc and hardware spi for comms. But in case f4xx they are using same for both.
But after comparing both repos, I found that both are using software for spi for tmc and hardware for comms. So that is not the case.
I understand that. He was explaining that in case of h7xx they are using software spi for tmc and hardware spi for comms. But in case f4xx they are using same for both.
But after comparing both repos, I found that both are using software for spi for tmc and hardware for comms. So that is not the case.
Please Log in or Create an account to join the conversation.
- 3404gerber
- Offline
- Senior Member
-
Less
More
- Posts: 43
- Thank you received: 12
18 Jan 2026 19:34 #341546
by 3404gerber
Replied by 3404gerber on topic Remora - Rpi Software Stepping Using External Microcontroller via SPI
Hi,
Using soft vs hardware SPI was not the point here. You are free to use soft or hardware SPI for the TMC; both repo use software SPI, but I ported the tmc module to a rp2040 using hardware SPI.
The important point was, as cakeslob mentioned, that those two SPI function cannot use the same pins, as once it is a slave (comms) and once a master (tmc). So, if you want to use tmc module on the Octopus pro, you will have to connect the Rpi on a different SPI port, using different pins. Again, I don't have a board but according to the manual, SPI channel 3 is exposed on J74 connector and could be used for comms.
Using soft vs hardware SPI was not the point here. You are free to use soft or hardware SPI for the TMC; both repo use software SPI, but I ported the tmc module to a rp2040 using hardware SPI.
The important point was, as cakeslob mentioned, that those two SPI function cannot use the same pins, as once it is a slave (comms) and once a master (tmc). So, if you want to use tmc module on the Octopus pro, you will have to connect the Rpi on a different SPI port, using different pins. Again, I don't have a board but according to the manual, SPI channel 3 is exposed on J74 connector and could be used for comms.
Please Log in or Create an account to join the conversation.
- Hardware & Machines
- Computers and Hardware
- Remora - Rpi Software Stepping Using External Microcontroller via SPI
Time to create page: 0.201 seconds