Remora - Rpi Software Stepping Using External Microcontroller via SPI

More
1 year 1 month ago #335160 by amanker
Finally I got it working. I shortened the spi cables, reduced spi frequency, tried erasing and flashing remora via stm32cube, nothing worked. But after some time it automagically started working. I don't know how it worked?

Please Log in to join the conversation.

More
1 year 1 month ago #335163 by Gusgus
Hello once again!

I haven't really been active but we got to testing once again and now I have encountered another issue I don't understand. 

So now we get movement and stable connection to the octopus, we got an spi cable with shielding and that worked wonders, thank you tommylight for the suggestion and thanks Scotta for all the help. 

The issue we are encountering now is that we have x y1 y2 and z, but we only get movement from x and y1, y2 and z are completely unresponsive, we have eliminated the drivers and their wiring since if we connect the y2 and z terminals to the x and y1 outputs on the octopus we get movement from them.

We have them wired to the octopus' Motor 4, 5, 6, and 7 ports, which are decleared in the following config:
Code:
[color=#d4d4d4]{[/color][color=#9cdcfe]"Board"[/color][color=#d4d4d4]: [/color][color=#ce9178]"BIGTREETECH Octopus Pro"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Modules"[/color][color=#d4d4d4]:[[/color][color=#d4d4d4]{[/color][color=#9cdcfe]"Thread"[/color][color=#d4d4d4]: [/color][color=#ce9178]"Servo"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Type"[/color][color=#d4d4d4]: [/color][color=#ce9178]"Reset Pin"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Comment"[/color][color=#d4d4d4]: [/color][color=#ce9178]"Reset pin"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Pin"[/color][color=#d4d4d4]: [/color][color=#ce9178]"PC_15"[/color][color=#d4d4d4]},[/color][color=#d4d4d4]{[/color][color=#9cdcfe]"Thread"[/color][color=#d4d4d4]: [/color][color=#ce9178]"Servo"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Type"[/color][color=#d4d4d4]: [/color][color=#ce9178]"eStop"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Comment"[/color][color=#d4d4d4]: [/color][color=#ce9178]"eStop"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Pin"[/color][color=#d4d4d4]: [/color][color=#ce9178]"PG_12"[/color][color=#d4d4d4]},[/color][color=#d4d4d4]{[/color][color=#9cdcfe]"Thread"[/color][color=#d4d4d4]: [/color][color=#ce9178]"Servo"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Type"[/color][color=#d4d4d4]: [/color][color=#ce9178]"PWM"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Comment"[/color][color=#d4d4d4]: [/color][color=#ce9178]"Spindle"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"SP[i]"[/color][color=#d4d4d4]: [/color][color=#b5cea8]3[/color][color=#d4d4d4],[/color][color=#9cdcfe]"PWM Pin"[/color][color=#d4d4d4]: [/color][color=#ce9178]"PB_0"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"PWM Max"[/color][color=#d4d4d4]: [/color][color=#b5cea8]255[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Hardware PWM"[/color][color=#d4d4d4]: [/color][color=#ce9178]"True"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Variable Freq"[/color][color=#d4d4d4]: [/color][color=#ce9178]"True"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Period SP[i]"[/color][color=#d4d4d4]: [/color][color=#b5cea8]1[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Period us"[/color][color=#d4d4d4]: [/color][color=#b5cea8]200[/color][color=#d4d4d4]},[/color][color=#d4d4d4]{[/color][color=#9cdcfe]"Thread"[/color][color=#d4d4d4]: [/color][color=#ce9178]"Base"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Type"[/color][color=#d4d4d4]: [/color][color=#ce9178]"Stepgen"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Comment"[/color][color=#d4d4d4]: [/color][color=#ce9178]"X - Joint 0 step generator"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Joint Number"[/color][color=#d4d4d4]: [/color][color=#b5cea8]0[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Step Pin"[/color][color=#d4d4d4]: [/color][color=#ce9178]"PF_9"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Direction Pin"[/color][color=#d4d4d4]: [/color][color=#ce9178]"PF_10"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Enable Pin"[/color][color=#d4d4d4]: [/color][color=#ce9178]"PG_2"[/color][color=#d4d4d4]},[/color][color=#d4d4d4]{[/color][color=#9cdcfe]"Thread"[/color][color=#d4d4d4]: [/color][color=#ce9178]"Base"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Type"[/color][color=#d4d4d4]: [/color][color=#ce9178]"Stepgen"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Comment"[/color][color=#d4d4d4]: [/color][color=#ce9178]"Y1 - Joint 1 step generator"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Joint Number"[/color][color=#d4d4d4]: [/color][color=#b5cea8]1[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Step Pin"[/color][color=#d4d4d4]: [/color][color=#ce9178]"PC_13"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Direction Pin"[/color][color=#d4d4d4]: [/color][color=#ce9178]"PF_0"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Enable Pin"[/color][color=#d4d4d4]: [/color][color=#ce9178]"PF_1"[/color][color=#d4d4d4]},[/color][color=#d4d4d4]{[/color][color=#9cdcfe]"Thread"[/color][color=#d4d4d4]: [/color][color=#ce9178]"Base"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Type"[/color][color=#d4d4d4]: [/color][color=#ce9178]"Stepgen"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Comment"[/color][color=#d4d4d4]: [/color][color=#ce9178]"Y2 - Joint 1 step generator"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Joint Number"[/color][color=#d4d4d4]: [/color][color=#b5cea8]1[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Step Pin"[/color][color=#d4d4d4]: [/color][color=#ce9178]"PE_2"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Direction Pin"[/color][color=#d4d4d4]: [/color][color=#ce9178]"PE_3"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Enable Pin"[/color][color=#d4d4d4]: [/color][color=#ce9178]"PD_4"[/color][color=#d4d4d4]},[/color][color=#d4d4d4]{[/color][color=#9cdcfe]"Thread"[/color][color=#d4d4d4]: [/color][color=#ce9178]"Base"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Type"[/color][color=#d4d4d4]: [/color][color=#ce9178]"Stepgen"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Comment"[/color][color=#d4d4d4]: [/color][color=#ce9178]"Z - Joint 2 step generator"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Joint Number"[/color][color=#d4d4d4]: [/color][color=#b5cea8]2[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Step Pin"[/color][color=#d4d4d4]: [/color][color=#ce9178]"PE_6"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Direction Pin"[/color][color=#d4d4d4]: [/color][color=#ce9178]"PA_14"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Enable Pin"[/color][color=#d4d4d4]: [/color][color=#ce9178]"PE_0"[/color][color=#d4d4d4]},[/color][color=#d4d4d4]{[/color][color=#9cdcfe]"Thread"[/color][color=#d4d4d4]: [/color][color=#ce9178]"Servo"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Type"[/color][color=#d4d4d4]: [/color][color=#ce9178]"Digital Pin"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Comment"[/color][color=#d4d4d4]: [/color][color=#ce9178]"X min"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Pin"[/color][color=#d4d4d4]: [/color][color=#ce9178]"PG_6"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Mode"[/color][color=#d4d4d4]: [/color][color=#ce9178]"Input"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Data Bit"[/color][color=#d4d4d4]: [/color][color=#b5cea8]0[/color][color=#d4d4d4]},[/color][color=#d4d4d4]{[/color][color=#9cdcfe]"Thread"[/color][color=#d4d4d4]: [/color][color=#ce9178]"Servo"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Type"[/color][color=#d4d4d4]: [/color][color=#ce9178]"Digital Pin"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Comment"[/color][color=#d4d4d4]: [/color][color=#ce9178]"Y min"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Pin"[/color][color=#d4d4d4]: [/color][color=#ce9178]"PG_9"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Mode"[/color][color=#d4d4d4]: [/color][color=#ce9178]"Input"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Data Bit"[/color][color=#d4d4d4]: [/color][color=#b5cea8]1[/color][color=#d4d4d4]},[/color][color=#d4d4d4]{[/color][color=#9cdcfe]"Thread"[/color][color=#d4d4d4]: [/color][color=#ce9178]"Servo"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Type"[/color][color=#d4d4d4]: [/color][color=#ce9178]"Digital Pin"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Comment"[/color][color=#d4d4d4]: [/color][color=#ce9178]"Z min"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Pin"[/color][color=#d4d4d4]: [/color][color=#ce9178]"PG_10"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Mode"[/color][color=#d4d4d4]: [/color][color=#ce9178]"Input"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Data Bit"[/color][color=#d4d4d4]: [/color][color=#b5cea8]2[/color][color=#d4d4d4]},[/color][color=#d4d4d4]{[/color][color=#9cdcfe]"Thread"[/color][color=#d4d4d4]: [/color][color=#ce9178]"Servo"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Type"[/color][color=#d4d4d4]: [/color][color=#ce9178]"Digital Pin"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Comment"[/color][color=#d4d4d4]: [/color][color=#ce9178]"Probe"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Pin"[/color][color=#d4d4d4]: [/color][color=#ce9178]"PG_11"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Mode"[/color][color=#d4d4d4]: [/color][color=#ce9178]"Input"[/color][color=#d4d4d4],[/color][color=#9cdcfe]"Data Bit"[/color][color=#d4d4d4]: [/color][color=#b5cea8]3[/color][color=#d4d4d4]}[/color][color=#d4d4d4]][/color][color=#d4d4d4]}[/color]

We are running this in our .ini file:
Code:
[color=#6a9955]# Basic LinuxCNC config for testing of Remora firmware[/color] [color=#d4d4d4][EMC][/color][color=#569cd6]MACHINE[/color][color=#d4d4d4] = Remora-XYZ[/color][color=#569cd6]DEBUG[/color][color=#d4d4d4] = 0[/color][color=#569cd6]VERSION[/color][color=#d4d4d4] = 1.1[/color] [color=#d4d4d4][DISPLAY][/color][color=#569cd6]DISPLAY[/color][color=#d4d4d4] = axis[/color][color=#569cd6]EDITOR[/color][color=#d4d4d4] = gedit[/color][color=#569cd6]POSITION_OFFSET[/color][color=#d4d4d4] = RELATIVE[/color][color=#569cd6]POSITION_FEEDBACK[/color][color=#d4d4d4] = ACTUAL[/color][color=#569cd6]ARCDIVISION[/color][color=#d4d4d4] = 64[/color][color=#569cd6]GRIDS[/color][color=#d4d4d4] = 10mm 20mm 50mm 100mm[/color][color=#569cd6]MAX_FEED_OVERRIDE[/color][color=#d4d4d4] = 1.2[/color][color=#569cd6]MIN_SPINDLE_OVERRIDE[/color][color=#d4d4d4] = 0.5[/color][color=#569cd6]MAX_SPINDLE_OVERRIDE[/color][color=#d4d4d4] = 1.2[/color][color=#569cd6]DEFAULT_LINEAR_VELOCITY[/color][color=#d4d4d4] = 28.7[/color][color=#569cd6]MIN_LINEAR_VELOCITY[/color][color=#d4d4d4] = 0[/color][color=#569cd6]MAX_LINEAR_VELOCITY[/color][color=#d4d4d4] = 28.7[/color][color=#569cd6]DEFAULT_ANGULAR_VELOCITY[/color][color=#d4d4d4] = 28.7[/color][color=#569cd6]MIN_ANGULAR_VELOCITY[/color][color=#d4d4d4] = 0[/color][color=#569cd6]MAX_ANGULAR_VELOCITY[/color][color=#d4d4d4] = 28.7[/color][color=#569cd6]INTRO_GRAPHIC[/color][color=#d4d4d4] = linuxcnc.gif[/color][color=#569cd6]INTRO_TIME[/color][color=#d4d4d4] = 5[/color][color=#569cd6]PROGRAM_PREFIX[/color][color=#d4d4d4] = ~/linuxcnc/nc_files[/color][color=#569cd6]INCREMENTS[/color][color=#d4d4d4] = 50mm 10mm 5mm 1mm .5mm .1mm .05mm .01mm[/color] [color=#d4d4d4][KINS][/color][color=#569cd6]JOINTS[/color][color=#d4d4d4] = 3[/color][color=#6a9955]#KINEMATICS =trivkins coordinates=XYZ kinstype=BOTH[/color][color=#569cd6]KINEMATICS[/color][color=#d4d4d4] =trivkins [/color][color=#569cd6]coordinates[/color][color=#d4d4d4]=XYZ[/color] [color=#d4d4d4][FILTER][/color][color=#569cd6]PROGRAM_EXTENSION[/color][color=#d4d4d4] = .py Python Script[/color][color=#569cd6]py[/color][color=#d4d4d4] = python[/color] [color=#d4d4d4][TASK][/color][color=#569cd6]TASK[/color][color=#d4d4d4] = milltask[/color][color=#569cd6]CYCLE_TIME[/color][color=#d4d4d4] = 0.010[/color] [color=#d4d4d4][RS274NGC][/color][color=#569cd6]PARAMETER_FILE[/color][color=#d4d4d4] = linuxcnc.var[/color] [color=#d4d4d4][EMCMOT][/color][color=#569cd6]EMCMOT[/color][color=#d4d4d4] = motmod[/color][color=#569cd6]COMM_TIMEOUT[/color][color=#d4d4d4] = 1.0[/color][color=#569cd6]COMM_WAIT[/color][color=#d4d4d4] = 0.010[/color][color=#569cd6]BASE_PERIOD[/color][color=#d4d4d4] = 0[/color][color=#569cd6]SERVO_PERIOD[/color][color=#d4d4d4] = 5000000[/color] [color=#d4d4d4][HAL][/color][color=#569cd6]HALFILE[/color][color=#d4d4d4] = remora-xyz.hal[/color][color=#569cd6]POSTGUI_HALFILE[/color][color=#d4d4d4] = postgui_call_list.hal[/color] [color=#d4d4d4][TRAJ][/color][color=#569cd6]COORDINATES[/color][color=#d4d4d4] = X Y Z [/color][color=#569cd6]LINEAR_UNITS[/color][color=#d4d4d4] = mm[/color][color=#569cd6]ANGULAR_UNITS[/color][color=#d4d4d4] = degree[/color][color=#569cd6]CYCLE_TIME[/color][color=#d4d4d4] = 0.010[/color][color=#569cd6]DEFAULT_LINEAR_VELOCITY[/color][color=#d4d4d4] = 4.17[/color][color=#569cd6]MAX_LINEAR_VELOCITY[/color][color=#d4d4d4] = 28.7[/color][color=#569cd6]NO_FORCE_HOMING[/color][color=#d4d4d4] = 1 [/color] [color=#d4d4d4][EMCIO][/color][color=#569cd6]EMCIO[/color][color=#d4d4d4] = io[/color][color=#569cd6]CYCLE_TIME[/color][color=#d4d4d4] = 0.100[/color][color=#569cd6]TOOL_TABLE[/color][color=#d4d4d4] = tool.tbl[/color] [color=#6a9955]#*** AXIS_X *******************************[/color][color=#d4d4d4][AXIS_X][/color][color=#569cd6]MAX_VELOCITY[/color][color=#d4d4d4] = 28.7[/color][color=#569cd6]MAX_ACCELERATION[/color][color=#d4d4d4] = 287.0[/color][color=#569cd6]MIN_LIMIT[/color][color=#d4d4d4] = -0.001[/color][color=#569cd6]MAX_LIMIT[/color][color=#d4d4d4] = 1080.0[/color] [color=#d4d4d4][JOINT_0][/color][color=#569cd6]TYPE[/color][color=#d4d4d4] = LINEAR[/color][color=#569cd6]HOME[/color][color=#d4d4d4] = 0.0[/color][color=#569cd6]MIN_LIMIT[/color][color=#d4d4d4] = -0.001[/color][color=#569cd6]MAX_LIMIT[/color][color=#d4d4d4] = 1080.0[/color][color=#569cd6]MAX_VELOCITY[/color][color=#d4d4d4] = 28.7[/color][color=#569cd6]MAX_ACCELERATION[/color][color=#d4d4d4] = 287.0[/color][color=#569cd6]STEPGEN_MAXACCEL[/color][color=#d4d4d4] = 1000.0[/color][color=#569cd6]SCALE[/color][color=#d4d4d4] = 100.0[/color][color=#569cd6]FERROR[/color][color=#d4d4d4] = 5.0[/color][color=#569cd6]MIN_FERROR[/color][color=#d4d4d4] = 5.0[/color][color=#569cd6]HOME_OFFSET[/color][color=#d4d4d4] = 0.000000[/color][color=#569cd6]HOME_SEARCH_VEL[/color][color=#d4d4d4] = -45.000000[/color][color=#569cd6]HOME_LATCH_VEL[/color][color=#d4d4d4] = -2.500000[/color][color=#569cd6]HOME_SEQUENCE[/color][color=#d4d4d4] = 1[/color][color=#6a9955]#******************************************[/color] [color=#6a9955]#*** AXIS_Y *******************************[/color][color=#d4d4d4][AXIS_Y][/color][color=#569cd6]MAX_VELOCITY[/color][color=#d4d4d4] = 28.7[/color][color=#569cd6]MAX_ACCELERATION[/color][color=#d4d4d4] = 287.0[/color][color=#569cd6]MIN_LIMIT[/color][color=#d4d4d4] = -0.001[/color][color=#569cd6]MAX_LIMIT[/color][color=#d4d4d4] = 950.0[/color] [color=#d4d4d4][JOINT_1][/color][color=#569cd6]TYPE[/color][color=#d4d4d4] = LINEAR[/color][color=#569cd6]HOME[/color][color=#d4d4d4] = 0.0[/color][color=#569cd6]MIN_LIMIT[/color][color=#d4d4d4] = -0.001[/color][color=#569cd6]MAX_LIMIT[/color][color=#d4d4d4] = 950.0[/color][color=#569cd6]MAX_VELOCITY[/color][color=#d4d4d4] = 28.7[/color][color=#569cd6]MAX_ACCELERATION[/color][color=#d4d4d4] = 287.0[/color][color=#569cd6]STEPGEN_MAXACCEL[/color][color=#d4d4d4] = 1000.0[/color][color=#569cd6]SCALE[/color][color=#d4d4d4] = 100.0[/color][color=#569cd6]FERROR[/color][color=#d4d4d4] = 5.0[/color][color=#569cd6]MIN_FERROR[/color][color=#d4d4d4] = 5.0[/color][color=#569cd6]HOME_OFFSET[/color][color=#d4d4d4] = 0.000000[/color][color=#569cd6]HOME_SEARCH_VEL[/color][color=#d4d4d4] = -45.000000[/color][color=#569cd6]HOME_LATCH_VEL[/color][color=#d4d4d4] = 2.500000[/color][color=#569cd6]HOME_SEQUENCE[/color][color=#d4d4d4] = 2[/color][color=#6a9955]#******************************************[/color] [color=#6a9955]#*** AXIS_Z *******************************[/color][color=#d4d4d4][AXIS_Z][/color][color=#569cd6]MAX_VELOCITY[/color][color=#d4d4d4] = 20.0[/color][color=#569cd6]MAX_ACCELERATION[/color][color=#d4d4d4] = 150.0[/color][color=#569cd6]MIN_LIMIT[/color][color=#d4d4d4] = -125.0[/color][color=#569cd6]MAX_LIMIT[/color][color=#d4d4d4] = 0.001[/color] [color=#d4d4d4][JOINT_2][/color][color=#569cd6]TYPE[/color][color=#d4d4d4] = LINEAR[/color][color=#569cd6]HOME[/color][color=#d4d4d4] = 0.0[/color][color=#569cd6]MIN_LIMIT[/color][color=#d4d4d4] = -125.0[/color][color=#569cd6]MAX_LIMIT[/color][color=#d4d4d4] = 0.001[/color][color=#569cd6]MAX_VELOCITY[/color][color=#d4d4d4] = 20[/color][color=#569cd6]MAX_ACCELERATION[/color][color=#d4d4d4] = 150.0[/color][color=#569cd6]STEPGEN_MAXACCEL[/color][color=#d4d4d4] = 187.5[/color][color=#569cd6]SCALE[/color][color=#d4d4d4] = 800.0[/color][color=#569cd6]FERROR[/color][color=#d4d4d4] = 5.0[/color][color=#569cd6]MIN_FERROR[/color][color=#d4d4d4] = 5.0[/color][color=#569cd6]HOME_OFFSET[/color][color=#d4d4d4] = 0.000000[/color][color=#569cd6]HOME_SEARCH_VEL[/color][color=#d4d4d4] = 15.000000[/color][color=#569cd6]HOME_LATCH_VEL[/color][color=#d4d4d4] = 0.625000[/color][color=#569cd6]HOME_SEQUENCE[/color][color=#d4d4d4] = 0[/color][color=#6a9955]#******************************************[/color]  

and this in our .hal file:
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 SPI_num=0 CS_num=0 SPI_freq=2000000     #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.joint.0.pos-cmd       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 # inputs     #endstops     net X-min remora.input.01 => joint.0.home-sw-in      net Y-min remora.input.00 => joint.1.home-sw-in      net Z-min remora.input.02 => joint.2.home-sw-in 

[img


We flashed this firmware to it:  github.com/scottalford75/Remora/tree/mai...in/STM32F446/BTT_446

and are running the above mentioned config file.

we also tried looking at the debug info but nothing came up, here's the printout:
Code:
Creating a std module                                                                                                                                                                                                                                                                                         Remora PRU - Programmable Realtime Unit                                                                                                                                                                                                                                                                      Mbed-OS6                                                                                                                                                                                                                              Remora-spi Driver                                                                                                                                                ## Entering SETUP state                                                          1. Reading json configuration file                                               Mounting the filesystem... OK                                                    Opening "/fs/config.txt"... OK                                                   Json config file lenght = 1996                                                   Closing "/fs/config.txt"...  2. Setting up DMA and threads Initialising SPI1 slave Initialising DMA for SPI 3. Parsing json configuration file Config deserialisation - Deserialization succeeded 4. Config threads Creating thread 40000 Creating thread 1000 Creating thread 57600 5. Loading modules Servo thread object Reset pin Make Reset Pin at pin PC_15 Creating a std module Creating Pin @   port = GPIOC   pin = 15 Servo thread object eStop Make eStop at pin PG_12 Creating a std module Creating Pin @   port = GPIOG   pin = 12 Servo thread object Spindle Make PWM at pin PB_0 Creating a std module Creating variable frequency Hardware PWM at pin PB_0 Creating Pin @   port = GPIOB   pin = 0 Base thread object X - Joint 0 step generator Creating a std module Creating Pin @   port = GPIOG   pin = 2 Creating Pin @   port = GPIOF   pin = 9 Creating Pin @   port = GPIOF   pin = 10 Base thread object Y1 - Joint 1 step generator Creating a std module Creating Pin @   port = GPIOF   pin = 1 Creating Pin @   port = GPIOC   pin = 13 Creating Pin @   port = GPIOF   pin = 0 Base thread object Y2 - Joint 1 step generator Creating a std module Creating Pin @   port = GPIOD   pin = 4 Creating Pin @   port = GPIOE   pin = 2 Creating Pin @   port = GPIOE   pin = 3 Base thread object Z - Joint 2 step generator Creating a std module Creating Pin @   port = GPIOE   pin = 0 Creating Pin @   port = GPIOE   pin = 6 Creating Pin @   port = GPIOA   pin = 14 Servo thread object X min Make Digital Input at pin PG_6 Creating a std module   Setting pin as No Pull Creating Pin @   port = GPIOG   pin = 6 Servo thread object Y min Make Digital Input at pin PG_9 Creating a std module   Setting pin as No Pull Creating Pin @   port = GPIOG   pin = 9 Servo thread object Z min Make Digital Input at pin PG_10 Creating a std module   Setting pin as No Pull Creating Pin @   port = GPIOG   pin = 10 Servo thread object Probe Make Digital Input at pin PG_11 Creating a std module   Setting pin as No Pull Creating Pin @   port = GPIOG   pin = 11 ## Entering START state Starting the BASE thread Registering interrupt for interrupt number = 24         power on Timer 9 Starting the SERVO thread Registering interrupt for interrupt number = 25         power on Timer 10 ## Entering IDLE state ## Entering RUNNING state ## Entering RESET state    Resetting rxBuffer ## Entering IDLE state


All the pins are generated in the correct order it seem's, we are gonna test next the output signal strength, maybe the drivers don't have enough power on high state to start moving, even if everything is connected to the same ground.

 

Please Log in to join the conversation.

More
1 year 1 month ago #335165 by Gusgus
Code:
{ "Board": "BIGTREETECH Octopus Pro", "Modules":[ { "Thread": "Servo", "Type": "Reset Pin", "Comment": "Reset pin", "Pin": "PC_15" }, { "Thread": "Servo", "Type": "eStop", "Comment": "eStop", "Pin": "PG_12" }, { "Thread": "Servo", "Type": "PWM", "Comment": "Spindle", "SP[i]": 3, "PWM Pin": "PB_0", "PWM Max": 255, "Hardware PWM": "True", "Variable Freq": "True", "Period SP[i]": 1, "Period us": 200 }, { "Thread": "Base", "Type": "Stepgen", "Comment": "X - Joint 0 step generator", "Joint Number": 0, "Step Pin": "PF_9", "Direction Pin": "PF_10", "Enable Pin": "PG_2" }, { "Thread": "Base", "Type": "Stepgen", "Comment": "Y1 - Joint 1 step generator", "Joint Number": 1, "Step Pin": "PC_13", "Direction Pin": "PF_0", "Enable Pin": "PF_1" }, { "Thread": "Base", "Type": "Stepgen", "Comment": "Y2 - Joint 1 step generator", "Joint Number": 1, "Step Pin": "PE_2", "Direction Pin": "PE_3", "Enable Pin": "PD_4" }, { "Thread": "Base", "Type": "Stepgen", "Comment": "Z - Joint 2 step generator", "Joint Number": 2, "Step Pin": "PE_6", "Direction Pin": "PA_14", "Enable Pin": "PE_0" }, { "Thread": "Servo", "Type": "Digital Pin", "Comment": "X min", "Pin": "PG_6", "Mode": "Input", "Data Bit": 0 }, { "Thread": "Servo", "Type": "Digital Pin", "Comment": "Y min", "Pin": "PG_9", "Mode": "Input", "Data Bit": 1 }, { "Thread": "Servo", "Type": "Digital Pin", "Comment": "Z min", "Pin": "PG_10", "Mode": "Input", "Data Bit": 2 }, { "Thread": "Servo", "Type": "Digital Pin", "Comment": "Probe", "Pin": "PG_11", "Mode": "Input", "Data Bit": 3 } ] }
Code:
# 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 = 28.7 MIN_LINEAR_VELOCITY = 0 MAX_LINEAR_VELOCITY = 28.7 DEFAULT_ANGULAR_VELOCITY = 28.7 MIN_ANGULAR_VELOCITY = 0 MAX_ANGULAR_VELOCITY = 28.7 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 = 5000000 [HAL] HALFILE = remora-xyz.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 = 4.17 MAX_LINEAR_VELOCITY = 28.7 NO_FORCE_HOMING = 1 [EMCIO] EMCIO = io CYCLE_TIME = 0.100 TOOL_TABLE = tool.tbl #*** AXIS_X ******************************* [AXIS_X] MAX_VELOCITY = 28.7 MAX_ACCELERATION = 287.0 MIN_LIMIT = -0.001 MAX_LIMIT = 1080.0 [JOINT_0] TYPE = LINEAR HOME = 0.0 MIN_LIMIT = -0.001 MAX_LIMIT = 1080.0 MAX_VELOCITY = 28.7 MAX_ACCELERATION = 287.0 STEPGEN_MAXACCEL = 1000.0 SCALE = 100.0 FERROR = 5.0 MIN_FERROR = 5.0 HOME_OFFSET = 0.000000 HOME_SEARCH_VEL = -45.000000 HOME_LATCH_VEL = -2.500000 HOME_SEQUENCE = 1 #****************************************** #*** AXIS_Y ******************************* [AXIS_Y] MAX_VELOCITY = 28.7 MAX_ACCELERATION = 287.0 MIN_LIMIT = -0.001 MAX_LIMIT = 950.0 [JOINT_1] TYPE = LINEAR HOME = 0.0 MIN_LIMIT = -0.001 MAX_LIMIT = 950.0 MAX_VELOCITY = 28.7 MAX_ACCELERATION = 287.0 STEPGEN_MAXACCEL = 1000.0 SCALE = 100.0 FERROR = 5.0 MIN_FERROR = 5.0 HOME_OFFSET = 0.000000 HOME_SEARCH_VEL = -45.000000 HOME_LATCH_VEL = 2.500000 HOME_SEQUENCE = 2 #****************************************** #*** AXIS_Z ******************************* [AXIS_Z] MAX_VELOCITY = 20.0 MAX_ACCELERATION = 150.0 MIN_LIMIT = -125.0 MAX_LIMIT = 0.001 [JOINT_2] TYPE = LINEAR HOME = 0.0 MIN_LIMIT = -125.0 MAX_LIMIT = 0.001 MAX_VELOCITY = 20 MAX_ACCELERATION = 150.0 STEPGEN_MAXACCEL = 187.5 SCALE = 800.0 FERROR = 5.0 MIN_FERROR = 5.0 HOME_OFFSET = 0.000000 HOME_SEARCH_VEL = 15.000000 HOME_LATCH_VEL = 0.625000 HOME_SEQUENCE = 0 #******************************************

sorry i had a formatting error

Please Log in to join the conversation.

More
1 year 1 month ago #335167 by scotta
I would suggest setting up a configuration for 4 joints X Y Y Z. You should not be pointing multiple step generators at the same frequency command or command feedback.

Take a look at this 5 joint config where there are two joints assigned to the Z axis. You can do the same for your dual Y axes.

github.com/scottalford75/Remora/tree/mai...figSamples/hypercube

Please Log in to join the conversation.

More
1 year 1 week ago #336754 by fatih.d
Hi all, first post.

Could anyone point me to the right direction about using a 446 based board (Fysetc S6) with no SD card slot?

What would be the best, going with static config approach (I don't know how to do it or use which version/fork) or using an SD card adapter and have them talk over SPI? Using SDIO/SDMMC interface would not be so straightforward I guess.

Many thanks to those who made this project real. It was a fun read and I've learned so much. (Not a software guy)

Please Log in to join the conversation.

More
1 year 1 week ago #337017 by Fred2560
Is QEI working ?
I have a RPI 4 SPI connected to a BLACK_407VE and an encoder with index connected to PE9, PE11, PE13. All works well except QEI, remora.PV.2 never changes, always = 0. Am I missing something ?
config txt :
    {
    "Thread": "Servo",
    "Type": "QEI",
            "Comment":                      "Spindle encoder",
            "PV":                        2,
            "Data Bit":                     7,
            "Enable Index":                 "True"
    }
Debug output:
Servo thread object                                                             
Spindle encoder                                                                 
Creating QEI, hardware quadrature encoder interface                             
  Encoder has index                                                             
                                                                                
Creating a std module                                                           
  Initialising hardware QEI module     

Please Log in to join the conversation.

More
1 year 4 days ago #337243 by scotta
The A and B channels should be connected to PE9 and PE11, index to PE13. So that looks correct. It should work, but I have not played with the QEI for ages.

Please Log in to join the conversation.

More
11 months 2 weeks ago #338230 by OBi
I have a newly minted Linuxcnc 2.9.7 installed on a Raspberry PI 4. 

I have successfully compiled the remora.c component from cakeslob/rrw_lab
trying 'sudo halcompile --install remora-spi.c' from cakeslob/main and scottalford75 will not compile. Lots of errors. 
Code:
Components/Remora-spi/rp1lib.c:94:9: error: assignment to ‘struct spi_device *’ from incompatible pointer type ‘struct spi_device **’ [-Wincompatible-pointer-types]    94 |     dev = &inst->spi_dev[spi_num];

I have also a working linuxcnc 2.9.3 that compiles remora-spi.c fine

Are there any changes in linuxcnc from version 2.9.3 to 2.9.7 that makes this happen? 
I will make do with the earlier remora component...

I just wanted to inform that there is some issues

Please Log in to join the conversation.

More
11 months 2 weeks ago #338231 by unknown
You didn't by chance use the new trixie image on the downloads page did you ?

Please Log in to join the conversation.

More
11 months 2 weeks ago #338283 by OBi

You didn't by chance use the new trixie image on the downloads page did you ?
 
Actually, yes I did... Shouldn't I?

Please Log in to join the conversation.

Time to create page: 0.209 seconds
Powered by Kunena Forum