Hm,
according to this document:
BIGTREETECH MANTA M8P V1.1-SCH.pdf (3.2 MB)
The EXP2s SPI is connected to pins 50-53 of the STM32G0B1VET6 and it seems they are meant for an SD-card reader:
50 PB11/SPI2_MOSI,TIM2_CH4, USART3_RX, I2C2_SDA,ADC_IN15
51 SPI2_NSS/FDCAN2_RX,ADC_IN16/PB12
52 SPI2_SCK,TIM1_CH1N, FDCAN2_TX,I2C2_SCL/PB13PIU13052
53 SPI2_MISO/TIM15_CH1, I2C2_SDA/PB14 PIU13053
That makes me think this refers in the end to /dev/spidev2.x
but I really don’t know.
I also discovered the 8-pin connector called SPI (P6) being connected to:
30 PIU13030 PA5/SPI1_SCK/I2S1_CK,USART6_RX, USART3_TX,ADC12_IN5
31 PIU13031 PA6/SPI1_MISO/TIM3_CH1,TIM16_CH1,I2C2_SDA,I2C3_SDA/ADC_IN6
32 PIU13032 PA7/SPI1_MOSI/TIM3_CH2,I2C2_SCL,I2C3_SCL/ADC_IN7
33 PIU13033 PC4/USART3_TX, USART1_TX, TIM2_CH1_ETR, FDCAN1_RX/ADC_IN17
This SPI bus seems to be connected to the stepper drivers also, so I think, it is not a good idea to wire the ADXL here due to its behavior with other devices. But the ADS1220 might be possible?
At the moment the ADXL is NOT connected to the STM32, but connected to the 40-pin-GPIO connector of the CB1
19 PH7 GPIO231, SPI1_MOSI
21 PH8 GPIO232, SPI1_MISO
23 PH6 GPIO230, SPI1_CLK
26 PG8 GPIO200, CS
I have it up and running there. So, according to ‘never touch a running system’ I’d keep it there. It is running on the seperate MCU
[mcu cb1]
serial: /tmp/klipper_host_mcu
so it is out of reach of other SPI devices.
Uw, this is a strange thing to me … connecting a wire to software sounds a bit like science-fiction. But I assume I can tell the software to accept hardware pins intended for other purposes to act as SPI bus pins?
Well this is the point to reveal that I’m not an educated electronics technician nor software progamer. So I have to admit, the above dug out Information doesn’t help me any further.
- Steppers (X,Y,Z*3,E)
- Fans (coldend, partcooling*2, MCU)
- heaters (hotend, bed)
- temperature sensors (hotend, bed, MCU, chamber)
- LED Stripe (maybe a second one to visualise the state of the machine as a kind of traffic Light, later on)
- ADXL345 for resonance metering
- ADS1220 for Z-endstop via strain gauges/load-cells
Clean and compact. No display / touch screen. No CAN bus / I2C Bus. Only control element should be an ‘emergency stop button’ I didn’t manage to implement from first day. ![:sunglasses: :sunglasses:](https://emoji.discourse-cdn.com/twitter/sunglasses.png?v=12)
Edit:
At the moment I’m convinced the EXP2 connector proposed by mykepredko seems to be the best choice…
…question is, how to implement it? How to figure out which micro-controller bus name
has to be configured?
Sadly the Klipper configuration reference isn’t helpful on this topic:
#spi_speed:
# The SPI speed (in hz) to use when communicating with the device.
# The default depends on the type of device.
#spi_bus:
# If the micro-controller supports multiple SPI busses then one may
# specify the micro-controller bus name here. The default depends on
# the type of micro-controller.
#spi_software_sclk_pin:
#spi_software_mosi_pin:
#spi_software_miso_pin:
# Specify the above parameters to use "software based SPI". This
# mode does not require micro-controller hardware support (typically
# any general purpose pins may be used). The default is to not use
# "software spi".