#28569·Marlin

[BUG] Display on SPI Interface seperate from SD does not work

Author: kinsi55Created Sep 10, 2026Updated Sep 10, 2026
LabelsBug: Potential ?

Did you test the latest bugfix-2.1.x code?

Yes, and the problem still exists.

Bug Description

I've been trying to use the Bugfix Branch to try out FTM and unfortunately cannot get my Display to work with it. Please forgive the structure of this issue, I have tried a lot of things and wanted to include all details that I have.

I have defined the Pins used by the LCD to the Hardware SPI1 pins that the LCD is connected to:

#define DOGLCD_CS EXP2_07_PIN //PE12
#define DOGLCD_A0 EXP1_04_PIN //PC6
#define DOGLCD_MOSI EXP2_06_PIN //PA7
#define DOGLCD_SCK EXP2_02_PIN //PA5
#define LCD_RESET_PIN EXP1_03_PIN //PD13

Simply trying to compile yields a compilation error:

.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: .pio/build/mks_robin_nano_v3_1/src/src/lcd/dogm/u8g/u8g_dev_st7565_64128n_HAL.cpp.o:(.data.u8g_dev_st7565_64128n_HAL_2x_sw_spi+0x8): undefined reference to `u8g_com_HAL_STM32_sw_spi_fn(_u8g_t, unsigned char, unsigned char, void)'
  • Manually adding #define FORCE_SOFT_SPI allows for compilation however in practice results in a blank screen which is an issue in itself (I would LOVE if hardware SPI would work - On 2.1.2.7 SW SPI is forced and simply forcing HW SPI does not work)

  • If I undefine DOGLCD_MOSI, DOGLCD_SCK the build succeeds without FORCE_SOFT_SPI - I then get displayed the boot splash screen however nothing after (Independent of if an SD is inserted or not)

  • Then undefining SDSUPPORT (With DOGLCD_MOSI and DOGLCD_SCK configured again) yields full functionality of the LCD

Bug Timeline

Works on 2.1.2.7 - Oddly on the first commit after the 2.1.2.7 release its reproducible

Expected behavior

Screen should work, ideally with HW SPI

Actual behavior

Refer to Description

Steps to Reproduce

Regression from 2.1.2.7 (No compilation / No output with SWSPI):

python .\buildroot\bin\opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V3_1
python .\buildroot\bin\opt_set LCD_CONTRAST_DEFAULT 210
python .\buildroot\bin\opt_add VIKI2 XYZ_HOLLOW_FRAME REVERSE_ENCODER_DIRECTION SDCARD_READONLY SDSUPPORT REINIT_NOISY_LCD

python .\buildroot\bin\opt_set SERIAL_PORT -1

python .\buildroot\bin\opt_set DOGLCD_CS EXP2_07_PIN
python .\buildroot\bin\opt_set DOGLCD_A0 EXP1_04_PIN
python .\buildroot\bin\opt_set DOGLCD_MOSI EXP2_06_PIN
python .\buildroot\bin\opt_set DOGLCD_SCK EXP2_02_PIN
python .\buildroot\bin\opt_set LCD_RESET_PIN EXP1_03_PIN

Version of Marlin Firmware

bugfix e2817dbec4256220845de5a6bf88174981209e4d

Printer model

No response

Electronics

MKS Robin Nano V3.1, using the onboard Micro SD (Connected to SPI3)

LCD/Controller

I use a bare 12864-06D Connected to SPI1, its also the display used by the VIKI2 which is what I configure in Marlin

Other add-ons

No response

Bed Leveling

None

Your Slicer

None

Host Software

None

Don't forget to include

  • A ZIP file containing your Configuration.h and Configuration_adv.h.

Additional information & file uploads

files.zip