kisslorand / BTT-TFT-FW

Precompiled FW for Bigtreetech TFTs and compatible MKS TFTs
20 stars 3 forks source link

MKS TFT28 from artillery sidewinder X2 and Klipper #12

Open R110forever opened 8 months ago

R110forever commented 8 months ago

Hi !

First of all, thank you for the amazing work.

I somehow have a verry specific problem and I don't know where to look (And I don't know if it's solvable).

I have an Artillery Sidewinder X2 on witch I installed Klipper (Added a raspberry inside and re-wired the filament runout sensor so it's connected directly on the board) and everything works fine exept for the screen. It is normal because the screen communicate via UART and klipper doesn't use that connection.

Photo 1

I noticed however that the screen board have some solder pads labeled CS, MOSI, MISO and SCK. So I wondered if I could use that to connect the screen with klipper. I then soldered some wires and used the pins on the EXP2 connector of the mainboard as followed :+1:

Screen       Mainboard
CS               PB3
SCK             PC10
MOSI          PC12
MISO          PC11

Photo 2

Photo 3

On the software side of the screen, I flashed the patched bootloader and the MKS_GD_TFT28_V4_0.27.x.bin from this repo and the touch mode seems to work fine except that it says "printer not connected" since it's klipper on the other side.

IMG_20240109_104808

Now that this works, I edited my "printer.cfg" file to try to communicate with the screen in "Marlin_Mode" as followed :

[display]
lcd_type: emulated_st7920
#   Set to "emulated_st7920" for emulated_st7920 displays.
en_pin: PB3
spi_software_sclk_pin: PC10
spi_software_mosi_pin: PC12
spi_software_miso_pin: PC11
#   The pins connected to an emulated_st7920 type lcd. The en_pin
#   corresponds to the cs_pin of the st7920 type lcd,
#   spi_software_sclk_pin corresponds to sclk_pin and
#   spi_software_mosi_pin corresponds to sid_pin. The
#   spi_software_miso_pin needs to be set to an unused pin of the
#   printer mainboard as the st7920 as no MISO pin but the software
#   spi implementation requires this pin to be configured.

When I restart the firmware, the screen scrambles then turn white.

IMG_20240109_104903

If I press reset, the screen reboot and show what seems to be an error message but it's unreadable.

IMG_20240109_104923

I feel like it's not far from working but at this point, I don't know what to do. Does someone have a suggestion on what to test ?

Thanks in advance