I have a broken SMC chip (TMC2130) of the Y-axis motor. Certainly a full replacement of the farmduino board would be a solution. Replacing just the chip would be cheaper, but is quite a challenge without access to sophisticated soldering equipment.
So I was wondering whether the aux-channel hardware on the same board could be used. That would require to “redirect” the software commands addressing the y-axis chip to talk to the aux-axis chip (and of course connecting the y-axis motor to the aux output). The encoder wiring would be the wiring of the y-axis, so the “redirection” must be ‘low’ enough in the software hierarchy to only address the motor chip.
Would that be feasible, and where would I start looking?
I digged a bit into the source code in the meantime and tried to answer my own question in this thread.
I didn’t yet have an opportunity to test it, though.
Did anyone else already try such an "AUX-for-Y“ TMC swapping?
//#define AUX_STEP_PIN 40
#define AUX_STEP_PIN 32
//#define AUX_DIR_PIN 41
#define AUX_DIR_PIN 33
//#define AUX_ENABLE_PIN 37
#define AUX_ENABLE_PIN 31
// #define AUX_CHIP_SELECT 43 // CHIP_SELECT is not used for the spare AUX motor
compiled the sketch in the Arduino IDE using ‘Sketch–>Export Compiled Binary’
copied the file \src\build\arduino.avr.mega\src.ino.hex to the FAT32-Boot-Partition of the Raspberry SD card and renamed it to custom.hex
connected the Y-motor cable to the AUX connector
booted the system
Whether this works for versions other than FARMDUINO_V32 I can’t say