A little more work on the STM32F4 version of Remora.
1. Motor Power enable module added. Configure in config.txt using pin PC_13
2. Hardware QEI (Quadrature Encoder Interface) with interrupt driven index. Channel A and B pins are PE_9 and PE_11 with index set to pin PE_13. Use the LinuxCNC PRUencoder component to interface to the encoder module.
Code:
{
"Board": "BIGTREETECH SKR v2",
"Modules":[
{
"Thread": "On load",
"Type": "Motor Power",
"Comment": "Enable motor power SKR2",
"Pin": "PC_13"
},
{
"Thread": "Servo",
"Type": "Reset Pin",
"Comment": "Reset pin",
"Pin": "PC_4"
},
{
"Thread": "Base",
"Type": "Stepgen",
"Comment": "X - Joint 0 step generator",
"Joint Number": 0,
"Step Pin": "PE_2",
"Direction Pin": "PE_1",
"Enable Pin": "PE_3"
},
{
"Thread": "On load",
"Type": "TMC2209 stepper",
"Comment": "X - Joint 0 TMC driver",
"Driver": "2209",
"RX pin": "PE_0",
"RSense": 0.11,
"Current": 800,
"Microsteps": 16,
"Stealth chop": "on",
"Stall sensitivity":0
},
{
"Thread": "Base",
"Type": "Stepgen",
"Comment": "Y - Joint 1 step generator",
"Joint Number": 1,
"Step Pin": "PD_5",
"Direction Pin": "PD_4",
"Enable Pin": "PD_6"
},
{
"Thread": "Base",
"Type": "Stepgen",
"Comment": "Z - Joint 2 step generator",
"Joint Number": 2,
"Step Pin": "PA_15",
"Direction Pin": "PA_8",
"Enable Pin": "PD_1"
},
{
"Thread": "Base",
"Type": "Stepgen",
"Comment": "E0 - Joint 3 step generator",
"Joint Number": 3,
"Step Pin": "PD_15",
"Direction Pin": "PD_14",
"Enable Pin": "PC_7"
},
{
"Thread": "Servo",
"Type": "Temperature",
"Comment": "Bed tenperature sensor",
"PV[i]": 0,
"Sensor": "Thermistor",
"Thermistor":
{
"Pin": "PA_1",
"beta": 3990,
"r0": 100000,
"t0": 25
}
},
{
"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
},
{
"Thread": "Servo",
"Type": "Switch",
"Comment": "Extruder fan switch",
"Pin": "PB_7",
"Mode": "On",
"PV[i]": 0,
"SP": 25.5
},
{
"Thread": "Servo",
"Type": "QEI",
"Comment": "Hardware Quadrature Encoder Interface",
"PV[i]": 2,
"Enable Index": "True",
"Data Bit": 6
}
]
}