MRX8024 / chopper-resonance-tuner

Registers calibration script for TMC drivers
GNU General Public License v3.0
81 stars 13 forks source link

Unable to obtain 'spi_transfer_response' response #8

Closed iz3man closed 1 month ago

iz3man commented 2 months ago

Today I installed the tool on my Rpi3 running a CoreXY, and started it with "CHOPPER_TUNE FIND_VIBRATIONS=1" The head starts moving for some time, and then stops with this error message:

14:05:52 Unable to obtain 'spi_transfer_response' response
14:05:52 Unable to obtain 'spi_transfer_response' response
14:05:52 Unable to obtain 'spi_transfer_response' response
14:05:50 Speed 67 mm/s on 85.42 mm
14:05:49 Writing raw accelerometer data to /tmp/lis2dw-20240417_140547.csv file
14:05:47 accelerometer measurements started
14:05:47 Speed 66 mm/s on 84.15 mm
14:05:46 Writing raw accelerometer data to /tmp/lis2dw-20240417_140544.csv file
....
....
....
14:03:42 accelerometer measurements started
14:03:42 Command {chop_tune} finished
14:03:40 Running Command {chop_tune}...:
14:03:36 Start find vibration mode, speed: 25 --> 100 mm/s current=800 TBL=2 TOFF=3 HSTRT=5 HEND=0
14:03:36 Final max travel distance = 127.50 mm, position min = -20.00, traveling: -20.00 --> 107.50
14:03:36 Selected 2wd configuration
14:03:36 Selected lis2dw for accelerometer
14:03:36 Selected tmc2209 for stepper_x

Anything I can do?

MRX8024 commented 2 months ago

Hi! Please upload klippy.log.

-Maxim

iz3man commented 2 months ago

Have to upload it directly as it's too big for pastebin & Co. Hope it's readable and includes all needed date.

klippy.log

MRX8024 commented 2 months ago

What speed on canbus?

iz3man commented 2 months ago

1m

On Wed, 17 Apr 2024 at 16:44, MRX8024 @.***> wrote:

What speed on canbus?

— Reply to this email directly, view it on GitHub https://github.com/MRX8024/chopper-resonance-tuner/issues/8#issuecomment-2061431793, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACYEXCVZUMXKBVX3PSQMHR3Y52DERAVCNFSM6AAAAABGLF2ZK2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRRGQZTCNZZGM . You are receiving this because you authored the thread.Message ID: @.***>

MRX8024 commented 2 months ago

Hmm.. I saw you have mcu on a toolhead, have you tried using the accelerometer from there?

iz3man commented 2 months ago

I deactivated the accelerometer of the toolhead and used the one in the beacon probe. I'm not sure if that is correct, or if the accelerometer should be placed on the motor itself?! Nethertheless I now exchanged the USB cable to the canbus adapter and the script ran through! :) Sorry to having bothered you ...

iz3man commented 2 months ago

Hmmm. Seems it's still there. I ran "CHOPPER_TUNE MIN_SPEED=42 MAX_SPEED=42" and after 25min it stopped with the same error.

18:23:42 Unable to obtain 'spi_transfer_response' response
18:23:41 Unable to obtain 'spi_transfer_response' response
18:23:41 Unable to obtain 'spi_transfer_response' response

It seems there is some communication problem with the sensor. Could that be the case?

iz3man commented 2 months ago

I now get a lot of these errors. There's something wrong with CAN adapter or the MCU it seems.

Resetting prediction variance 2790.703: freq=47983677 diff=2298097 stddev=48000.000
Resetting prediction variance 2791.688: freq=47985818 diff=-5103886 stddev=48000.000
Resetting prediction variance 2792.672: freq=47981059 diff=8021043 stddev=48000.000
Resetting prediction variance 2793.657: freq=47988544 diff=-5913958 stddev=48000.000
Resetting prediction variance 2794.642: freq=47983020 diff=13315993 stddev=48000.000
Resetting prediction variance 2795.626: freq=47995473 diff=-6353403 stddev=48000.000
Resetting prediction variance 2796.610: freq=47989524 diff=-5955205 stddev=48000.000

And if I then to a restart it hangs here, and only a full power off/on makes the printer work again

mcu 'EBBCan': Timeout on connect Created a socket mcu 'EBBCan': Wait for identify_response Traceback (most recent call last): File "/home/pi/klipper/klippy/serialhdl.py", line 68, in _get_identify_data params = self.send_with_response(msg, 'identify_response') File "/home/pi/klipper/klippy/serialhdl.py", line 261, in send_with_response return src.get_response([cmd], self.default_cmd_queue) File "/home/pi/klipper/klippy/serialhdl.py", line 318, in get_response self.serial.raw_send_wait_ack(cmds[-1], minclock, reqclock, File "/home/pi/klipper/klippy/serialhdl.py", line 253, in raw_send_wait_ack self._error("Serial connection closed") File "/home/pi/klipper/klippy/serialhdl.py", line 61, in _error raise error(self.warn_prefix + (msg % params)) serialhdl.error: mcu 'EBBCan': Serial connection closed

MRX8024 commented 1 month ago

As far as I know, you solved the problem by disabling beacon (clone) in the configuration, and using the accelerometer from the can board (ebb). Why it happened this way is difficult for me to answer. So I'm closing this issue for now.

-Maxim