Kaan
January 21, 2023, 12:48pm
1
Basic Information:
Printer Model: S1 Pro
MCU / Printerboard: STM32F4
Reprap Discount display needs two files to be patched for it to work properly.
Mentioned in detailed here,
opened 10:00AM - 31 Dec 21 UTC
closed 12:53PM - 12 Mar 22 UTC
Stale
<!-- Directions have recently changed. Do not open this ticket without
followi… ng the directions at: https://www.klipper3d.org/Contact.html -->
Hi folks 👋
Here is situation. My Klipper works on Raspberry Pi4 + BTT SKR2 (rev.b). Everything seems looking good but I have an issue. The display which is named as "RepRapDiscount 128x64 Full Graphic Smart Controller" (st7920) shows picture incorrectly with some line shifts which makes "broken picture" feelings.

Pins for that display configured as an example in `sample-lcd.cfg`:
```
##########################
[board_pins]
aliases:
# EXP1 header
EXP1_1=PC5, EXP1_3=PB1, EXP1_5=PE10, EXP1_7=PE12, EXP1_9=<GND>,
EXP1_2=PB0, EXP1_4=PE9, EXP1_6=PE11, EXP1_8=PE13, EXP1_10=<5V>,
# EXP2 header
EXP2_1=PA6, EXP2_3=PE7, EXP2_5=PB2, EXP2_7=PC4, EXP2_9=<GND>,
EXP2_2=PA5, EXP2_4=PA4, EXP2_6=PA7, EXP2_8=<RST>, EXP2_10=<NC>
[display]
lcd_type: st7920
cs_pin: EXP1_4
sclk_pin: EXP1_5
sid_pin: EXP1_3
encoder_pins: ^EXP2_3, ^EXP2_5
click_pin: ^!EXP1_2
#kill_pin: ^!EXP2_8
##########################
```
At the sametime the same display on the same motherboard connected with the same cable but on Marlin firmware works perfectly well! No any line shifts. 🤔
Does anyone have any ideas how to make display works with Klipper?
I tried to edit the following file `/home/pi/klipper/klippy/extras/display/st7920.py` and increased (as I thought) delays
```
ST7920_CMD_DELAY = .000200
ST7920_SYNC_DELAY = .000200,
```
deleted _st7920.pyc_, did `make clean`, compiled firmware, deployed to SKR2, but nothing changed.
Can these patches be incorporated into main?
rabman
April 20, 2023, 3:10am
2
After installing the latest Klipper, I too have a garbled display with offset characters, running on a stock Ender 3 Pro. The printer contains a version 4.2.2 board with an STM clone (GD32F103) for the mcu. I assume it also has an ST7920 variant, probably due to part sourcing/shortage issues, resulting in the bad display behavior.
I believe this is the same issue referenced here:
Ender 3 pro lcd Text lines jumbled - General Discussion - Klipper
Incorporating these two files would be helpful as I would like to stay current on the main Klipper branch rather than having to potentially merge every time I grab a newer release. These changes also shouldn’t result in any negative impact when running on a genuine ST7920.
Thank you!