Remora - Rpi Software Stepping Using External Microcontroller via SPI

More
07 Sep 2025 18:34 - 07 Sep 2025 18:36 #334585 by amanker
Can anyone help me in setting up remora on btt skr3 board. I have posted my config files on previous posts. 
Now can I can make LinuxCNC to come out of estop. But stepper don't move, not even slightly. Don't feel like stepper is energized. Getting joint following error. LinuxCNC display dev/ttyAMA10 device, I connected through minicom but can't get any output on screen. 
PS. I am not new to remora, earlier I was using on Octopus pro board, now when newer Remora supported TMC5160 on skr3, so I changed the board.
Last edit: 07 Sep 2025 18:36 by amanker.

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

More
08 Sep 2025 14:40 #334627 by amanker
I can see remora input or joint cmd in HAL Meter. But nothing happnes in GUI. If I press limit switch, I can see remora input in HAL Meter but there is no msg regarding limit switch in GUI. 

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

More
08 Sep 2025 15:28 #334634 by oodanner
Have you tried to open the HAL configuration after the axis gui comes up and add in the pins you want to monitor. I would have the SPI status and enable pins there to check and see if your SPI connection is stable. I initially had a problem with the board I was using not getting a good flash and I had to use the BTT tool they talk about in their wiki to rewrite the original firmware before I could load the Remora firmware.bin to the root of the SD card and then it finally loaded the firmware correctly. I also ran into some issues with the firmware constantly resetting itself if I tried certain settings in my config.txt file. This is what I currently have in the conifg.txt file which may not be helpful since I'm running an Octopus v1.1 board.

{
"Board": "BIGTREETECH OCTOPUS PRO V1.1 STM32F446",
"Modules": [
{
"Thread": "Servo",
"Type": "Digital Pin",
"Comment": "X-min endstop",
"Pin": "PG_9",
"Mode": "Input",
"Invert": "True",
"Data Bit": "1",
"Modifier": "Pull Up"
},
{
"Thread": "Servo",
"Type": "Digital Pin",
"Comment": "Y1-min endstop (left Y motor)",
"Pin": "PG_10",
"Mode": "Input",
"Invert": "True",
"Data Bit": "2",
"Modifier": "Pull Up"
},
{
"Thread": "Servo",
"Type": "Digital Pin",
"Comment": "Y2-min endstop (right Y motor)",
"Pin": "PG_11",
"Mode": "Input",
"Invert": "True",
"Data Bit": "3",
"Modifier": "Pull Up"
},
{
"Thread": "Servo",
"Type": "Digital Pin",
"Comment": "Z-min endstop",
"Pin": "PG_12",
"Mode": "Input",
"Invert": "True",
"Data Bit": "4",
"Modifier": "Pull Up"
},
{
"Thread": "Servo",
"Type": "Digital Pin",
"Comment": "E-stop input",
"Pin": "PG_15",
"Mode": "Input",
"Invert": "True",
"Data Bit": "5",
"Modifier": "Pull Up"
},
{
"Thread": "Servo",
"Type": "Digital Pin",
"Comment": "Probe input",
"Pin": "PB_7",
"Mode": "Input",
"Data Bit": "6",
"Modifier": "Pull Up"
},
{
"Thread": "Servo",
"Type": "Digital Pin",
"Comment": "Coolant flood",
"Pin": "PD_12",
"Mode": "Output",
"Data Bit": "1"
},
{
"Thread": "Servo",
"Type": "Digital Pin",
"Comment": "Coolant mist",
"Pin": "PD_13",
"Mode": "Output",
"Data Bit": "2"
},
{
"Thread": "Base",
"Type": "Stepgen",
"Comment": "X-axis - Stepper Driver 0",
"Joint Number": 0,
"Step Pin": "PF_13",
"Direction Pin": "PF_12",
"Enable Pin": "PF_14"
},
{
"Thread": "Base",
"Type": "Stepgen",
"Comment": "Y1-axis (left Y motor) - Stepper Driver 1",
"Joint Number": 1,
"Step Pin": "PG_0",
"Direction Pin": "PG_1",
"Enable Pin": "PF_15"
},
{
"Thread": "Base",
"Type": "Stepgen",
"Comment": "Y2-axis (right Y motor) - Stepper Driver 2",
"Joint Number": 2,
"Step Pin": "PF_11",
"Direction Pin": "PG_3",
"Enable Pin": "PG_5"
},
{
"Thread": "Base",
"Type": "Stepgen",
"Comment": "Z-axis - Stepper Driver 3",
"Joint Number": 3,
"Step Pin": "PG_4",
"Direction Pin": "PC_1",
"Enable Pin": "PA_0"
},
{
"Thread": "Servo",
"Type": "Reset Pin",
"Comment": "Reset pin",
"Pin": "PC_15"
}
]
}

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

More
08 Sep 2025 17:22 #334641 by amanker
Yes I checked spi status. There was no problem. I also added Blink module to check if firmware is flashed correctly and working. I too had octopus pro board. But I wanted tmc5160 drivers working so I bought skr3. I can see signals in hal meter, but in GUI I am getting No signals what ever

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

More
08 Sep 2025 18:50 #334646 by oodanner
On the bright side I figured out what my problem was. I had followed the documentation with recommended the preconfigured xpatria raspberry pi build and that did make getting everything up and running easy but, I didn't think to git clone the newer Remora developments since that image was released so I was running the older halcompiled remora-spi which I'm sure now was causing me issues. Now that I have pulled the most recent Remora version and compiled remora-spi again with halcompile like the docuementation says to do, although I noticed that in an earlier post it was mentioned that you no longer need the SPI_clk_div=32 after the loadrt remora-spi component in the HAL file but, mine wouldn't come out of estop until I added that back into the line. I also had a grounding issue and some EMI issues that collectively were causing my spindle to throw errors and after that and the correct version of firmware on the Octopus and most recent Remora branch then it looks like I'm good now.:-)

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

More
08 Sep 2025 19:21 #334648 by amanker
I have tested my rpi5 installation with octopus pro. Black pill and ec500 controller all are working. But now I am stuck on skr3.
@scotta @cakeslob please help.

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

More
09 Sep 2025 18:04 #334722 by amanker
Waiting for some reply from devs @scotta @cakeslob

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

More
09 Sep 2025 20:40 #334730 by scotta
Hi, please share your config files. If signals can be seen in Hal Meter there must be another config issue.

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

More
10 Sep 2025 04:21 #334742 by amanker

I was using Octopus Pro Board for LinuxCNC. That one is giving some problems. So I bought new board BTT SKR3 so that I can use TMC5160. Can anyone help me setting up its config.txt and LinuxCNC configuration. And connection diagram. I have wired it as per SKR2 board. Pinouts of both boards seems similar. I cant get Machine out of estop. I think there is no communication between rpi and skr3.
Remora.ini
# Basic LinuxCNC config for testing of Remora firmware

[EMC]
MACHINE = Remora-XYZ
DEBUG = 0
VERSION = 1.1

[DISPLAY]
DISPLAY = axis
EDITOR = gedit
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
ARCDIVISION = 64
GRIDS = 10mm 20mm 50mm 100mm
MAX_FEED_OVERRIDE = 1.2
MIN_SPINDLE_OVERRIDE = 0.5
MAX_SPINDLE_OVERRIDE = 1.2
DEFAULT_LINEAR_VELOCITY = 50.00
MIN_LINEAR_VELOCITY = 0
MAX_LINEAR_VELOCITY = 200.00
DEFAULT_ANGULAR_VELOCITY = 36.00
MIN_ANGULAR_VELOCITY = 0
MAX_ANGULAR_VELOCITY = 45.00
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = ~/linuxcnc/nc_files
INCREMENTS = 50mm 10mm 5mm 1mm .5mm .1mm .05mm .01mm

[KINS]
JOINTS = 3
#KINEMATICS =trivkins coordinates=XYZ kinstype=BOTH
KINEMATICS =trivkins coordinates=XYZ

[FILTER]
PROGRAM_EXTENSION = .py Python Script
py = python

[TASK]
TASK = milltask
CYCLE_TIME = 0.010

[RS274NGC]
PARAMETER_FILE = linuxcnc.var

[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
COMM_WAIT = 0.010
BASE_PERIOD = 0
SERVO_PERIOD = 1000000

[HAL]
HALFILE = remora.hal
POSTGUI_HALFILE = postgui_call_list.hal

[TRAJ]
COORDINATES =  X Y Z 
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_LINEAR_VELOCITY = 50.00
MAX_LINEAR_VELOCITY = 200.00
NO_FORCE_HOMING = 1 

[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl

[AXIS_X]
MAX_VELOCITY = 500
MAX_ACCELERATION = 1000.0
MIN_LIMIT = -500
MAX_LIMIT = 500.0

[JOINT_0]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = -500.0
MAX_LIMIT = 500.0
MAX_VELOCITY = 500.0
MAX_ACCELERATION = 1000.0
STEPGEN_MAXACCEL = 2000.0
SCALE = 200.0
FERROR = 2
MIN_FERROR = 2.0
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0
HOME_LATCH_VEL = 0
HOME_SEQUENCE = 0

[AXIS_Y]
MAX_VELOCITY = 250.0
MAX_ACCELERATION = 750.0
MIN_LIMIT = -300.0
MAX_LIMIT = 300.0

[JOINT_1]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = -300.0
MAX_LIMIT = 300.0
MAX_VELOCITY = 250.0
MAX_ACCELERATION = 750.0
STEPGEN_MAXACCEL = 2000.0
SCALE = 80.0
FERROR = 9.0
MIN_FERROR = 5.0
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0
HOME_LATCH_VEL = 0
HOME_SEQUENCE = 0

[AXIS_Z]
OFFSET_AV_RATIO = 0.2
MAX_VELOCITY = 5.0
MAX_ACCELERATION = 200.0
MIN_LIMIT = -280
MAX_LIMIT = 280

[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = -280
MAX_LIMIT = 280
MAX_VELOCITY = 5.0
MAX_ACCELERATION = 200.0
STEPGEN_MAXACCEL = 3000.0
SCALE = 400.0
FERROR = 5
MIN_FERROR = 1.0
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0
HOME_LATCH_VEL = 0
HOME_SEQUENCE = 0


remora.hal

[code]# load the realtime components

    loadrt [KINS]KINEMATICS
    loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS

    loadrt remora-spi
    #loadrt remora_lpc chip_type=LPC SPI_clk_div=64


# estop loopback, SPI comms enable and feedback
    net user-enable-out     <= iocontrol.0.user-enable-out        => remora.SPI-enable
    net user-request-enable <= iocontrol.0.user-request-enable    => remora.SPI-reset
    net remora-status     <= remora.SPI-status             => iocontrol.0.emc-enable-in
    

# add the remora and motion functions to threads

    addf remora.read servo-thread
    addf motion-command-handler servo-thread
    addf motion-controller servo-thread
    addf remora.update-freq servo-thread
    addf remora.write servo-thread


# Joint 0 setup

    setp remora.joint.0.scale         [JOINT_0]SCALE
    setp remora.joint.0.maxaccel     [JOINT_0]STEPGEN_MAXACCEL

    net xpos-cmd         <= joint.0.motor-pos-cmd     => remora.SP.0  joint.0.motor-pos-fb
#    net j0pos-fb         <= remora.joint.0.pos-fb     => joint.0.motor-pos-fb
#    net j0enable         <= joint.0.amp-enable-out     => remora.joint.0.enable


# Joint 1 setup

    setp remora.joint.1.scale         [JOINT_1]SCALE
    setp remora.joint.1.maxaccel     [JOINT_1]STEPGEN_MAXACCEL

    net j1pos-cmd         <= joint.1.motor-pos-cmd     => remora.joint.1.pos-cmd
    net j1pos-fb         <= remora.joint.1.pos-fb     => joint.1.motor-pos-fb 
    net j1enable         <= joint.1.amp-enable-out     => remora.joint.1.enable


# Joint 2 setup

    setp remora.joint.2.scale         [JOINT_2]SCALE
    setp remora.joint.2.maxaccel     [JOINT_2]STEPGEN_MAXACCEL

    net j2pos-cmd         <= joint.2.motor-pos-cmd     => remora.joint.2.pos-cmd
    net j2pos-fb         <= remora.joint.2.pos-fb     => joint.2.motor-pos-fb
    net j2enable         <= joint.2.amp-enable-out     => remora.joint.2.enable




config.txt
[code]{
    "Board": "BIGTREETECH SKR v3",
    "Modules":[
    {
    "Thread": "Servo",
    "Type": "Reset Pin",
        "Comment":            "Reset pin",
        "Pin":                "PC_4"
    },
    {
    "Thread": "On load",
    "Type": "Motor Power",
        "Comment": "Enable motor power SKR2",
        "Pin":                     "PC_13"
    },
    {
    "Thread": "Base",
    "Type": "Stepgen",
        "Comment":            "X - Joint 0 step generator",
        "Joint Number":        0,
        "Step Pin":         "PD_4",
        "Direction Pin":     "PD_3",
        "Enable Pin":         "PD_6"
    },
    {
    "Thread": "Base",
    "Type": "Stepgen",
        "Comment":            "Y - Joint 1 step generator",
        "Joint Number":        1,
        "Step Pin":         "PA_15",
        "Direction Pin":     "PA_8",
        "Enable Pin":         "PD_1"
    },
    {
    "Thread": "Base",
    "Type": "Stepgen",
        "Comment":            "Z - Joint 2 step generator",
        "Joint Number":        2,
        "Step Pin":         "PE_2",
        "Direction Pin":     "PE_3",
        "Enable Pin":         "PE_0"
    },

    {
    "Thread": "Servo",
    "Type": "Digital Pin",
        "Comment":            "X min",
        "Pin":                "PC_1",
        "Mode":                "Input",
        "Data Bit":            0
    },
    {
    "Thread": "Servo",
    "Type": "Digital Pin",
        "Comment":            "X max",
        "Pin":                "PC_2",
        "Mode":                "Input",
        "Data Bit":            1
    },
    {
    "Thread": "Servo",
    "Type": "Digital Pin",
        "Comment":            "Y min",
        "Pin":                "PC_3",
        "Mode":                "Input",
        "Data Bit":            2
    },
    {
    "Thread": "Servo",
    "Type": "Digital Pin",
        "Comment":            "Y max",
        "Pin":                "PA_0",
        "Mode":                "Input",
        "Data Bit":            3
    },
    {
    "Thread": "Servo",
    "Type": "Digital Pin",
        "Comment":            "Z min",
        "Pin":                "PC_0",
        "Mode":                "Input",
        "Data Bit":            4
    },
    {
    "Thread": "Servo",
    "Type": "Digital Pin",
        "Comment":            "Z max",
        "Pin":                "PC_15",
        "Mode":                "Input",
        "Data Bit":            5

    }
    ]
}
[/code][/code]

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

More
10 Sep 2025 17:48 #334783 by amanker
@scotta it would be really helpful if you can post sample config files. Or if I need to completely erase skr3 and reflash using stm32cube programmer?

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

Time to create page: 0.142 seconds
Powered by Kunena Forum