#TMC 5160 - pin stepper_spi_miso_pin is an alias for PA6

90 messages · Page 1 of 1 (latest)

normal geyser
#

Hi there. I'm installing external 48V steppers on the Manta following the advanced configuration page. I have run into this error. Jumpers are set, boards are energized. Driver power is set to 24V (external drivers). Any thoughts?

#

PA6 is connected to the ADXL

#

50V include from advanced steper configuration guide

#

Manta 1.1 board def is image, my override in text:
[adxl345]
cs_pin: PC4
spi_software_sclk_pin: PA5
spi_software_mosi_pin: PA6 #SD0 --> MOSI
spi_software_miso_pin: PA7 #SDA --> MISO

#

Manta 1.1 board def

#

Looks like the board def for the manta explicitly links the ADXL to pins defined as the same SPI bus motor pins. I'm not sure what the resolution for this would be. Going to explore alternative pins for ADXL while waiting for guidance on this issue.

normal geyser
#

STM32G0B1
VET6
AA008 9R A
TWN AA 209
13

normal geyser
#

SPI2 with PB14(MISO), PB13(SCK), PB11(MOSI), in the EXP2 section should be available, but a bit awkward for wiring.

normal geyser
#

ADXL override commented out, now booting.

normal geyser
#

ADXL now swapped to software using the SPI2 pins. It boots. Next step is to rewire the sensor and test.

lavish raft
#

Klipper complains because you're using 2 names for the same physical pins. Not because you can't use the same physical pin for more than one section.

#

It's a confusing error, i know.

normal geyser
lavish raft
#

I'm not sure w hy you changed the adxl345 software spi pins in the first place

normal geyser
normal geyser
#

The MOSI and MISO pins need to be swapped or the board wont start

#

This fix contradicts the guidance of the manta manual

lavish raft
lavish raft
normal geyser
lavish raft
normal geyser
#

Done. That was good to learn. hopefully that fix was appropriate.

normal geyser
lavish raft
#

PR is correct for that at least, so maybe the physical pins have to be swapped.

#

In which case we'll correct the wiring diagram instead

normal geyser
normal geyser
# lavish raft Got it, will get that fixed

I recommend using this wiring:
GND-GND 3.3V-3.3V
PA6-MOSI PA7-MISO
PA5-SCL PC4-CS
GND-X 5V-X

Generic ADXL chip says 3-5, but was very hot at 5 and didn't work any better.

lavish raft
normal geyser
lavish raft
normal geyser
lavish raft
#

I don't own the m8p 1.1 myself, so best i can do is listen to users like you

normal geyser
# lavish raft I don't own the m8p 1.1 myself, so best i can do is listen to users like you

The motors appear to work fine on SPI with the existing define, but I was unable to test this. Should I be creating a dummy board definition? Because when I put:
cs_pin: PC4
spi_software_sclk_pin: stepper_spi_sclk_pin
spi_software_mosi_pin: stepper_spi_mosi_pin #SD0 --> MOSI
spi_software_miso_pin: stepper_spi_miso_pin #SDA --> MISO
in my overrides, it did not boot.

lavish raft
normal geyser
#

It has been difficult to test this because of the namespace problems that I do not understand.

#

Yeah, motor needs to stay the same, but MISO and MOSI need to swap for ADXL.

lavish raft
#

There's no namespace issues if you use stepper_spi_whatever instead of the actual pins.

#

The 5160 motor includes use these

#

The error happens when you use 2 different names for the same pin in your config

normal geyser
normal geyser
lavish raft
#

Hmmm... This might be a problem yeah.. You're not able to use spi_miso_pin for both software mosi and miso at the same time.

#

There's no way to get around that

#

no matter what you call that pin

normal geyser
#

Default Manta 1.1 config with:
[adxl345]
cs_pin: adxl345_cs_pin
spi_software_mosi_pin: stepper_spi_miso_pin
spi_software_miso_pin: stepper_spi_mosi_pin
spi_software_sclk_pin: stepper_spi_sclk_pin

in overrides

lavish raft
#

yeah i understand now

normal geyser
#

Yeah, me too. I think it's a bigger problem.

lavish raft
#

And just swapping the physical pins on the ADXL is not enough to get it to work?

lavish raft
normal geyser
#

I tried this quickly on bus2, but it didn't work and I didn't test it thoroughly. I'm going to read about using the ADXL with the RPI.

lavish raft
lavish raft
normal geyser
lavish raft
#

When running queries make sure to specify the CHIP parameter. Ie ACCELEROMETER_QUERY CHIP="adxl345 rpi"

turbid drift
#

Reading this Greek means I'm probably doomed when I get to this stage.

normal geyser
normal geyser
turbid drift
#

Just wiring the electronics panel.

lavish raft
#

Also this is specifically related to the manta m8p 1.1

normal geyser
lavish raft
#

This works fine on an Octopus Pro for example.

turbid drift
#

Yes I'm running the newer BTT 5160t Plus with a 1.1 M8P with an EBB42

valid bronze
normal geyser
valid bronze
normal geyser
# valid bronze Rat-OS does this already for you

Got an error message re the spi bus not being avaialble when implementing the config provided by miklschmidt. I'll have to check it in the morning and compare the names with what was in the board envs, since my board envs didn't match that guide anyway

valid bronze
#

I was the one who worked on the cb1 image and I tested the adxl on the manta boards. I remember having to enable the overlays and that was then added to Rat-OS

normal geyser
#

##Accelerometer connected to rpi
[include RatOS/boards/rpi/config.cfg]
[include RatOS/sensors/rpi-adxl345.cfg]
[resonance_tester]
accel_chip: adxl345 rpi

normal geyser
#

I confirmed spidev1.2 is commented out in my boardenvs.

normal geyser
#

ADXL queried successfully with SPI2 pins in software SPI:
[adxl345]
cs_pin: PE7
spi_software_sclk_pin: PB13 #(SCK)
spi_software_mosi_pin: PB11 #SD0 --> MOSI
spi_software_miso_pin: PB14 #SDA --> MISO
axes_map: x,z,y