Basic Information:
Printer Model: custom-made
MCU / Printerboard: custom-made
klippy.log
not relevant
Describe your issue:
I have recently installed a simple switch filament runout sensor. As my custom boards are not having a dedicated channel for that, I temporarily wired it to one of analog inputs of Atmega2560, enabling internal pull-up resistor. It worked fine for some time. But in the middle of the third 2-hours print it triggered, whereas the filament was present. I have checked the voltage and found it zero despite the switch was not engaged (switch pulls pin to ground).
After microcontroller power cycled, everything was okay.
I though it might be the fault of the atmega pin, so I replaced the chip, flashed it and… it repeated after some time. I had added external pull-up resistor. Next time it galse triggered, I checked the voltage, and it was high, whereas klipper showed the pin is in LOW state. So, I do believe this is a bug somewhere in the microcontroller firmware… Any ideas?
Thanks!