Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Miscellaneous TFT improvements #25359

Merged
merged 7 commits into from
Mar 27, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -3195,7 +3195,7 @@
*/
#define TFT_FONT NOTOSANS

//#define TFT_SHARED_SPI // SPI is shared between TFT display and other devices. Disable async data transfer
//#define TFT_SHARED_IO // IO is shared between TFT display and other devices. Disable async data transfer
#endif

#if ENABLED(TFT_LVGL_UI)
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/LPC1768/tft/tft_spi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ void TFT_SPI::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Coun
DataTransferBegin(DATASIZE_16BIT);
SPIx.dmaSendAsync(Data, Count, MemoryIncrease);

TERN_(TFT_SHARED_SPI, while (isBusy()));
TERN_(TFT_SHARED_IO, while (isBusy()));
}

#endif // HAS_SPI_TFT
8 changes: 5 additions & 3 deletions Marlin/src/HAL/STM32/tft/tft_fsmc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ void TFT_FSMC::Init() {

HAL_SRAM_Init(&SRAMx, &Timing, &ExtTiming);

__HAL_RCC_DMA2_CLK_ENABLE();

#ifdef STM32F1xx
DMAtx.Instance = DMA2_Channel1;
__HAL_RCC_DMA1_CLK_ENABLE();
DMAtx.Instance = DMA1_Channel1;
jmz52 marked this conversation as resolved.
Show resolved Hide resolved
#elif defined(STM32F4xx)
__HAL_RCC_DMA2_CLK_ENABLE();
DMAtx.Instance = DMA2_Stream0;
DMAtx.Init.Channel = DMA_CHANNEL_0;
DMAtx.Init.FIFOMode = DMA_FIFOMODE_ENABLE;
Expand Down Expand Up @@ -174,6 +174,8 @@ void TFT_FSMC::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Cou
DMAtx.Init.PeriphInc = MemoryIncrease;
HAL_DMA_Init(&DMAtx);
HAL_DMA_Start(&DMAtx, (uint32_t)Data, (uint32_t)&(LCD->RAM), Count);

TERN_(TFT_SHARED_IO, while (isBusy()));
}

void TFT_FSMC::Transmit(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Count) {
Expand Down
3 changes: 2 additions & 1 deletion Marlin/src/HAL/STM32/tft/tft_spi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ void TFT_SPI::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Coun

SET_BIT(SPIx.Instance->CR2, SPI_CR2_TXDMAEN); // Enable Tx DMA Request

TERN_(TFT_SHARED_SPI, while (isBusy()));
TERN_(TFT_SHARED_IO, while (isBusy()));
}


Expand All @@ -261,6 +261,7 @@ void TFT_SPI::Transmit(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Count)
SET_BIT(SPIx.Instance->CR2, SPI_CR2_TXDMAEN); // Enable Tx DMA Request

HAL_DMA_PollForTransfer(&DMAtx, HAL_DMA_FULL_TRANSFER, HAL_MAX_DELAY);
while ( __HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_BSY)) {}
Abort();
}

Expand Down
2 changes: 2 additions & 0 deletions Marlin/src/HAL/STM32F1/tft/tft_fsmc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ void TFT_FSMC::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Cou
dma_set_num_transfers(FSMC_DMA_DEV, FSMC_DMA_CHANNEL, Count);
dma_clear_isr_bits(FSMC_DMA_DEV, FSMC_DMA_CHANNEL);
dma_enable(FSMC_DMA_DEV, FSMC_DMA_CHANNEL);

TERN_(TFT_SHARED_IO, while (isBusy()));
}

void TFT_FSMC::Transmit(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Count) {
Expand Down
11 changes: 11 additions & 0 deletions Marlin/src/HAL/STM32F1/tft/tft_fsmc.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,17 @@

#include <libmaple/dma.h>

#ifndef FSMC_DMA_DEV
#define FSMC_DMA_DEV DMA2
#else
#error "You are trying to use custom FSMC_DMA_DEV value. Remove this line to continue at your own risk."
jmz52 marked this conversation as resolved.
Show resolved Hide resolved
#endif
#ifndef FSMC_DMA_CHANNEL
#define FSMC_DMA_CHANNEL DMA_CH5
#else
#error "You are trying to use custom FSMC_DMA_CHANNEL value. Remove this line to continue at your own risk."
#endif

#define DATASIZE_8BIT DMA_SIZE_8BITS
#define DATASIZE_16BIT DMA_SIZE_16BITS
#define TFT_IO_DRIVER TFT_FSMC
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/STM32F1/tft/tft_spi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ void TFT_SPI::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Coun
DataTransferBegin();
SPIx.dmaSendAsync(Data, Count, MemoryIncrease == DMA_MINC_ENABLE);

TERN_(TFT_SHARED_SPI, while (isBusy()));
TERN_(TFT_SHARED_IO, while (isBusy()));
}

void TFT_SPI::Transmit(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Count) {
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/lcd/tft_io/ili9328.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#define ILI9328_ETMOD_ID0 0x0010 // 0 - Horizontal Decrement / 1 - Horizontal Increment
#define ILI9328_ETMOD_AM 0x0008 // 0 - Horizontal / 1 - Vertical

// MKS Robin TFT v1.1 - 320x240 ; Cable on the left side
// MKS Robin TFT v1.1 - 320x240 ; FPC cable on the left side

#if TFT_ROTATION == TFT_ROTATE_180
#define ILI9328_DRVCTL_DATA 0x0000
Expand Down
39 changes: 20 additions & 19 deletions Marlin/src/lcd/tft_io/ili9341.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
#define ILI9341_MADCTL_RGB 0x00
#define ILI9341_MADCTL_MH 0x04 // Horizontal Refresh Order

#define ILI9341_ORIENTATION_UP ILI9341_MADCTL_MY // 240x320 ; Cable on the upper side
#define ILI9341_ORIENTATION_RIGHT ILI9341_MADCTL_MV // 320x240 ; Cable on the right side
#define ILI9341_ORIENTATION_LEFT ILI9341_MADCTL_MY | ILI9341_MADCTL_MX | ILI9341_MADCTL_MV // 320x240 ; Cable on the left side
#define ILI9341_ORIENTATION_DOWN ILI9341_MADCTL_MX // 240x320 ; Cable on the upper side
#define ILI9341_ORIENTATION_TOP ILI9341_MADCTL_MY // 240x320 ; FPC cable on the top side
#define ILI9341_ORIENTATION_RIGHT ILI9341_MADCTL_MV // 320x240 ; FPC cable on the right side
#define ILI9341_ORIENTATION_LEFT ILI9341_MADCTL_MY | ILI9341_MADCTL_MX | ILI9341_MADCTL_MV // 320x240 ; FPC cable on the left side
#define ILI9341_ORIENTATION_BOTTOM ILI9341_MADCTL_MX // 240x320 ; FPC cable on the bottom side

#define ILI9341_ORIENTATION IF_0((TFT_ORIENTATION) & TFT_EXCHANGE_XY, ILI9341_MADCTL_MV) | \
IF_0((TFT_ORIENTATION) & TFT_INVERT_X, ILI9341_MADCTL_MX) | \
Expand All @@ -52,7 +52,7 @@

#define ILI9341_NOP 0x00 // No Operation
#define ILI9341_SWRESET 0x01 // Software Reset
#define ILI9341_RDDIDIF 0x04 // Read display identification information
#define ILI9341_RDDIDIF 0x04 // Read Display Identification Information
#define ILI9341_RDDST 0x09 // Read Display Status
#define ILI9341_RDDPM 0x0A // Read Display Power Mode
#define ILI9341_RDDMADCTL 0x0B // Read Display MADCTL
Expand Down Expand Up @@ -141,20 +141,21 @@ static const uint16_t ili9341_init[] = {
DATASIZE_8BIT,
ESC_REG(ILI9341_SWRESET), ESC_DELAY(100),
ESC_REG(ILI9341_SLPOUT), ESC_DELAY(20),
/*
ESC_REG(ILI9341_PWCTRLA), 0x0039, 0x002C, 0x0000, 0x0034, 0x0002, // Power control A
ESC_REG(ILI9341_PWCTRLB), 0x0000, 0x00C1, 0x0030, // Power control B
ESC_REG(ILI9341_DRVTCTLA1), 0x0085, 0x0000, 0x0078, // Driver timing control A
ESC_REG(ILI9341_DRVTCTLB), 0x0000, 0x0000, // Driver timing control B
ESC_REG(ILI9341_PONSEQCTL), 0x0064, 0x0003, 0x0012, 0x0081, // Power on sequence control
ESC_REG(ILI9341_DISCTRL), 0x0008, 0x0082, 0x0027, // Display Function Control
ESC_REG(ILI9341_PUMPRCTL), 0x0020, // Pump ratio control
ESC_REG(ILI9341_VMCTRL1), 0x003E, 0x0028, // VCOM Control 1
ESC_REG(ILI9341_VMCTRL2), 0x0086, // VCOM Control 2
ESC_REG(ILI9341_FRMCTR1), 0x0000, 0x0018, // Frame Rate Control (In Normal Mode/Full Colors)
ESC_REG(ILI9341_PWCTRL1), 0x0023, // Power Control 1
ESC_REG(ILI9341_PWCTRL2), 0x0010, // Power Control 2
*/

ESC_REG(ILI9341_PWCTRLA), 0x0039, 0x002C, 0x0000, 0x0034, 0x0002,
ESC_REG(ILI9341_PWCTRLB), 0x0000, 0x00C1, 0x0030,
ESC_REG(ILI9341_DRVTCTLA1), 0x0085, 0x0000, 0x0078,
ESC_REG(ILI9341_DRVTCTLB), 0x0000, 0x0000,
ESC_REG(ILI9341_PONSEQCTL), 0x0064, 0x0003, 0x0012, 0x0081,
ESC_REG(ILI9341_DISCTRL), 0x0008, 0x0082, 0x0027, // Source Output Scan Direction: 0, Gate Output Scan Direction: 0
ESC_REG(ILI9341_DINVOFF),
ESC_REG(ILI9341_PUMPRCTL), 0x0020,
ESC_REG(ILI9341_VMCTRL1), 0x003E, 0x0028,
ESC_REG(ILI9341_VMCTRL2), 0x0086,
ESC_REG(ILI9341_FRMCTR1), 0x0000, 0x0018,
ESC_REG(ILI9341_PWCTRL1), 0x0023,
ESC_REG(ILI9341_PWCTRL2), 0x0010,

jmz52 marked this conversation as resolved.
Show resolved Hide resolved
ESC_REG(ILI9341_MADCTL), ILI9341_MADCTL_DATA,
ESC_REG(ILI9341_PIXSET), 0x0055,

Expand Down
33 changes: 29 additions & 4 deletions Marlin/src/lcd/tft_io/ili9488.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
#define ILI9488_MADCTL_RGB 0x00
#define ILI9488_MADCTL_MH 0x04 // Horizontal Refresh Order

#define ILI9488_ORIENTATION_UP ILI9488_MADCTL_MY // 320x480 ; Cable on the upper side
#define ILI9488_ORIENTATION_RIGHT ILI9488_MADCTL_MV // 480x320 ; Cable on the right side
#define ILI9488_ORIENTATION_LEFT ILI9488_MADCTL_MY | ILI9488_MADCTL_MX | ILI9488_MADCTL_MV // 480x320 ; Cable on the left side
#define ILI9488_ORIENTATION_DOWN ILI9488_MADCTL_MX // 320x480 ; Cable on the upper side
#define ILI9488_ORIENTATION_TOP ILI9488_MADCTL_MY // 320x480 ; FPC cable on the top side
#define ILI9488_ORIENTATION_RIGHT ILI9488_MADCTL_MV // 480x320 ; FPC cable on the right side
#define ILI9488_ORIENTATION_LEFT ILI9488_MADCTL_MY | ILI9488_MADCTL_MX | ILI9488_MADCTL_MV // 480x320 ; FPC cable on the left side
#define ILI9488_ORIENTATION_BOTTOM ILI9488_MADCTL_MX // 320x480 ; FPC cable on the bottom side

#define ILI9488_ORIENTATION IF_0((TFT_ORIENTATION) & TFT_EXCHANGE_XY, ILI9488_MADCTL_MV) | \
IF_0((TFT_ORIENTATION) & TFT_INVERT_X, ILI9488_MADCTL_MX) | \
Expand Down Expand Up @@ -146,6 +146,17 @@
#define ILI9488_ADJCTL6 0xFC // Adjust Control 6
#define ILI9488_ADJCTL7 0xFF // Adjust Control 7


/*
// https://forum.mikroe.com/viewtopic.php?t=74586

#if ANY(MKS_ROBIN_TFT35, TFT_TRONXY_X5SA, ANYCUBIC_TFT35) // ILI9488
#define TFT_DRIVER ILI9488
#define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_X | TFT_INVERT_Y)
#define TFT_RES_480x320
#define TFT_INTERFACE_FSMC
*/

static const uint16_t ili9488_init[] = {
DATASIZE_8BIT,
ESC_REG(ILI9488_SWRESET), ESC_DELAY(120),
Expand All @@ -154,10 +165,24 @@ static const uint16_t ili9488_init[] = {
ESC_REG(ILI9488_MADCTL), ILI9488_MADCTL_DATA,
ESC_REG(ILI9488_COLMOD), 0x0055,

ESC_REG(ILI9488_FRMCTR1), 0x00A0,
ESC_REG(ILI9488_INVTR), 0x0002,
ESC_REG(ILI9488_DISCTRL), 0x0002, 0x0002, // Gate Scan sequence: 0, Source Scan sequence: 0
ESC_REG(ILI9488_PWCTRL1), 0x0015, 0x0017,
ESC_REG(ILI9488_PWCTRL2), 0x0041,
ESC_REG(ILI9488_VMCTRL), 0x0000, 0x0012, 0x0080,
ESC_REG(ILI9488_SETIMAGE), 0x0000,
ESC_REG(ILI9488_ADJCTL3), 0x00A9, 0x0051, 0x002C, 0x0082,

/* Gamma Correction. */
ESC_REG(ILI9488_PGAMCTRL), 0x0000, 0x0003, 0x0009, 0x0008, 0x0016, 0x000A, 0x003F, 0x0078, 0x004C, 0x0009, 0x000A, 0x0008, 0x0016, 0x001A, 0x000F,
ESC_REG(ILI9488_NGAMCTRL), 0x0000, 0x0016, 0x0019, 0x0003, 0x000F, 0x0005, 0x0032, 0x0045, 0x0046, 0x0004, 0x000E, 0x000D, 0x0035, 0x0037, 0x000F,

#if ENABLED(ILI9488_INVERTED)
ESC_REG(ILI9488_INVON), // Display inversion ON
#else
ESC_REG(ILI9488_INVOFF),
#endif
ESC_REG(ILI9488_NORON),
ESC_REG(ILI9488_DISON),
ESC_END
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/lcd/tft_io/r65105.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

#define R61505_DRVCTRL_GS 0x8000 // Gate Scan direction

// MKS Robin TFT v1.1 - 320x240 ; Cable on the left side
// MKS Robin TFT v1.1 - 320x240 ; FPC cable on the left side

#if TFT_ROTATION == TFT_ROTATE_180
#define R61505_DRVCTL_DATA 0x0000
Expand Down
26 changes: 21 additions & 5 deletions Marlin/src/lcd/tft_io/st7789v.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@
#define ST7789V_MADCTL_RGB 0x00
#define ST7789V_MADCTL_MH 0x04 // Horizontal Refresh Order

#define ST7789V_ORIENTATION_UP ST7789V_MADCTL_MX | ST7789V_MADCTL_MY // 240x320 ; Cable on the upper side
#define ST7789V_ORIENTATION_RIGHT ST7789V_MADCTL_MX | ST7789V_MADCTL_MV // 320x240 ; Cable on the right side
#define ST7789V_ORIENTATION_LEFT ST7789V_MADCTL_MY | ST7789V_MADCTL_MV // 320x240 ; Cable on the left side
#define ST7789V_ORIENTATION_DOWN 0 // 240x320 ; Cable on the lower side
// ST7789V-specific: "MX Inversion" is enabled by default in LCM Control register.
#define ST7789V_ORIENTATION_TOP ST7789V_MADCTL_MX | ST7789V_MADCTL_MY // 240x320 ; PFC cable on the top side
#define ST7789V_ORIENTATION_RIGHT ST7789V_MADCTL_MX | ST7789V_MADCTL_MV // 320x240 ; PFC cable on the right side
#define ST7789V_ORIENTATION_LEFT ST7789V_MADCTL_MY | ST7789V_MADCTL_MV // 320x240 ; PFC cable on the left side
#define ST7789V_ORIENTATION_BOTTOM 0 // 240x320 ; PFC cable on the bottom side

#define ST7789V_ORIENTATION IF_0((TFT_ORIENTATION) & TFT_EXCHANGE_XY, ST7789V_MADCTL_MV) | \
IF_0((TFT_ORIENTATION) & TFT_INVERT_X, ST7789V_MADCTL_MX) | \
Expand Down Expand Up @@ -141,7 +142,22 @@ static const uint16_t st7789v_init[] = {
ESC_REG(ST7789V_PORCTRL), 0x000C, 0x000C, 0x0000, 0x0033, 0x0033,
ESC_REG(ST7789V_GCTRL), 0x0035,
ESC_REG(ST7789V_VCOMS), 0x001F,
ESC_REG(ST7789V_LCMCTRL), 0x002C,

/**
* LCM Control
*
* Default Power-on Value: 0x2C / 00101100b
* MY Inversion: 0
* RGB/BGR Inversion: 1
* Display Inversion: 0
* MX Inversion: 1
* MH (Source Output) Inversion: 1
* MV Inversion: 0
* Gate Scan Inversion: 0
*/
ESC_REG(ST7789V_LCMCTRL), 0x002C, // Default Power-on Value
ESC_REG(ST7789V_GATECTRL), 0x0027, 0x0000, 0x0010, // Gate Scan Direction: 0

ESC_REG(ST7789V_VDVVRHEN), 0x0001, 0x00C3,
ESC_REG(ST7789V_VDVS), 0x0020,
ESC_REG(ST7789V_FRCTRL2), 0x000F,
Expand Down
6 changes: 6 additions & 0 deletions Marlin/src/lcd/tft_io/st7796s.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
#define ST7796S_MADCTL_RGB 0x00
#define ST7796S_MADCTL_MH 0x04 // Horizontal Refresh Order

#define ST7796S_ORIENTATION_TOP ST7796S_MADCTL_MX // 320x480 ; FPC cable on the top side
#define ST7796S_ORIENTATION_RIGHT ST7796S_MADCTL_MV // 480x320 ; FPC cable on the right side
#define ST7796S_ORIENTATION_LEFT ST7796S_MADCTL_MY | ST7796S_MADCTL_MX | ST7796S_MADCTL_MV // 480x320 ; FPC cable on the left side
#define ST7796S_ORIENTATION_BOTTOM ST7796S_MADCTL_MY // 320x480 ; FPC cable on the bottom side

#define ST7796S_ORIENTATION IF_0((TFT_ORIENTATION) & TFT_EXCHANGE_XY, ST7796S_MADCTL_MV) | \
IF_0((TFT_ORIENTATION) & TFT_INVERT_X, ST7796S_MADCTL_MX) | \
IF_0((TFT_ORIENTATION) & TFT_INVERT_Y, ST7796S_MADCTL_MY)
Expand Down Expand Up @@ -132,6 +137,7 @@ static const uint16_t st7796s_init[] = {
ESC_REG(ST7796S_COLMOD), 0x0055,

ESC_REG(ST7796S_DIC), 0x0001, // 1-dot inversion
ESC_REG(ST7796S_DFC), 0x0080, 0x0002, 0x003B, // Source Output Scan Direction: 0, Gate Output Scan Direction: 0
ESC_REG(ST7796S_EM), 0x00C6,

ESC_REG(ST7796S_PWR2), 0x0015,
Expand Down
2 changes: 0 additions & 2 deletions Marlin/src/pins/stm32f1/pins_CHITU3D_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,6 @@
#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 FSMC_DMA_DEV DMA2
#define FSMC_DMA_CHANNEL DMA_CH5

#define TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN
Expand Down
2 changes: 0 additions & 2 deletions Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,6 @@
#define TFT_BACKLIGHT_PIN PD13

#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 PD7 // NE4
#define FSMC_RS_PIN PD11 // A0
Expand Down
2 changes: 0 additions & 2 deletions Marlin/src/pins/stm32f1/pins_JGAURORA_A5S_A1.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,6 @@
#define FSMC_RS_PIN PG0

#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 TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN
Expand Down
2 changes: 0 additions & 2 deletions Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
#define FSMC_CS_PIN PD7 // pin 88 = FSMC_NE1
#define FSMC_RS_PIN PD11 // pin 58 A16 Register. Only one address needed
#define FSMC_DMA_DEV DMA2
#define FSMC_DMA_CHANNEL DMA_CH5

#define TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN
Expand Down
2 changes: 0 additions & 2 deletions Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,6 @@
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
#define FSMC_CS_PIN PD7 // NE4
#define FSMC_RS_PIN PG0 // A0
#define FSMC_DMA_DEV DMA2
#define FSMC_DMA_CHANNEL DMA_CH5

#define TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN
Expand Down
2 changes: 0 additions & 2 deletions Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,6 @@
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
#define FSMC_CS_PIN PG12 // NE4
#define FSMC_RS_PIN PF0 // A0
#define FSMC_DMA_DEV DMA2
#define FSMC_DMA_CHANNEL DMA_CH5

#define TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN
Expand Down
2 changes: 0 additions & 2 deletions Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,6 @@
#define FSMC_RS_PIN TFT_RS_PIN // A0

#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

#if NEED_TOUCH_PINS
#define TOUCH_CS_PIN PC2 // SPI2_NSS
Expand Down
2 changes: 0 additions & 2 deletions Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,6 @@
#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 FSMC_DMA_DEV DMA2
#define FSMC_DMA_CHANNEL DMA_CH5

#define TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN
Expand Down
2 changes: 0 additions & 2 deletions Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,6 @@

#define FSMC_CS_PIN PD7 // NE4
#define FSMC_RS_PIN PD11 // A0
#define FSMC_DMA_DEV DMA2
#define FSMC_DMA_CHANNEL DMA_CH5
#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
Expand Down
2 changes: 0 additions & 2 deletions Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@
#define TFT_RS_PIN FSMC_RS_PIN

#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 ANYCUBIC_TFT35
#else
Expand Down
2 changes: 0 additions & 2 deletions Marlin/src/pins/stm32f4/pins_TRONXY_V10.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,6 @@
#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 TFT_CS_PIN PG12
#define TFT_RS_PIN PG2
Expand Down