From da4a374b49b01b51794a7d2842b3a678fb5b5d42 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 8 Sep 2024 01:01:53 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20LCD=20pins=20cleanup=20-=20Sept?= =?UTF-8?q?=208?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/mega/pins_CNCONTROLS_11.h | 2 -- Marlin/src/pins/stm32f1/pins_CHITU3D_common.h | 3 +-- Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h | 9 +++----- .../src/pins/stm32f1/pins_JGAURORA_A5S_A1.h | 7 +++--- Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h | 6 +---- Marlin/src/pins/stm32f1/pins_MD_D301.h | 14 +++++------ .../pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h | 9 ++++---- Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h | 14 +++++------ Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h | 16 +++++++++---- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h | 16 +++++-------- .../src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h | 3 +-- .../pins/stm32f1/pins_MKS_ROBIN_NANO_common.h | 19 ++++++--------- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h | 21 +++++++++-------- Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h | 10 +++----- Marlin/src/pins/stm32f4/pins_ANET_ET4.h | 2 +- Marlin/src/pins/stm32f4/pins_LERDGE_K.h | 2 +- Marlin/src/pins/stm32f4/pins_LERDGE_S.h | 2 +- Marlin/src/pins/stm32f4/pins_LERDGE_X.h | 6 ++--- Marlin/src/pins/stm32f4/pins_MKS_ROBIN2.h | 21 +++++++++-------- .../pins/stm32f4/pins_TRONXY_CXY_446_V10.h | 23 +++++++++---------- 20 files changed, 93 insertions(+), 112 deletions(-) diff --git a/Marlin/src/pins/mega/pins_CNCONTROLS_11.h b/Marlin/src/pins/mega/pins_CNCONTROLS_11.h index b10539a4af..5c0c11033d 100644 --- a/Marlin/src/pins/mega/pins_CNCONTROLS_11.h +++ b/Marlin/src/pins/mega/pins_CNCONTROLS_11.h @@ -149,8 +149,6 @@ #if HAS_MARLINUI_U8GLIB #define DOGLCD_A0 26 #define DOGLCD_CS 24 - //#define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals-5-post.h - //#define DOGLCD_SCK -1 #endif #endif diff --git a/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h b/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h index 7f117dd659..2fd713ee04 100644 --- a/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h +++ b/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h @@ -137,10 +137,9 @@ #define TFT_RESET_PIN PF11 #define TFT_BACKLIGHT_PIN PD13 - #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT + #define LCD_USE_DMA_FSMC #define FSMC_CS_PIN PD7 #define FSMC_RS_PIN PD11 - #define TFT_CS_PIN FSMC_CS_PIN #define TFT_RS_PIN FSMC_RS_PIN #endif diff --git a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h index 2853796738..55100b1efb 100644 --- a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h +++ b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h @@ -291,20 +291,17 @@ * ILI9488 is not supported * Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp * - * If the screen stays white, disable 'LCD_RESET_PIN' - * to let the bootloader init the screen. + * If the screen stays white, disable 'TFT_RESET_PIN' to let the bootloader init the screen. * - * Setting an 'LCD_RESET_PIN' may cause a flicker when entering the LCD menu + * Setting a 'TFT_RESET_PIN' may cause a flicker when switching menus * because Marlin uses the reset as a failsafe to revive a glitchy LCD. */ //#define TFT_RESET_PIN PC6 // FSMC_RST #define TFT_BACKLIGHT_PIN PD13 - #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT - + #define LCD_USE_DMA_FSMC #define FSMC_CS_PIN PD7 // NE4 #define FSMC_RS_PIN PD11 // A0 - #define TFT_CS_PIN FSMC_CS_PIN #define TFT_RS_PIN FSMC_RS_PIN diff --git a/Marlin/src/pins/stm32f1/pins_JGAURORA_A5S_A1.h b/Marlin/src/pins/stm32f1/pins_JGAURORA_A5S_A1.h index 21ac51e279..507372771e 100644 --- a/Marlin/src/pins/stm32f1/pins_JGAURORA_A5S_A1.h +++ b/Marlin/src/pins/stm32f1/pins_JGAURORA_A5S_A1.h @@ -112,14 +112,13 @@ // TFT with FSMC interface // #if HAS_FSMC_TFT - #define LCD_BACKLIGHT_PIN PF11 + #define LCD_USE_DMA_FSMC #define FSMC_CS_PIN PD7 #define FSMC_RS_PIN PG0 - - #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT - #define TFT_CS_PIN FSMC_CS_PIN #define TFT_RS_PIN FSMC_RS_PIN + + #define LCD_BACKLIGHT_PIN PF11 #endif // diff --git a/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h b/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h index 5f7cc5103a..222698fa11 100644 --- a/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h +++ b/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h @@ -135,10 +135,9 @@ // TFT with FSMC interface // #if HAS_FSMC_TFT - #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT + #define LCD_USE_DMA_FSMC #define FSMC_CS_PIN PD7 // FSMC_NE1 #define FSMC_RS_PIN PD11 // A16 Register. Only one address needed - #define TFT_CS_PIN FSMC_CS_PIN #define TFT_RS_PIN FSMC_RS_PIN @@ -146,9 +145,6 @@ #define TFT_BACKLIGHT_PIN PD12 #define TFT_BACKLIGHT_PWM 150 // Brightness with alt. TIM4 chan 1 (1-255) - //#define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals-5-post.h - //#define DOGLCD_SCK -1 - // Buffer for Color UI #define TFT_BUFFER_WORDS 3200 #endif diff --git a/Marlin/src/pins/stm32f1/pins_MD_D301.h b/Marlin/src/pins/stm32f1/pins_MD_D301.h index c367a432f2..19445998b2 100644 --- a/Marlin/src/pins/stm32f1/pins_MD_D301.h +++ b/Marlin/src/pins/stm32f1/pins_MD_D301.h @@ -187,9 +187,6 @@ * to let the bootloader init the screen. */ -//#define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals-5-post.h -//#define DOGLCD_SCK -1 - // // TFT with FSMC interface // @@ -200,16 +197,17 @@ #define TOUCH_MISO_PIN PB4 // SPI2_MISO #define TOUCH_INT_PIN PB7 // PenIRQ coming from XPT2046 - #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT - #define LCD_BACKLIGHT_PIN PG10 - #define TFT_BACKLIGHT_PIN LCD_BACKLIGHT_PIN + #define LCD_USE_DMA_FSMC #define FSMC_CS_PIN PD7 // FSMC_NE1 #define FSMC_RS_PIN PE2 // A23 Register. Only one address needed + #define TFT_CS_PIN FSMC_CS_PIN + #define TFT_RS_PIN FSMC_RS_PIN + #define FSMC_DMA_DEV DMA1 #define FSMC_DMA_CHANNEL DMA_CH4 - #define TFT_CS_PIN FSMC_CS_PIN - #define TFT_RS_PIN FSMC_RS_PIN + #define LCD_BACKLIGHT_PIN PG10 + #define TFT_BACKLIGHT_PIN LCD_BACKLIGHT_PIN // Buffer for Color UI #define TFT_BUFFER_WORDS 3200 diff --git a/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h b/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h index 6add3ca01c..333cf85325 100644 --- a/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h @@ -137,16 +137,15 @@ // TFT with FSMC interface // #if HAS_FSMC_TFT - #define TFT_RESET_PIN PF15 - #define TFT_BACKLIGHT_PIN PF11 - - #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT + #define LCD_USE_DMA_FSMC #define FSMC_CS_PIN PD7 // NE4 #define FSMC_RS_PIN PG0 // A0 - #define TFT_CS_PIN FSMC_CS_PIN #define TFT_RS_PIN FSMC_RS_PIN + #define TFT_RESET_PIN PF15 + #define TFT_BACKLIGHT_PIN PF11 + #define TOUCH_BUTTONS_HW_SPI #define TOUCH_BUTTONS_HW_SPI_DEVICE 1 #endif diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h index 49c28c57bf..b9ab65e36d 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h @@ -171,22 +171,20 @@ * ILI9488 is not supported * Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp * - * If the screen stays white, disable 'TFT_RESET_PIN' - * to let the bootloader init the screen. + * If the screen stays white, disable 'TFT_RESET_PIN' to let the bootloader init the screen. * - * Setting an 'TFT_RESET_PIN' may cause a flicker when entering the LCD menu + * Setting a 'TFT_RESET_PIN' may cause a flicker when switching menus * because Marlin uses the reset as a failsafe to revive a glitchy LCD. */ - #define TFT_RESET_PIN PF6 - #define TFT_BACKLIGHT_PIN PG11 - - #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT + #define LCD_USE_DMA_FSMC #define FSMC_CS_PIN PG12 // NE4 #define FSMC_RS_PIN PF0 // A0 - #define TFT_CS_PIN FSMC_CS_PIN #define TFT_RS_PIN FSMC_RS_PIN + #define TFT_RESET_PIN PF6 + #define TFT_BACKLIGHT_PIN PG11 + #define TOUCH_BUTTONS_HW_SPI #define TOUCH_BUTTONS_HW_SPI_DEVICE 2 #define TFT_BUFFER_WORDS 14400 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h index ae4ee3268e..b7aaac12b9 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h @@ -271,19 +271,25 @@ // /** - * Note: MKS Robin TFT screens use various TFT controllers. - * If the screen stays white, disable 'LCD_RESET_PIN' - * to let the bootloader init the screen. + * Note: MKS Robin TFT screens use various TFT controllers + * Supported screens are based on the ILI9341, ST7789V and ILI9328 (320x240) + * ILI9488 is not supported + * Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp + * + * If the screen stays white, disable 'LCD_RESET_PIN' to let the bootloader init the screen. + * + * Setting an 'LCD_RESET_PIN' may cause a flicker when switching menus + * because Marlin uses the reset as a failsafe to revive a glitchy LCD. */ -#if ENABLED(TFT_CLASSIC_UI) +#if ENABLED(TFT_SCALED_DOGLCD) // Emulated DOGM SPI #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_RS EXP1_04_PIN #define BTN_ENC EXP1_02_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN -#elif ENABLED(TFT_COLOR_UI) +#elif ENABLED(HAS_GRAPHICAL_TFT) #define TFT_BUFFER_WORDS 14400 #endif diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h index 2d1bd7c8ca..6b563e9607 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h @@ -153,28 +153,24 @@ /** * Note: MKS Robin TFT screens use various TFT controllers. - * If the screen stays white, disable 'LCD_RESET_PIN' - * to let the bootloader init the screen. + * If the screen stays white, disable 'LCD_RESET_PIN' to let the bootloader init the screen. */ #if HAS_FSMC_TFT + #define LCD_USE_DMA_FSMC + #define FSMC_CS_PIN PD7 // NE4 + #define FSMC_RS_PIN PD11 // A0 + #define TFT_CS_PIN FSMC_CS_PIN // NE4 + #define TFT_RS_PIN FSMC_RS_PIN // A0 - #define TFT_CS_PIN PD7 // NE4 - #define TFT_RS_PIN PD11 // A0 #define LCD_RESET_PIN PC6 // FSMC_RST #define LCD_BACKLIGHT_PIN PD13 - #define FSMC_CS_PIN TFT_CS_PIN // NE4 - #define FSMC_RS_PIN TFT_RS_PIN // A0 - - #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT - #if NEED_TOUCH_PINS #define TOUCH_CS_PIN PC2 // SPI2_NSS #define TOUCH_SCK_PIN PB13 // SPI2_SCK #define TOUCH_MISO_PIN PB14 // SPI2_MISO #define TOUCH_MOSI_PIN PB15 // SPI2_MOSI #endif - #endif #if ENABLED(TFT_320x240) // TFT32/28 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h index ea82c13fba..357960d8a7 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h @@ -300,8 +300,7 @@ /** * Note: MKS Robin TFT screens use various TFT controllers. - * If the screen stays white, disable 'LCD_RESET_PIN' - * to let the bootloader init the screen. + * If the screen stays white, disable 'LCD_RESET_PIN' to let the bootloader init the screen. */ #if ENABLED(TFT_CLASSIC_UI) diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h index f057068028..6d644ed086 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h @@ -186,27 +186,22 @@ #if HAS_FSMC_TFT /** * Note: MKS Robin TFT screens use various TFT controllers. - * If the screen stays white, disable 'TFT_RESET_PIN' - * to let the bootloader init the screen. + * If the screen stays white, disable 'TFT_RESET_PIN' to let the bootloader init the screen. */ + #define LCD_USE_DMA_FSMC + #define FSMC_CS_PIN PD7 + #define FSMC_RS_PIN PD11 + #define TFT_CS_PIN FSMC_CS_PIN + #define TFT_RS_PIN FSMC_RS_PIN + #define TFT_RESET_PIN PC6 // FSMC_RST #define TFT_BACKLIGHT_PIN PD13 - //#define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals-5-post.h - //#define DOGLCD_SCK -1 - #define TOUCH_CS_PIN PA7 // SPI2_NSS #define TOUCH_SCK_PIN PB13 // SPI2_SCK #define TOUCH_MISO_PIN PB14 // SPI2_MISO #define TOUCH_MOSI_PIN PB15 // SPI2_MOSI - #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT - #define FSMC_CS_PIN PD7 - #define FSMC_RS_PIN PD11 - - #define TFT_CS_PIN FSMC_CS_PIN - #define TFT_RS_PIN FSMC_RS_PIN - #define TOUCH_BUTTONS_HW_SPI #define TOUCH_BUTTONS_HW_SPI_DEVICE 2 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h index d5689c1e71..f89056d783 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h @@ -322,22 +322,25 @@ // #if HAS_FSMC_TFT /** - * Note: MKS Robin TFT screens use various TFT controllers. - * If the screen stays white, disable 'LCD_RESET_PIN' - * to let the bootloader init the screen. + * Note: MKS Robin TFT screens use various TFT controllers + * Supported screens are based on the ILI9341, ST7789V and ILI9328 (320x240) + * ILI9488 is not supported + * Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp + * + * If the screen stays white, disable 'TFT_RESET_PIN' to let the bootloader init the screen. + * + * Setting a 'TFT_RESET_PIN' may cause a flicker when switching menus + * because Marlin uses the reset as a failsafe to revive a glitchy LCD. */ - #define TFT_RESET_PIN LCD_RESET_PIN - #define TFT_BACKLIGHT_PIN LCD_BACKLIGHT_PIN + #define TFT_RESET_PIN FSMC_23_PIN + #define TFT_BACKLIGHT_PIN FSMC_24_PIN + #define LCD_USE_DMA_FSMC #define FSMC_CS_PIN FSMC_19_PIN // NE4 #define FSMC_RS_PIN FSMC_20_PIN // A0 - #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT #define TFT_CS_PIN FSMC_CS_PIN #define TFT_RS_PIN FSMC_RS_PIN - #define LCD_RESET_PIN FSMC_23_PIN - #define LCD_BACKLIGHT_PIN FSMC_24_PIN - #define TFT_BUFFER_WORDS 14400 #if NEED_TOUCH_PINS diff --git a/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h b/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h index 451943a6f7..2f9d706b29 100644 --- a/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h +++ b/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h @@ -135,26 +135,22 @@ /** * Note: MKS Robin TFT screens use various TFT controllers * Supported screens are based on the ILI9341, ST7789V and ILI9328 (320x240) - * ILI9488 is not supported. + * ILI9488 is not supported * Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp * * If the screen stays white, disable 'LCD_RESET_PIN' to let the bootloader init the screen. * - * Setting an 'LCD_RESET_PIN' may cause a flicker when entering the LCD menu + * Setting an 'LCD_RESET_PIN' may cause a flicker when switching menus * because Marlin uses the reset as a failsafe to revive a glitchy LCD. */ #define TFT_RESET_PIN PF11 #define TFT_BACKLIGHT_PIN PD13 + #define LCD_USE_DMA_FSMC #define FSMC_CS_PIN PD7 // NE4 #define FSMC_RS_PIN PD11 // A0 - #define TFT_CS_PIN FSMC_CS_PIN #define TFT_RS_PIN FSMC_RS_PIN - - #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT - - #define ANYCUBIC_TFT35 #else #define LCD_RESET_PIN PF11 #define LCD_BACKLIGHT_PIN PD13 diff --git a/Marlin/src/pins/stm32f4/pins_ANET_ET4.h b/Marlin/src/pins/stm32f4/pins_ANET_ET4.h index c2b2512f4a..79b6483785 100644 --- a/Marlin/src/pins/stm32f4/pins_ANET_ET4.h +++ b/Marlin/src/pins/stm32f4/pins_ANET_ET4.h @@ -140,7 +140,7 @@ #define TFT_RS_PIN PD13 #if HAS_FSMC_TFT - #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT + #define LCD_USE_DMA_FSMC #define FSMC_CS_PIN TFT_CS_PIN #define FSMC_RS_PIN TFT_RS_PIN #define TFT_INTERFACE_FSMC_8BIT diff --git a/Marlin/src/pins/stm32f4/pins_LERDGE_K.h b/Marlin/src/pins/stm32f4/pins_LERDGE_K.h index 83062a5487..879c318f85 100644 --- a/Marlin/src/pins/stm32f4/pins_LERDGE_K.h +++ b/Marlin/src/pins/stm32f4/pins_LERDGE_K.h @@ -250,9 +250,9 @@ #define TFT_RESET_PIN PD6 #define TFT_BACKLIGHT_PIN PD3 + // TODO: See if FSMC DMA can work #define FSMC_CS_PIN PD7 #define FSMC_RS_PIN PD11 - #define TFT_CS_PIN FSMC_CS_PIN #define TFT_RS_PIN FSMC_RS_PIN diff --git a/Marlin/src/pins/stm32f4/pins_LERDGE_S.h b/Marlin/src/pins/stm32f4/pins_LERDGE_S.h index c7c9e3db3b..b72e146ad3 100644 --- a/Marlin/src/pins/stm32f4/pins_LERDGE_S.h +++ b/Marlin/src/pins/stm32f4/pins_LERDGE_S.h @@ -209,9 +209,9 @@ #define TFT_RESET_PIN PD6 #define TFT_BACKLIGHT_PIN PD3 + // TODO: See if FSMC DMA can work #define FSMC_CS_PIN PD7 #define FSMC_RS_PIN PD11 - #define TFT_CS_PIN FSMC_CS_PIN #define TFT_RS_PIN FSMC_RS_PIN diff --git a/Marlin/src/pins/stm32f4/pins_LERDGE_X.h b/Marlin/src/pins/stm32f4/pins_LERDGE_X.h index f795cc35ac..43b4f02961 100644 --- a/Marlin/src/pins/stm32f4/pins_LERDGE_X.h +++ b/Marlin/src/pins/stm32f4/pins_LERDGE_X.h @@ -148,15 +148,15 @@ #endif #define ST7796S_INVERTED + // TODO: See if FSMC DMA can work #define FSMC_CS_PIN PD7 #define FSMC_RS_PIN PD11 + #define TFT_CS_PIN FSMC_CS_PIN + #define TFT_RS_PIN FSMC_RS_PIN #define TFT_RESET_PIN PD6 #define TFT_BACKLIGHT_PIN PD3 - #define TFT_CS_PIN FSMC_CS_PIN - #define TFT_RS_PIN FSMC_RS_PIN - #define TOUCH_CS_PIN PB6 #define TOUCH_SCK_PIN PB3 #define TOUCH_MOSI_PIN PB5 diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN2.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN2.h index 15f5d36634..3018a2d68c 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN2.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN2.h @@ -112,19 +112,22 @@ // #if HAS_FSMC_TFT /** - * Note: MKS Robin TFT screens use various TFT controllers. - * If the screen stays white, disable 'LCD_RESET_PIN' - * to let the bootloader init the screen. + * Note: MKS Robin TFT screens use various TFT controllers + * Supported screens are based on the ILI9341, ST7789V and ILI9328 (320x240) + * ILI9488 is not supported + * Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp + * + * If the screen stays white, disable 'TFT_RESET_PIN' to let the bootloader init the screen. + * + * Setting a 'TFT_RESET_PIN' may cause a flicker when switching menus + * because Marlin uses the reset as a failsafe to revive a glitchy LCD. */ - #define LCD_RESET_PIN PD13 - #define LCD_BACKLIGHT_PIN PD12 - - #define TFT_RESET_PIN LCD_RESET_PIN - #define TFT_BACKLIGHT_PIN LCD_BACKLIGHT_PIN + #define TFT_RESET_PIN PD13 + #define TFT_BACKLIGHT_PIN PD12 + #define LCD_USE_DMA_FSMC #define FSMC_CS_PIN PG12 // NE4 #define FSMC_RS_PIN PF12 // A0 - #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT #define TFT_CS_PIN FSMC_CS_PIN #define TFT_RS_PIN FSMC_RS_PIN diff --git a/Marlin/src/pins/stm32f4/pins_TRONXY_CXY_446_V10.h b/Marlin/src/pins/stm32f4/pins_TRONXY_CXY_446_V10.h index 7e35bfd08f..1582397320 100644 --- a/Marlin/src/pins/stm32f4/pins_TRONXY_CXY_446_V10.h +++ b/Marlin/src/pins/stm32f4/pins_TRONXY_CXY_446_V10.h @@ -172,22 +172,21 @@ // TFT with FSMC interface // #if HAS_FSMC_TFT - #define TOUCH_CS_PIN PD11 - #define TOUCH_SCK_PIN PB13 - #define TOUCH_MISO_PIN PB14 - #define TOUCH_MOSI_PIN PB15 + #define LCD_USE_DMA_FSMC + //#define FSMC_DMA_DEV DMA2 // Maple + //#define FSMC_DMA_CHANNEL DMA_CH5 // Maple + #define FSMC_CS_PIN PG12 + #define FSMC_RS_PIN PG2 + #define TFT_CS_PIN FSMC_CS_PIN + #define TFT_RS_PIN FSMC_RS_PIN #define TFT_RESET_PIN PB12 #define TFT_BACKLIGHT_PIN PG8 - #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT - #define FSMC_DMA_DEV DMA2 - #define FSMC_DMA_CHANNEL DMA_CH5 - #define FSMC_CS_PIN PG12 - #define FSMC_RS_PIN PG2 - - #define TFT_CS_PIN FSMC_CS_PIN - #define TFT_RS_PIN FSMC_RS_PIN + #define TOUCH_CS_PIN PD11 + #define TOUCH_SCK_PIN PB13 + #define TOUCH_MISO_PIN PB14 + #define TOUCH_MOSI_PIN PB15 #if ENABLED(TFT_LVGL_UI) #define HAS_SPI_FLASH_FONT 1