LCD not working on STM-based MCU

Basic Information:

Printer Model: FlashForge Creator Pro
MCU / Printerboard: BTT SKR Pro v1.1
klippy.log

Fill out above information and in all cases attach your klippy.log file. Pasting your printer.cfg is not needed

Describe your issue:

Hello. I try to migrate my old FlashForge printer on new MCU board and all work fine till I started to attach legacy display. There is hd44870_spi display. Before connect I used my old creality board from Ender 3 as sandbox for display connection and all work fine. Display shows menu and buttons work properly. When I tried attach display to new MCU board screen shows nothing and always empty (to standard EXP1 port). I tried to analyse signal and saw difference for signal timing on software spi bus. For Ender 3 board data pack spent 250-300 ms, for a new board it’s 15ms. I tied to setup spi_speed at minimum value like 100000 and no changed. Probably someone has an idea what’s exactly root cause and could route me on right way? Thx!

Schematics might help :slightly_smiling_face:

Thx for proposal but I still do not see what exactly root cause I have. Looks like spi works too fast on this STM. I tested different pins and different LCD’s - no changes. Going to try I2C connection.

Not sure, but check hd44780: Make delays configurable by user. by seho85 · Pull Request #5318 · Klipper3d/klipper · GitHub

1 Like

Thx for good idea. Looks like I should patch existing spi_software regarding to my expectations. Will share my results

Would like to share my results. I’ve solved issue. As I expected it was depend on software spi speed on output pins. For BTT SKR Pro (based on STM32F470) it’s ver fast for old controller. Delay between commands less than 2 microseconds (in datasheet we need to delay during init stage more than 100 mks). I added hardware delay into source code and all work fine now. Going to add configurable delay and provide PR. Probably it will be useful for other.

1 Like