Can't connect to MCU or upload

Basic Information:

Printer Model: Geeetech A20T
MCU / Printerboard: GT2560 V4.0
klippy.log
klippy.log (108.3 KB)
printer.cfg
printer.cfg (2.1 KB)
flash config

My issue 1:

So I have my RPi Zero 2 connected to my printer board directly via uart (uart 3 on atmega2560 and uart 0 on rpi). I have used this for some time with octoprint and marlin and it was working. I know that the default bootloader doesn’t support uploading firmware on uart 3 so I have tried to flash it with optiboot set to uart 3. Then I tried setting up klipper but I just can’t get it to connect. Even avrdude can’t upload to it. I tried so many things but nothing worked so I would be happy if somebody would help me. There was one time that I was able to upload to it and then connect to it but then I connected the screen to the mcu (was disconnected becouse I needed access to the spi so I can upload the bootloader) and connected relays for psu control and now it can’t connect again (maybe its becouse I just restarted it and isn’t connected with the screen or relays). I tried reflashing the atmega2560 with bootloader again and then flashing it with klipper but it just doesn’t communicate.

My issue 2 - Solved:

I want to set my BLTouch sensor pin to the same pin as z-min but it does’t let me do that.

Hello @Verustus !

To issue 2:

Obviously. You already use it in [stepper_z]

[stepper_z]
step_pin: PA3
dir_pin: PC7
enable_pin: !PA5
microsteps: 16
rotation_distance: 400
endstop_pin: ^PC7           # <-----
position_endstop: 0
position_min: 0
position_max: 240
position_min: 0.0

Read here how to setup a BLtouch.

https://www.klipper3d.org/BLTouch.html

I know that I have it there set as z-min but when I remove it it gives me error too. I use the z-min as sensor pin for bl-touch.

You do not remove it, you have to substitute it:

Thanks so much.

That is from the document I linked above.

I was able to connect to it once after I installed relays for psu controll but then I turned it off with those relays and I can’t upload or connect to it again I don’t get it. I have tried reflashing the bootloader with uspasp again and I can’t just connect to it with the RPi. Someone please help this is nightmare.

What was the output from avrdude?

Good luck, hcet14


I think that the problem has to be on the rpi side not with the printer board.
The communication was working until I removed octoprint and put klipper with mainsail and moonraker on it. There is something wrong with the serial. I was using /dev/ttyS0 before but now I can only /dev/ttyAMA0 becouse it changed it to serial1:
lrwxrwxrwx 1 root root 7 Sep 26 17:49 /dev/serial0 → ttyAMA0
lrwxrwxrwx 1 root root 5 Sep 26 17:49 /dev/serial1 → ttyS0

Did you try
ls /dev/serial/by-id/*
from Mcu: Serial connection closed / Timeout on connect / Wait for identify_response

That only works for serial over usb.

Fixed - broken wire, but couln’t upload directly with klipper make script had to use:
avrdude -v -q -p atmega2560 -c arduino -P /dev/ttyAMA0 -D -b 115200 -U flash:w:klipper/out/klipper.el
f.hex:i

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.