Remora - Rpi Software Stepping Using External Microcontroller via SPI

More
04 Apr 2025 10:14 - 04 Apr 2025 10:18 #325667 by Krimbles13
Hey,
sorry to bother you with this but i can't get this to work and i'm kinda frustrated.
I can't get out of e-stop and get a bad spi payload = 646174

My hardware:
Raspberry Pi 4B
BTT Octopus Pro v1.1 with stm32f446
TMC2209 Drivers with jumpers in SPI mode

I did the wiring acording to the docs and also the installation.
With cutecom i get the output in the attached file for the octopus xyz.hal.
SPI and UART are activated on the Pi and i already did a rewiring of the whole thing.
I'm tottaly new to LinuxCNC so i would really appreciate your help on this.

Thanks! peter

 

File Attachment:

File Name: debugoutput.txt
File Size:2 KB
Attachments:
Last edit: 04 Apr 2025 10:18 by Krimbles13.

Please Log in or Create an account to join the conversation.

More
04 Apr 2025 18:54 #325704 by cakeslob

TMC2209 Drivers with jumpers in SPI mode


try doing it without the drivers configured in SPI, but they should also probably be configured with UART instead if they are 2209. The Remora Octopus firmware doesnt support SPI drivers anyway. If you are planning to use TMC2209 drivers, they need to be configured in the config.txt file.

how long is the cable that connects the octopus to the rpi? Also what RPi? I dont think you need to have SPI enabled in the RPi software either. Your serial output looks perfect though, but you will need to configure the TMC drives.

Please Log in or Create an account to join the conversation.

More
05 Apr 2025 04:49 #325745 by Krimbles13
My cables are ~3in/7,5cm long and i use a Rpi 4b with the official LinuxCNC image.
Tried it with the jumpers in UART mode and the config from below, still the same error.
It tries to connect to the TMCs but fails according to the debugging.
Maybe my pin names for the rx pins are wrong but i can't find them in the BTT docs, only the CS pins are there.
 

File Attachment:

File Name: config-tmc.txt
File Size:1 KB
.
Attachments:

Please Log in or Create an account to join the conversation.

More
05 Apr 2025 15:16 #325767 by cakeslob
There needs to be motor power on for the TMC drives to configure. the CS pins are the Rx pins, but leave them in uart mode. the TMC spi is on the same channel as the comms SPI so idk what will happen if they interfere or something.
but first step is working out comms
does it connect to linuxcnc yet with the drivers in uart?

Please Log in or Create an account to join the conversation.

More
06 Apr 2025 10:52 #325808 by Krimbles13
Sorry for the supid question but how do i check for that?
Sorry, this is my first time working with linuxcnc and remora.
Just for info, i'm using the ini and hal from the remora-octopus sample
 

File Attachment:

File Name: config-tmc...4-06.txt
File Size:1 KB
 

File Attachment:

File Name: consoleoutput.txt
File Size:1 KB
 

File Attachment:

File Name: debugoutpu...TMCs.txt
File Size:3 KB
Attachments:

Please Log in or Create an account to join the conversation.

More
06 Apr 2025 16:23 #325819 by cakeslob
Hmm yeah the TMC drivers arent configuring, but that shouldnt be related to the SPI comms. Just remove the drivers until you can get it to connect.

The serial output looks good, and there is SPI stuff happening hmmm

in your halfile, try replacing this line to this line
loadrt remora-spi SPI_clk_div=32 PRU_base_freq=40000
The following user(s) said Thank You: Krimbles13

Please Log in or Create an account to join the conversation.

More
06 Apr 2025 17:51 #325826 by Krimbles13
Oh my god, thank you, it worked.
So I can get out of e-stop now, but my drivers are still not responding, but one thing at a time.

Please Log in or Create an account to join the conversation.

More
06 Apr 2025 18:55 #325830 by cakeslob
ok good,
the octopus you need to have power on the 2 spots in the power rail, the motor power and the main power

the jumpers so the 2209, i think there should just be the 1 jumper

Please Log in or Create an account to join the conversation.

More
06 Apr 2025 19:20 - 06 Apr 2025 19:41 #325832 by Krimbles13
Done that already and the thing i don't understand is, there is a current on the VS(24V) and the VIO(5V) pin of each driver but it still fails on the boot.
Also tried to use some TMC2209 v1.2 instead of the v1.3 i wanted but still no change.
Last edit: 06 Apr 2025 19:41 by Krimbles13.

Please Log in or Create an account to join the conversation.

More
06 Apr 2025 20:24 #325834 by cakeslob
Alright, the only other thing that stands out is the config. Im not sure if it would make an issue thought, but try anyways I guess. Flip around the order, not sure if it matters but I havent tested the other way.

Also, try hitting the reset button after stuff it booted, see if it does something
{
	"Thread": "Base",
	"Type": "Stepgen",
		"Comment":			"X - Joint 0 step generator",
		"Joint Number":		0,
		"Step Pin": 		"PF_13",
		"Direction Pin": 	"PF_12",
		"Enable Pin": 		"PF_14"
	},
	{
	"Thread": "On load",
	"Type": "TMC2209",
		"Comment":			"X - Joint 0 TMC driver",
		"RX pin": 			"PC_4",
		"RSense":			0.11,
		"Current":			800,
		"Microsteps":		16,
		"Stealth chop":		"on",
		"Stall sensitivity":0
	},
The following user(s) said Thank You: Krimbles13

Please Log in or Create an account to join the conversation.

Time to create page: 0.142 seconds
Powered by Kunena Forum