Open buzztiaan opened 6 months ago
Thank you for submitting a PR, pleas refer to point 3 in "What to expect in a review" in https://github.com/Klipper3d/klipper/blob/master/docs/CONTRIBUTING.md and provide a signed off by line.
Thanks James
I'm not sure if this is the right thing to do.
You have two ways of connecting a SPI IMU like the LIS2DW or ADXL3xx:
Hardware SPI:
[...]
cs_pin: lis:gpio1
spi_bus: spi0a
Software SPI:
[...]
cs_pin: lis:gpio9
spi_software_sclk_pin: lis:gpio10
spi_software_mosi_pin: lis:gpio11
spi_software_miso_pin: lis:gpio8
The S2DW is a combination of a RP2040 MCU and a LIS2DW and BTT (in this very product) choose to wire it in software SPI due to an issue with hardware SPI that is also mentioned here: https://www.klipper3d.org/Measuring_Resonances.html#measuring-the-resonances
Generally I'd prefer to use hardware SPI but with this combination it might be preferable to use software SPI for the casual user. If we go by this, then the entire chapter should be reworked and software SPI be recommended for the RP2040 / SPI combination.
The 'SW instead of HW' is just copied from BTT's example. As the original config blurb came from them, it seemed wise to update it to mirror.
Beside the 'SW instead' , its also using different pins. The specified pins aren't connected to the S2DW on this specific product. Also i haven't seen any other products with the LIS2DW chip included.
The documentation is meant to explain the principle and not be tailored to a single product.
There is a similar product from Fly which is using different pins.
And still the hardware SPI is preferable (hoping the SPI issue can be resolved).
The linked fly docs say they DO use the same pins as my pr, plus also SW spi
On Mon, 18 Dec 2023, 13:40 Sineos, @.***> wrote:
The documentation is meant to explain the principle and not be tailored to a single product.
There is a similar product from Fly https://mellow.klipper.cn/?spm=a2g0o.detail.1000023.1.c5665Pp05Pp0He#/advanced/usb_lis2dw which is using different pins.
And still the hardware SPI is preferable (hoping the SPI issue can be resolved).
— Reply to this email directly, view it on GitHub https://github.com/Klipper3d/klipper/pull/6431#issuecomment-1860393890, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHFSMBSSMA7P5QWGEFHTJLYKA2UFAVCNFSM6AAAAABAYKAGF6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRQGM4TGOBZGA . You are receiving this because you authored the thread.Message ID: @.***>
Fly:
[lis2dw]
cs_pin: LIS:gpio9
spi_software_sclk_pin: LIS:gpio10
spi_software_mosi_pin: LIS:gpio11
spi_software_miso_pin: LIS:gpio12
BTT:
[lis2dw]
cs_pin: lis:gpio9
spi_software_sclk_pin: lis:gpio10
spi_software_mosi_pin: lis:gpio11
spi_software_miso_pin: lis:gpio8
¯\_(ツ)_/¯
Oh, missed the miso pin ;) either way, its a lot closer :D hahaha Maybe its more suitable for a example-config then?
In principle, I agree with you, but then again, the entire documentation with respect to this would have to be reworked.
ADXL3xx Situation:
LIS2DW situation:
Unfortunately, there is no one-solution-fits-all and running behind the potential pin and wiring scenarios will not really take you anywhere.
Thank you for your contribution to Klipper. Unfortunately, a reviewer has not assigned themselves to this GitHub Pull Request. All Pull Requests are reviewed before merging, and a reviewer will need to volunteer. Further information is available at: https://www.klipper3d.org/CONTRIBUTING.html
There are some steps that you can take now:
Unfortunately, if a reviewer does not assign themselves to this GitHub Pull Request then it will be automatically closed. If this happens, then it is a good idea to move further discussion to the Klipper Discourse server. Reviewers can reach out on that forum to let you know if they are interested and when they are available.
Best regards, ~ Your friendly GitIssueBot
PS: I'm just an automated script, not a human being.
As found while testing my own BTT S2DW board, the klipper doc example was using wrong pins (and method?).
Signed-off-by: Bastiaan van den Berg buzz@spacedout.nl