Skip to main content

SPI Configuration Method

SPI drivers such as the TMC5160 should preferably use the motherboard's hardware SPI bus. In the configuration, simply fill in the corresponding spi_bus bus name; there is no need to separately configure the MOSI/MISO/SCLK pins:

[tmc5160 stepper_x]
spi_bus: spi1a
cs_pin: Corresponding driver's UART/CS pin

The value of spi_bus varies by motherboard; please refer to the actual values in the pinout documentation for each motherboard.

Software SPI

When the SPI peripheral is not connected to the hardware SPI bus pins (for example, when connecting a MAX31865 or accelerometer to any GPIO), software SPI can be used, requiring three signal pins to be specified separately:

[max31865 pt1000]
spi_software_miso_pin: Corresponding MISO pin
spi_software_mosi_pin: Corresponding MOSI pin
spi_software_sclk_pin: Corresponding SCLK pin
cs_pin: Corresponding CS pin
Pin Source

The spi_software_*_pin values must be filled in according to the actual pin numbers in the pinout documentation of the motherboard or tool board (pin.mdx), and must not be copied directly from the examples.

SPI Speed

  • spi_speed is optional, with the unit in Hz.
  • TMC series drivers can omit this setting and use the default speed; if communication is unstable, you may try lowering spi_speed.
Loading...