Hi Scott and all,
thanks for the previous reply about SKR1.4 / LPC1768 being “legacy” and only supported by the older Remora component. I went back to an older Remora version that still supports the LPC1768 and now SPI communication basically works – LinuxCNC starts, the joints move etc.
However, I am now fighting with heavy EMI / noise on the SPI link and I keep getting “Bad SPI payload / estop won’t reset” as soon as the machine does any real work.
Hardware setup:
Controller: Raspberry Pi (LinuxCNC 2.9.x, RPi CM4)
Remora board: BTT SKR 1.4 (LPC1768)
Connection between RPi and SKR: currently Dupont jumper wires (I also tried a short IDC ribbon cable – even worse, estop does not clear at all)
Remora Component: Remora for LPC176x release, version 0.1.0, from Oct 17, 2021
Symptoms:
With just the electronics on the bench, SPI works and LinuxCNC runs.
When I connect the SKR to the real hot‑wire foam cutter mechanics (5 stepper drivers + hot wire power), I start getting random SPI errors:
“Bad SPI payload”
communication drops, estop is triggered and will not reset.
Even small vibrations or just touching the frame of the machine can trigger SPI errors.
Switching on the hot wire (PWM on SKR, MOSFET) also often causes SPI to fail.
So it looks like any electrical noise or mechanical vibration around the machine is enough to corrupt the SPI frames.
Limitations:
Because I must use the old Remora component for LPC1768, I cannot use the newer SPI options – commands like spi_req or spi_sck_div are reported as “unknown command”. So I currently have no way to slow down or re‑configure the SPI clock from the LinuxCNC side.
Questions:
Is there any recommended hardware wiring for a “noisy” machine with SKR1.4 + RPi to make SPI more robust?
Twisted pairs for SCK/MOSI/MISO/GND?
Shielded cable with shield connected to ground at one end?
Series resistors or small RC filters on SCK/MOSI/MISO / pull‑ups or pull‑downs?
Recommended maximum cable length between RPi and SKR?
With the old LPC1768‑compatible Remora component, is there any way (even a patch or older branch) to:
reduce the SPI clock speed, or
change other SPI timing parameters,
so that communication is less sensitive to noise?
Would you recommend a specific older Remora version (tag/commit) for SKR1.4 that:
still supports LPC1768
but already has the adjustable SPI frequency options?
At the moment the system is “almost working” – jogging and G‑code run fine on the bench – but as soon as the real machine is connected and the hot wire or motors generate some noise, SPI becomes unreliable (Bad payload, estop).
Any advice on:
proven wiring / grounding / shielding between RPi and SKR, or
which Remora version to use and how to tweak SPI timing for LPC1768,
would be very helpful.
Thanks in advance!