markniu / Bed_Distance_sensor

Auto bed level with High resolution distance sensor
269 stars 26 forks source link

getting MCU 'mcu' shutdown: Timer too close when running realtime Z Adjust. #141

Open drupi79 opened 3 months ago

drupi79 commented 3 months ago

I'm getting a MCU 'mcu' shutdown: Timer too close when running real-time Z Adjust. if I go back to just using KAMP or the bed mesh I don't have the issues. this happens with my BDSensor 1.1 and 1.2 running on Ender 3's with 4.2.7 Creality MCU's and Pi 4 4GB

markniu commented 3 months ago

you can increase the communication speed by reduce the delayvalue in section [BDsensor] from 20 to 8 for BDsensor V1.2, and also try to slow down the printing speed of first layer or the max_accelvalue.

markniu commented 3 months ago

here I just added a variables for the sample time,need to update and compile&reflash klipper.bin image

drupi79 commented 3 months ago

so did the update for this and added the rt_sample_time line to my config and now I get a "Unable to obtain 'I2CBDr' response" during homing when starting a print.

markniu commented 3 months ago

seems that you have updated the code, but need to compile and reflash the firmware.

drupi79 commented 3 months ago

you mean flash the BDsensor or klipper? because I reflashed the printer this morning and still have the same error after it homes for printer start

markniu commented 3 months ago

flash the klipper.bin. you can try again. maybe you forget to recompile or the flash not success. the mcu can't recognize this new command rt_sample_time if the firmware is not updated.

drupi79 commented 3 months ago

recompiled and reflashed the printer. again only getting the Unable to obtain 'I2CBDr when the printer tries to home after starting the print. if I go back to doing KAMP I have zero issues. it's only when I try to use realtime Z

markniu commented 3 months ago

could you check if the BD_sensor.c is the latest as the shown below, and how about remove the rt_sample_time in the cfg file? you can test it just send BDSENSOR_SET REAL_TIME_HEIGHT=0.3 and no need to start a print. image

Townie-au commented 3 months ago

Also try this My klipper says dirty after installing bdsensor If it does... Log in SSH Run ./Bed_Distance_sensor/klipper/uninstall.sh (If this doesn't work. Run Sudo chmod +X ./Bed_Distance_sensor/klipper/uninstall.sh) Sudo rm -r ./Bed_Distance_sensor Go back to Mainsail Do soft recovery on klipper Make sure everything is updated Reboot Now start marks install guide again When you run make and the list scrolls through make sure BD Sensor is in the list.

Billy-d-Kidd commented 3 months ago

This script does not seem to like Kiauh. So you will need to flash it at command prompt.

Townie-au commented 4 weeks ago

I'm getting this issue again. I had it working for a bit and then updated klipper, BD sensor, Moonraker etc and now I get it again. I've added rt_sample time and reduced delay to 8. The before layer change gcode is in the sliced. I've removed all bed mesh related settings and data from my config.

Townie-au commented 4 weeks ago

klippy.log (18).txt

markniu commented 3 weeks ago

How about the CPU loading while printing with SSH command htop? and maybe need to slow down the printing speed of first layer.

I'm getting this issue again. I had it working for a bit and then updated klipper, BD sensor, Moonraker etc and now I get it again. I've added rt_sample time and reduced delay to 8. The before layer change gcode is in the sliced. I've removed all bed mesh related settings and data from my config.

Townie-au commented 3 weeks ago

How about the CPU loading while printing with SSH command htop? and maybe need to slow down the printing speed of first layer.

I'm getting this issue again. I had it working for a bit and then updated klipper, BD sensor, Moonraker etc and now I get it again. I've added rt_sample time and reduced delay to 8. The before layer change gcode is in the sliced. I've removed all bed mesh related settings and data from my config.

Thanks Mark

Ok. I'll give that a go.

Townie-au commented 3 weeks ago

I slowed down 80% Screenshot_20240816-191234 Screenshot_20240816-191314 Screenshot_20240816-191414

Townie-au commented 3 weeks ago

If I enable it manually without printing the bed does move up and down.

Townie-au commented 3 weeks ago

Screenshot_20240816-192105

Townie-au commented 3 weeks ago

klippy.log (21).txt

Townie-au commented 3 weeks ago

I just did a print of a different gcode and worked correctly. This wasn't sliced and uploaded recently.

markniu commented 3 weeks ago

or continue to increase the value rt_sample_time. if still happen, you can disable the real time level to see if it caused that problem.

Townie-au commented 3 weeks ago

I tried all different values for that went up to 32. Yes it completed with realtime levelling disabled. I just tried reslicing again but same result. 🤔