Printer Model: DEVELOPMENT
MCU / Printerboard: MCU = Adafruit Grand Central M4 @ 200Mhz + DEV RAMPS 2.0 klippy(9).log (798.0 KB)
Describe your issue:
I’m testing a RAMPS development board that on an Adafruit Grand Central M4 and I’m noticing a SPI Conflict with multiple different devices configured on sercom7
When TMC2130’s configured on all 5 stepper locations and a Fysetc Mini 12864 Panel (RGB) v2.1, which also runs SPI, I get the following:
Display works correctly, I can scroll though all the menus and select options correctly.
TMC2130 drivers do not initialize properly:
@hcet14
Reminder, this is a prototype board, effectively a new RAMPS design that will support a MEGA, Re-ARM, Due, and Grand Central M4.
I’m not the board designer, but I’ve provided input, inspiration, now testing, and documentation.
This specific design has multiple voltage rails:
Vcc - to support 3v3 and 5v logic
5v rail for fans and other accessories
12v rail for fans and accessories (npn/pnp sensors)
24v rail for steppers
8v-ish rail to power the MCU
Just like the BTT Ramps 1.6+, the SPI is baked into the board between the display and the 5 stepper locations.
Each stepper has its own Cs pin.
The display has a unique Cs for the display and the SPI SS is unused, however connected to the SD on the display.
Currently, I have working either the display OR TMC2130 over hardware SPI on the Adafruit Grand Central. SPI is configured using the [samd_sercom] section.
I can, with some jumpers wires, put the display on unused pins and configure software SPI, but that is not how I ultimately want to set up as I’m testing what can/cannot be done.
I recently configured [static_digital_output disable_sdcard] to disable the SPI SS pin. Haven’t tested it yet.
I have a second MCU_Z, which is an Adafruit Metro M4. This board has 4 additional steppers. This board has a custom 4-stepper board similar to a UNO CNC Shield.
In the first image above, I have 5 step-sticks installed, but only one stepper motor plugged in. I only have a couple extra steppers not being used at the moment.
I guess the bad boy is the cs_pin = exp1_3 of your display. The pin is probably always activated and blocks the SPI for other devices.
You may follow this TMC drivers - Klipper documentation instructions. Go to “I keep getting “Unable to write tmc spi ‘stepper_x’ register …” errors?”
You just have to try, if high or low level works Configuration reference - Klipper documentation.
I’ll keep my fingers crossed.
I’ll try to turn off hardware SPI and use the same pins as Software SPI for both Display and TMC to see what happens. That might show there is something wrong in the samd_sercom Klipper code.
If no “simple” solution is available, then it looks like you are heading for some tedious debugging with Logic Analyzer etc. to see where things start going downhill.
@Sineos
Thanks for supplying the GitHub ticket. It actually contains the work I did to convert a RAMPS 1.6 for the GC, unfortunately I only used the DRV8825 steppers. The only SPI device was the MKS mini display.
Nonetheless it was a good thing for me to review.
We are looking into a couple ideas for the next iteration of the board as we continue to see if there is a limitation/issue to the GC SPI bus or even something possibly an issue with the Klipper samd_sercom implementation?
I also made a custom cable from the MCU shield to the display for EXP2, only taking the 2 click pins and MOSI and SCK. The display does not need MISO. EXP1 has the LCD CS and LCD A0.