Closed CasperVerswijvelt closed 9 months ago
Added extra logging in most functions as to better see where it might be going wrong
```c
// Code for Bed Distance Sensor
// Mark yue
just fixed this problem. this works well with latest bdsensor firmware that support switch mode, otherwise need to remove the irq_poll in the code. please modify this or update the BD_sensor.c
while (timer_is_before(timer_read_time(), end))
irq_poll();
to
while (timer_is_before(timer_read_time(), end));
// irq_poll();
That fixed it! Thanks for the support!
After banging my head against a wall in #84, I switched to a 32 bit version of MainSailOS, and now I am getting a lot further.
However, when trying to home Z it again gives a segmentation fault in the
klipper-mcu
process.Console logs:
Extract from klippy.log
``` Sent 67 1261.469275 1261.468755 13: seq: 12, queue_step oid=3 interval=36000 count=100 add=0 Sent 68 1261.495074 1261.494594 12: seq: 13, trsync_set_timeout oid=5 clock=223038037 Sent 69 1261.519263 1261.518743 13: seq: 14, queue_step oid=3 interval=36000 count=100 add=0 Sent 70 1261.569147 1261.568667 12: seq: 15, trsync_set_timeout oid=5 clock=228438077 Sent 71 1261.570242 1261.569722 13: seq: 16, queue_step oid=3 interval=36000 count=100 add=0 Sent 72 1261.620199 1261.619679 13: seq: 17, queue_step oid=3 interval=36000 count=100 add=0 Sent 73 1261.640865 1261.640545 8: seq: 18, trsync_trigger oid=5 reason=3 Sent 74 1261.642610 1261.642050 14: seq: 19, endstop_home oid=4 clock=0 sample_ticks=0 sample_count=0 rest_ticks=0 pin_value=0 trsync_oid=0 trigger_reason=0 Sent 75 1261.642930 1261.642342 8: seq: 1a, trsync_trigger oid=5 reason=3 Sent 76 1261.648035 1261.647755 7: seq: 1b, stepper_get_position oid=3 Sent 77 1261.653311 1261.653031 7: seq: 1c, endstop_query_state oid=4 Sent 78 1261.658422 1261.658102 8: seq: 1d, reset_step_clock oid=3 clock=0 Sent 79 1261.670155 1261.667715 61: seq: 1e, set_next_step_dir oid=0 dir=0, set_next_step_dir oid=3 dir=1, queue_step oid=3 interval=247224623 count=1 add=0, queue_step oid=3 interval=175940 count=1 add=0, queue_step oid=3 interval=120009 count=2 add=-20422, queue_step oid=3 interval=83770 count=3 add=-11817, queue_step oid=0 interval=247625882 count=1 add=0, queue_step oid=0 interval=138079 count=1 add=0 Sent 80 1261.672675 1261.667715 63: seq: 1f, queue_step oid=0 interval=91243 count=2 add=-21571, queue_step oid=3 interval=55966 count=7 add=-2285, queue_step oid=0 interval=54949 count=5 add=-4742, queue_step oid=0 interval=35416 count=6 add=-1443, queue_step oid=3 interval=40893 count=12 add=-995, queue_step oid=0 interval=29039 count=13 add=-396, queue_step oid=3 interval=30705 count=23 add=-247 Sent 81 1261.675115 1261.672602 61: seq: 10, queue_step oid=0 interval=25147 count=1473 add=0, queue_step oid=3 interval=25778 count=1415 add=0, queue_step oid=3 interval=25777 count=1397 add=0, queue_step oid=0 interval=25146 count=1431 add=0, queue_step oid=0 interval=25146 count=1432 add=0, queue_step oid=3 interval=25777 count=1396 add=0, queue_step oid=3 interval=25778 count=1397 add=0 Sent 82 1261.680024 1261.677584 61: seq: 11, queue_step oid=0 interval=25146 count=1432 add=0, queue_step oid=3 interval=25777 count=1396 add=0, queue_step oid=0 interval=25146 count=1431 add=0, queue_step oid=3 interval=25777 count=1397 add=0, queue_step oid=0 interval=25146 count=1432 add=0, queue_step oid=0 interval=25146 count=1100 add=0, queue_step oid=3 interval=25778 count=1073 add=0 Sent 83 1261.682464 1261.677584 61: seq: 12, queue_step oid=3 interval=25183 count=19 add=418, queue_step oid=0 interval=25178 count=21 add=0, queue_step oid=0 interval=25697 count=12 add=778, queue_step oid=3 interval=33488 count=7 add=1053, queue_step oid=3 interval=42692 count=7 add=2598, queue_step oid=0 interval=37280 count=4 add=4095, queue_step oid=0 interval=55588 count=2 add=14083 Sent 84 1261.686964 1261.684404 64: seq: 13, queue_step oid=3 interval=62972 count=3 add=7074, queue_step oid=0 interval=94000 count=1 add=0, queue_step oid=0 interval=161068 count=1 add=0, queue_step oid=3 interval=86334 count=2 add=29870, queue_step oid=3 interval=153500 count=1 add=0, queue_step oid=3 interval=222950 count=1 add=0, trsync_start oid=7 report_clock=497990142 report_ticks=540000 expire_reason=2, stepper_stop_on_trigger oid=6 trsync_oid=7 Sent 85 1262.176918 1262.176398 13: seq: 14, get_clock, trsync_set_timeout oid=7 clock=499520142 Sent 86 1263.161220 1263.160980 6: seq: 15, get_clock Sent 87 1264.145509 1264.145269 6: seq: 16, get_clock Sent 88 1265.129642 1265.129402 6: seq: 17, get_clock Sent 89 1265.409688 1265.409008 17: seq: 18, set_next_step_dir oid=6 dir=1, queue_step oid=6 interval=776372221 count=1 add=0 Sent 90 1265.460574 1265.458694 47: seq: 19, queue_step oid=6 interval=263539 count=1 add=0, queue_step oid=6 interval=179947 count=2 add=-30962, queue_step oid=6 interval=125824 count=3 add=-10648, queue_step oid=6 interval=94500 count=6 add=-4400, queue_step oid=6 interval=69895 count=9 add=-1908 Sent 91 1265.509978 1265.509138 21: seq: 1a, queue_step oid=6 interval=53974 count=12 add=-929, queue_step oid=6 interval=45012 count=141 add=0 Sent 92 1265.563924 1265.563444 12: seq: 1b, queue_step oid=6 interval=45000 count=80 add=0 Sent 93 1265.585898 1265.585578 8: seq: 1c, trsync_trigger oid=7 reason=3 Sent 94 1265.587480 1265.587000 12: seq: 1d, queue_step oid=6 interval=45068 count=1 add=0 Sent 95 1266.114054 1266.113814 6: seq: 1e, get_clock Sent 96 1267.098862 1267.098622 6: seq: 1f, get_clock Sent 97 1268.083710 1268.083470 6: seq: 10, get_clock Sent 98 1269.068720 1269.068480 6: seq: 11, get_clock Sent 99 1269.717056 1269.716816 6: seq: 12, emergency_stop Dumping receive queue 100 messages Receive: 0 1260.521155 1260.472482 13: seq: 14, trsync_state oid=5 can_trigger=1 trigger_reason=0 clock=135037729 Receive: 1 1260.596552 1260.572436 13: seq: 17, trsync_state oid=5 can_trigger=1 trigger_reason=0 clock=140437715 Receive: 2 1260.671902 1260.622528 13: seq: 19, trsync_state oid=5 can_trigger=1 trigger_reason=0 clock=145837755 Receive: 3 1260.682083 1260.672951 14: seq: 1b, analog_in_state oid=9 next_clock=167643520 value=31505 Receive: 4 1260.731108 1260.722767 14: seq: 1c, analog_in_state oid=14 next_clock=171243520 value=31480 Receive: 5 1260.746260 1260.722767 13: seq: 1c, trsync_state oid=5 can_trigger=1 trigger_reason=0 clock=151237729 Receive: 6 1260.821600 1260.773140 13: seq: 1e, trsync_state oid=5 can_trigger=1 trigger_reason=0 clock=156637729 Receive: 7 1260.897027 1260.872273 13: seq: 11, trsync_state oid=5 can_trigger=1 trigger_reason=0 clock=162037715 Receive: 8 1260.971145 1260.922209 13: seq: 13, trsync_state oid=5 can_trigger=1 trigger_reason=0 clock=167437755 Receive: 9 1260.981470 1260.972405 14: seq: 14, analog_in_state oid=9 next_clock=189243520 value=31506 Receive: 10 1260.993992 1260.972405 13: seq: 14, trsync_state oid=5 can_trigger=0 trigger_reason=1 clock=169043045 Receive: 11 1260.997992 1260.994876 10: seq: 15, trsync_state oid=5 can_trigger=0 trigger_reason=1 clock=0 Receive: 12 1260.998007 1260.996811 10: seq: 17, trsync_state oid=5 can_trigger=0 trigger_reason=1 clock=0 Receive: 13 1261.003227 1261.000685 10: seq: 18, stepper_position oid=3 pos=-9582 Receive: 14 1261.008246 1261.004759 13: seq: 19, endstop_state oid=4 homing=0 next_clock=169057109 pin_value=1 Receive: 15 1261.031187 1261.016092 14: seq: 1c, analog_in_state oid=14 next_clock=192843520 value=31480 Receive: 16 1261.194115 1261.191406 10: seq: 1e, clock clock=183481709 Receive: 17 1261.281647 1261.269406 15: seq: 1f, analog_in_state oid=9 next_clock=210843520 value=31502 Receive: 18 1261.331947 1261.322226 15: seq: 10, analog_in_state oid=14 next_clock=214443520 value=31481 Receive: 19 1261.418503 1261.369304 13: seq: 11, trsync_state oid=5 can_trigger=1 trigger_reason=0 clock=199637961 Receive: 20 1261.493976 1261.469275 14: seq: 13, trsync_state oid=5 can_trigger=1 trigger_reason=0 clock=205038037 Receive: 21 1261.568067 1261.519263 14: seq: 15, trsync_state oid=5 can_trigger=1 trigger_reason=0 clock=210438077 Receive: 22 1261.582020 1261.570242 15: seq: 17, analog_in_state oid=9 next_clock=232443520 value=31504 Receive: 23 1261.631025 1261.620199 15: seq: 18, analog_in_state oid=14 next_clock=236043520 value=31480 Receive: 24 1261.639947 1261.620199 14: seq: 18, trsync_state oid=5 can_trigger=0 trigger_reason=1 clock=215589367 Receive: 25 1261.642575 1261.620199 14: seq: 18, trsync_state oid=5 can_trigger=0 trigger_reason=1 clock=215837921 Receive: 26 1261.642749 1261.640865 10: seq: 19, trsync_state oid=5 can_trigger=0 trigger_reason=1 clock=0 Receive: 27 1261.646592 1261.642930 10: seq: 1b, trsync_state oid=5 can_trigger=0 trigger_reason=1 clock=0 Receive: 28 1261.651723 1261.648035 10: seq: 1c, stepper_position oid=3 pos=-9577 Receive: 29 1261.656696 1261.653311 14: seq: 1d, endstop_state oid=4 homing=0 next_clock=215621431 pin_value=1 Receive: 30 1261.881557 1261.686964 15: seq: 14, analog_in_state oid=9 next_clock=254043520 value=31504 Receive: 31 1261.931671 1261.686964 15: seq: 14, analog_in_state oid=14 next_clock=257643520 value=31480 Receive: 32 1262.181960 1262.176918 11: seq: 15, clock clock=254444610 Receive: 33 1262.181813 1262.176918 15: seq: 15, analog_in_state oid=9 next_clock=275643520 value=31501 Receive: 34 1262.232234 1262.176918 15: seq: 15, analog_in_state oid=14 next_clock=279243520 value=31486 Receive: 35 1262.482123 1262.176918 15: seq: 15, analog_in_state oid=9 next_clock=297243520 value=31505 Receive: 36 1262.530956 1262.176918 15: seq: 15, analog_in_state oid=14 next_clock=300843520 value=31478 Receive: 37 1262.781050 1262.176918 15: seq: 15, analog_in_state oid=9 next_clock=318843520 value=31506 Receive: 38 1262.831206 1262.176918 15: seq: 15, analog_in_state oid=14 next_clock=322443520 value=31479 Receive: 39 1263.081317 1262.176918 15: seq: 15, analog_in_state oid=9 next_clock=340443520 value=31503 Receive: 40 1263.131447 1262.176918 15: seq: 15, analog_in_state oid=14 next_clock=344043520 value=31484 Receive: 41 1263.164207 1263.161220 11: seq: 16, clock clock=325317695 Receive: 42 1263.381706 1263.161220 15: seq: 16, analog_in_state oid=9 next_clock=362043520 value=31506 Receive: 43 1263.431816 1263.161220 15: seq: 16, analog_in_state oid=14 next_clock=365643520 value=31476 Receive: 44 1263.682003 1263.161220 15: seq: 16, analog_in_state oid=9 next_clock=383643520 value=31502 Receive: 45 1263.730861 1263.161220 15: seq: 16, analog_in_state oid=14 next_clock=387243520 value=31479 Receive: 46 1263.980990 1263.161220 15: seq: 16, analog_in_state oid=9 next_clock=405243520 value=31506 Receive: 47 1264.031533 1263.161220 15: seq: 16, analog_in_state oid=14 next_clock=408843520 value=31479 Receive: 48 1264.148837 1264.145509 11: seq: 17, clock clock=396198794 Receive: 49 1264.281339 1264.145509 15: seq: 17, analog_in_state oid=9 next_clock=426843520 value=31501 Receive: 50 1264.331466 1264.145509 15: seq: 17, analog_in_state oid=14 next_clock=430443520 value=31482 Receive: 51 1264.581590 1264.145509 15: seq: 17, analog_in_state oid=9 next_clock=448443520 value=31503 Receive: 52 1264.584153 1264.145509 15: seq: 17, stats count=195 sum=319834 sumsq=2930862 Receive: 53 1264.631852 1264.145509 15: seq: 17, analog_in_state oid=14 next_clock=452043520 value=31480 Receive: 54 1264.880648 1264.145509 15: seq: 17, analog_in_state oid=9 next_clock=470043520 value=31505 Receive: 55 1264.930809 1264.145509 15: seq: 17, analog_in_state oid=14 next_clock=473643520 value=31481 Receive: 56 1265.132307 1265.129642 11: seq: 18, clock clock=467052305 Receive: 57 1265.181013 1265.129642 15: seq: 18, analog_in_state oid=9 next_clock=491643520 value=31502 Receive: 58 1265.231140 1265.129642 15: seq: 18, analog_in_state oid=14 next_clock=495243520 value=31483 Receive: 59 1265.481483 1265.460574 15: seq: 1a, analog_in_state oid=9 next_clock=513243520 value=31501 Receive: 60 1265.531763 1265.509978 15: seq: 1b, analog_in_state oid=14 next_clock=516843520 value=31480 Receive: 61 1265.562068 1265.509978 14: seq: 1b, trsync_state oid=7 can_trigger=1 trigger_reason=0 clock=497990704 Receive: 62 1265.569692 1265.563924 14: seq: 1c, trsync_state oid=7 can_trigger=1 trigger_reason=0 clock=498530702 Receive: 63 1265.577329 1265.563924 14: seq: 1c, trsync_state oid=7 can_trigger=1 trigger_reason=0 clock=499070748 Receive: 64 1265.584961 1265.563924 14: seq: 1c, trsync_state oid=7 can_trigger=0 trigger_reason=2 clock=499520966 Receive: 65 1265.585010 1265.563924 14: seq: 1c, trsync_state oid=7 can_trigger=0 trigger_reason=2 clock=499610704 Receive: 66 1265.590302 1265.585898 10: seq: 1d, trsync_state oid=7 can_trigger=0 trigger_reason=2 clock=0 Receive: 67 1265.781432 1265.587480 15: seq: 1e, analog_in_state oid=9 next_clock=534843520 value=31506 Receive: 68 1265.831533 1265.587480 15: seq: 1e, analog_in_state oid=14 next_clock=538443520 value=31480 Receive: 69 1266.081654 1265.587480 15: seq: 1e, analog_in_state oid=9 next_clock=556443520 value=31504 Receive: 70 1266.116998 1266.114054 11: seq: 1f, clock clock=537935891 Receive: 71 1266.130654 1266.114054 15: seq: 1f, analog_in_state oid=14 next_clock=560043520 value=31480 Receive: 72 1266.380932 1266.114054 15: seq: 1f, analog_in_state oid=9 next_clock=578043520 value=31505 Receive: 73 1266.431049 1266.114054 15: seq: 1f, analog_in_state oid=14 next_clock=581643520 value=31480 Receive: 74 1266.681160 1266.114054 15: seq: 1f, analog_in_state oid=9 next_clock=599643520 value=31505 Receive: 75 1266.731332 1266.114054 15: seq: 1f, analog_in_state oid=14 next_clock=603243520 value=31481 Receive: 76 1266.981411 1266.114054 15: seq: 1f, analog_in_state oid=9 next_clock=621243520 value=31504 Receive: 77 1267.031537 1266.114054 15: seq: 1f, analog_in_state oid=14 next_clock=624843520 value=31482 Receive: 78 1267.101857 1267.098862 11: seq: 10, clock clock=608847971 Receive: 79 1267.280591 1267.098862 15: seq: 10, analog_in_state oid=9 next_clock=642843520 value=31507 Receive: 80 1267.330719 1267.098862 15: seq: 10, analog_in_state oid=14 next_clock=646443520 value=31480 Receive: 81 1267.580892 1267.098862 15: seq: 10, analog_in_state oid=9 next_clock=664443520 value=31504 Receive: 82 1267.630974 1267.098862 15: seq: 10, analog_in_state oid=14 next_clock=668043520 value=31480 Receive: 83 1267.881089 1267.098862 15: seq: 10, analog_in_state oid=9 next_clock=686043520 value=31504 Receive: 84 1267.931188 1267.098862 15: seq: 10, analog_in_state oid=14 next_clock=689643520 value=31480 Receive: 85 1268.086454 1268.083710 11: seq: 11, clock clock=679762067 Receive: 86 1268.181476 1268.083710 15: seq: 11, analog_in_state oid=9 next_clock=707643520 value=31507 Receive: 87 1268.231582 1268.083710 15: seq: 11, analog_in_state oid=14 next_clock=711243520 value=31480 Receive: 88 1268.481718 1268.083710 15: seq: 11, analog_in_state oid=9 next_clock=729243520 value=31505 Receive: 89 1268.530591 1268.083710 15: seq: 11, analog_in_state oid=14 next_clock=732843520 value=31481 Receive: 90 1268.780682 1268.083710 15: seq: 11, analog_in_state oid=9 next_clock=750843520 value=31505 Receive: 91 1268.830797 1268.083710 15: seq: 11, analog_in_state oid=14 next_clock=754443520 value=31480 Receive: 92 1269.072332 1269.068720 11: seq: 12, clock clock=750687107 Receive: 93 1269.081035 1269.068720 15: seq: 12, analog_in_state oid=9 next_clock=772443520 value=31504 Receive: 94 1269.131173 1269.068720 15: seq: 12, analog_in_state oid=14 next_clock=776043520 value=31480 Receive: 95 1269.381323 1269.068720 15: seq: 12, analog_in_state oid=9 next_clock=794043520 value=31504 Receive: 96 1269.431450 1269.068720 15: seq: 12, analog_in_state oid=14 next_clock=797643520 value=31480 Receive: 97 1269.681604 1269.068720 15: seq: 12, analog_in_state oid=9 next_clock=815643520 value=31505 Receive: 98 1269.681665 1269.068720 14: seq: 12, stats count=100 sum=118141 sumsq=772920 Receive: 99 1269.720643 1269.717056 12: seq: 13, shutdown clock=797373085 static_string_id=Command request b'Got EOF when reading from device' Stats 1270.7: gcodein=0 mcu: mcu_awake=0.002 mcu_task_avg=0.000016 mcu_task_stddev=0.000011 bytes_write=10830 bytes_read=43279 bytes_retransmit=0 bytes_invalid=0 send_seq=772 receive_seq=772 retransmit_seq=0 srtt=0.004 rttvar=0.000 rto=0.025 ready_bytes=0 upcoming_bytes=0 freq=72004942 host: mcu_awake=0.006 mcu_task_avg=0.000095 mcu_task_stddev=0.000317 bytes_write=5467 bytes_read=12532 bytes_retransmit=236 bytes_invalid=0 send_seq=696 receive_seq=690 retransmit_seq=696 srtt=0.000 rttvar=0.000 rto=0.400 ready_bytes=0 upcoming_bytes=6 freq=49999772 adj=49996362 heater_bed: target=0 temp=21.3 pwm=0.000 sysload=0.10 cputime=12.931 memavail=610832 print_time=305.455 buffer_time=0.000 print_stall=0 extruder: target=0 temp=21.8 pwm=0.000 Stats 1271.7: gcodein=0 mcu: mcu_awake=0.002 mcu_task_avg=0.000016 mcu_task_stddev=0.000011 bytes_write=10830 bytes_read=43279 bytes_retransmit=0 bytes_invalid=0 send_seq=772 receive_seq=772 retransmit_seq=0 srtt=0.004 rttvar=0.000 rto=0.025 ready_bytes=0 upcoming_bytes=1 freq=72004942 host: mcu_awake=0.006 mcu_task_avg=0.000095 mcu_task_stddev=0.000317 bytes_write=5467 bytes_read=12532 bytes_retransmit=236 bytes_invalid=0 send_seq=696 receive_seq=690 retransmit_seq=696 srtt=0.000 rttvar=0.000 rto=0.400 ready_bytes=0 upcoming_bytes=7 freq=49999772 adj=49996388 heater_bed: target=0 temp=21.3 pwm=0.000 sysload=0.10 cputime=12.946 memavail=608984 print_time=305.455 buffer_time=0.000 print_stall=0 extruder: target=0 temp=21.8 pwm=0.000 Stats 1272.7: gcodein=0 mcu: mcu_awake=0.002 mcu_task_avg=0.000016 mcu_task_stddev=0.000011 bytes_write=10830 bytes_read=43279 bytes_retransmit=0 bytes_invalid=0 send_seq=772 receive_seq=772 retransmit_seq=0 srtt=0.004 rttvar=0.000 rto=0.025 ready_bytes=0 upcoming_bytes=2 freq=72004942 host: mcu_awake=0.006 mcu_task_avg=0.000095 mcu_task_stddev=0.000317 bytes_write=5467 bytes_read=12532 bytes_retransmit=236 bytes_invalid=0 send_seq=696 receive_seq=690 retransmit_seq=696 srtt=0.000 rttvar=0.000 rto=0.400 ready_bytes=0 upcoming_bytes=8 freq=49999772 adj=49996382 heater_bed: target=0 temp=21.3 pwm=0.000 sysload=0.09 cputime=12.959 memavail=608984 print_time=305.455 buffer_time=0.000 print_stall=0 extruder: target=0 temp=21.8 pwm=0.000 Stats 1273.7: gcodein=0 mcu: mcu_awake=0.002 mcu_task_avg=0.000016 mcu_task_stddev=0.000011 bytes_write=10830 bytes_read=43279 bytes_retransmit=0 bytes_invalid=0 send_seq=772 receive_seq=772 retransmit_seq=0 srtt=0.004 rttvar=0.000 rto=0.025 ready_bytes=0 upcoming_bytes=3 freq=72004942 host: mcu_awake=0.006 mcu_task_avg=0.000095 mcu_task_stddev=0.000317 bytes_write=5467 bytes_read=12532 bytes_retransmit=236 bytes_invalid=0 send_seq=696 receive_seq=690 retransmit_seq=696 srtt=0.000 rttvar=0.000 rto=0.400 ready_bytes=0 upcoming_bytes=9 freq=49999772 adj=49996372 heater_bed: target=0 temp=21.3 pwm=0.000 sysload=0.09 cputime=12.974 memavail=607976 print_time=305.455 buffer_time=0.000 print_stall=0 extruder: target=0 temp=21.8 pwm=0.000 Stats 1274.7: gcodein=0 mcu: mcu_awake=0.002 mcu_task_avg=0.000016 mcu_task_stddev=0.000011 bytes_write=10830 bytes_read=43279 bytes_retransmit=0 bytes_invalid=0 send_seq=772 receive_seq=772 retransmit_seq=0 srtt=0.004 rttvar=0.000 rto=0.025 ready_bytes=0 upcoming_bytes=4 freq=72004942 host: mcu_awake=0.006 mcu_task_avg=0.000095 mcu_task_stddev=0.000317 bytes_write=5467 bytes_read=12532 bytes_retransmit=236 bytes_invalid=0 send_seq=696 receive_seq=690 retransmit_seq=696 srtt=0.000 rttvar=0.000 rto=0.400 ready_bytes=0 upcoming_bytes=10 freq=49999772 adj=49996364 heater_bed: target=0 temp=21.3 pwm=0.000 sysload=0.09 cputime=12.986 memavail=607728 print_time=305.455 buffer_time=0.000 print_stall=0 extruder: target=0 temp=21.8 pwm=0.000 ```printer.cfg
``` # This file contains pin mappings for the Creality CR6-SE with Rev. 4.5.3 Motherboard (Late 2020/2021) as the heater pins changed. # To use this config, during "make menuconfig" select the STM32F103 # with a "28KiB bootloader" and serial (on USART1 PA10/PA9) # communication. # Flash this firmware by copying "out/klipper.bin" to a SD card and # turning on the printer with the card inserted. The firmware # filename must end in ".bin" and must not match the last filename # that was flashed. # See docs/Config_Reference.md for a description of parameters. # The CR-6 stock extruder is defined by default. # Rotation distance is recalculated from the 95 steps/mm in the community firmware - Please always verify whether you actually get the correct extrusion length and adjust if necessary. # When using a BMG or Orbiter extruder uncomment the relevant section and comment out the stock Extruder # To change the BMG extruder to a Nema 14 with 10 tooth pinion change the gear ration from 51:17 to 51:10 # When input Shaper is enabled (uncomment below) the max_accel and max_accel_to_decel values can be increased. Without additional tuning max_accel can be safely increased to 1500 and max_accel_to_decel to 750 [include macros.cfg] [include mainsail.cfg] #[include KAMP_Settings.cfg] #[include adxl.cfg] [stepper_x] step_pin: PB8 dir_pin: !PB7 enable_pin: !PC3 rotation_distance: 40 microsteps: 16 endstop_pin: PC4 position_min: -5 position_endstop: -5 # position_max: 235 # Allow nozzle wipe positions position_max: 255 homing_speed: 50 [stepper_y] step_pin: PB6 dir_pin: PB5 enable_pin: !PC3 rotation_distance: 40 microsteps: 16 endstop_pin: PC5 position_min: -2 position_endstop: -2 position_max: 235 homing_speed: 50 [stepper_z] step_pin: PB4 dir_pin: !PB3 enable_pin: !PC3 rotation_distance: 8 microsteps: 16 endstop_pin: probe:z_virtual_endstop position_min: -1.5 position_max: 250 homing_speed: 4 second_homing_speed: 1 homing_retract_dist: 2.0 [extruder] max_extrude_only_distance: 1000.0 step_pin: PC2 dir_pin: !PB9 enable_pin: !PC3 microsteps: 16 min_extrude_temp: 0 # micro-swiss dual gear extruder (https://www.reddit.com/r/CR6/comments/10u9mdy/comment/j7bx82d/?utm_source=share&utm_medium=web2x&context=3) rotation_distance: 24.62 # stock extruder, stainless steel gear #rotation_distance: 36.87 # Orbiter extruder # gear_ratio: 7.5:1 # rotation_distance: 34.783 # BMG extruder # gear_ratio: 51:17 # rotation_distance: 23.132 # This iso only used for limiting, so put higher for easy nozzle switching nozzle_diameter: 0.600 filament_diameter: 1.750 heater_pin: PB14 sensor_type: EPCOS 100K B57560G104F sensor_pin: PB1 control: pid # tuned for stock hardware with 200 degree Celsius target pid_Kp: 14.32 pid_Ki: 0.81 pid_Kd: 63.12 min_temp: 0 max_temp: 275 # .6 nozzle -> recheck # pressure_advance: 0.096 # .4 nozzlle pressure_advance: 0.32 # Temporary for volumetric flow test max_extrude_cross_section: 20 [heater_bed] heater_pin: PB13 sensor_type: EPCOS 100K B57560G104F sensor_pin: PB0 control: pid # tuned for stock hardware with 50 degree Celsius target pid_Kp: 79.49 pid_Ki: 1.17 pid_Kd: 1349.52 min_temp: 0 max_temp: 120 [fan] pin: PB15 kick_start_time: 0.5 [mcu] serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0 restart_method: command # The rpi microcontroller is used as secondary. # Typically, both the X and Y axes # are connected to the main micro-controller. The rpi microcontroller is used # on non time-critical functions such as enclosure sensors, additional fan or # light sources [mcu host] serial: /tmp/klipper_host_mcu # Before printing the PROBE_CALIBRATE command needs to be issued # to run the probe calibration procedure, described at # docs/Probe_Calibrate.md, to find the correct z_offset. #[probe] #pin: PA4 #x_offset: 0.0 #y_offset: 0.0 ##z_offset: -0.175 #speed: 1 #lift_speed: 5 #samples_tolerance: 0.05 #samples_tolerance_retries: 2 #samples: 3 #activate_gcode: # TARE_PROBE # #[output_pin probe_tare] #pin: !PA5 #value: 1 #[output_pin probe_enable] #pin: PB2 # BED DISTANCE SENSOR [BDsensor] scl_pin:host:gpio17 sda_pin:host:gpio27 #scl_pin: PB12 #sda_pin: PA15 delay: 20 # 20us per pulse, this value should be >=18 but must be below 30 z_offset:0 # this `z_offset` must be set to 0. z_adjust:0.0 # z axis adjustment, replace the z_offset function. within -0.3 to 0.3mm x_offset: -23.5 y_offset: 0 #no_stop_probe: # enable this for fast probe, the toolhead will not stop at the probe point. position_endstop: 0.8 # this value must >0.5, the Z axis will be triggered after it measured the distance is below this value(mm) while homing z, recommend value is 0.5~1.0 #speed:0.8 # this speed only works for the z tilt and PROBE_ACCURACY command. # Disabled since I removed filament sensor for now # [filament_switch_sensor filament_sensor] # pause_on_runout: true # switch_pin: ^!PA7 [output_pin LED_pin] pin: PA6 # DEFAULT [printer] kinematics: cartesian # Originally 350, but bed made loud noise, so lowered this max_velocity: 235 square_corner_velocity: 5 max_z_velocity: 5 max_z_accel: 100 max_accel: 500 max_accel_to_decel: 500 # TWEAKED [printer] # Minimum from recommanded x and y input shaper results # x: 14100 # y: 4400 max_accel: 4400 max_accel_to_decel: 4400 [gcode_arcs] # Creality CR-6 SE specific configuration # The START_PRINT and END_PRINT macro's are called in the slicer start code # Slicer start code: start_print HOTEND_TEMP={material_print_temperature_layer_0} BED_TEMP={material_bed_temperature_layer_0} # Slicer end code: end_print # The end_print sets the part fan to maximum to speed up cooling of the hotend and waits for the hotend and bed to cool below 50 °C. # The end print macro can switch off the printer, this part is commented out as the RPI_MCU needs to be implemneted first. [bed_mesh] algorithm: bicubic # Max velocity of printer, because why not speed: 235 horizontal_move_z: 1 mesh_min: 20,20 mesh_max: 220,220 probe_count: 10,10 fade_start: 1 fade_end: 10 fade_target: 0 [safe_z_home] home_xy_position: 117.5,117.5 z_hop: 10 [force_move] enable_force_move: True [exclude_object] #*# <---------------------- SAVE_CONFIG ----------------------> #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. #*# #*# [bed_mesh default] #*# version = 1 #*# points = #*# 0.139167, 0.174167, 0.098333, 0.082500, 0.182500, 0.057500, -0.017500, 0.015000, -0.131667, -0.191667 #*# 0.052500, 0.058333, 0.122500, -0.001667, 0.071667, 0.102500, 0.022500, -0.029167, -0.069167, -0.224167 #*# 0.017500, 0.022500, -0.035000, 0.018333, 0.076667, 0.071667, -0.053333, -0.069167, -0.147500, -0.263333 #*# -0.067500, -0.081667, 0.010833, 0.038333, 0.005833, -0.050000, -0.034167, -0.109167, -0.193333, -0.256667 #*# -0.070833, -0.087500, -0.100833, 0.042500, 0.003333, -0.070833, -0.130000, -0.162500, -0.257500, -0.299167 #*# -0.108333, 0.003333, -0.025000, -0.052500, -0.023333, -0.053333, -0.147500, -0.229167, -0.249167, -0.299167 #*# -0.121667, 0.015000, -0.127500, -0.035833, -0.060000, -0.111667, -0.173333, -0.165833, -0.270000, -0.338333 #*# -0.097500, -0.037500, -0.029167, -0.057500, -0.105000, -0.101667, -0.101667, -0.196667, -0.305000, -0.325000 #*# -0.072500, -0.093333, -0.101667, -0.110833, -0.052500, -0.138333, -0.220833, -0.166667, -0.257500, -0.350833 #*# -0.050000, -0.082500, -0.126667, -0.085000, -0.225000, -0.187500, -0.157500, -0.155833, -0.188333, -0.355833 #*# x_count = 10 #*# y_count = 10 #*# mesh_x_pps = 2 #*# mesh_y_pps = 2 #*# algo = bicubic #*# tension = 0.2 #*# min_x = 20.0 #*# max_x = 219.97 #*# min_y = 20.0 #*# max_y = 219.97 #*# #*# [input_shaper] #*# shaper_type_x = zv #*# shaper_freq_x = 99.6 #*# shaper_type_y = mzv #*# shaper_freq_y = 38.6 ```I checked out other homing related issues like #65 and #57, but not could find anything helpful there. I tried loading a bed mesh before homing, but that does not fix the issue.
Any idea on what could be going on here?