Browse Source

MKS Robin: restore the TFT v2.0 support (ST7789V) (#15675)

Tanguy Pruvot 4 years ago
parent
commit
c58cc113dd
2 changed files with 10 additions and 6 deletions
  1. 7
    3
      Marlin/src/pins/stm32/pins_MKS_ROBIN.h
  2. 3
    3
      platformio.ini

+ 7
- 3
Marlin/src/pins/stm32/pins_MKS_ROBIN.h View File

@@ -111,9 +111,9 @@
111 111
 #define LED_PIN            PB2
112 112
 
113 113
 /**
114
- * Note: MKS Robin TFT screens use various TFT controllers. Supported screens
115
- * are based on the ILI9341, ILI9328 and ST7798V. Define init sequences for
116
- * other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp
114
+ * Note: MKS Robin TFT screens use various TFT controllers
115
+ * Supported screens are based on the ILI9341 and ST7789V (320x240), ILI9328 and 9488 are not.
116
+ * Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp
117 117
  *
118 118
  * If the screen stays white, disable 'LCD_RESET_PIN'
119 119
  * to let the bootloader init the screen.
@@ -126,6 +126,10 @@
126 126
 #define FSMC_CS_PIN        PG12  // NE4
127 127
 #define FSMC_RS_PIN        PF0   // A0
128 128
 
129
+#define LCD_USE_DMA_FSMC   // Use DMA transfers to send data to the TFT
130
+#define FSMC_DMA_DEV       DMA2
131
+#define FSMC_DMA_CHANNEL   DMA_CH5
132
+
129 133
 #if ENABLED(TOUCH_BUTTONS)
130 134
   #define TOUCH_CS_PIN     PB1   // SPI2_NSS
131 135
   #define TOUCH_SCK_PIN    PB13  // SPI2_SCK

+ 3
- 3
platformio.ini View File

@@ -387,7 +387,7 @@ framework     = arduino
387 387
 board         = genericSTM32F103ZE
388 388
 extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin.py
389 389
 build_flags   = !python Marlin/src/HAL/HAL_STM32F1/build_flags.py
390
-  ${common.build_flags} -std=gnu++14
390
+  ${common.build_flags} -std=gnu++14 -DSTM32_XL_DENSITY
391 391
 build_unflags = -std=gnu++11
392 392
 src_filter    = ${common.default_src_filter} +<src/HAL/HAL_STM32F1>
393 393
 lib_deps      = ${common.lib_deps}
@@ -447,7 +447,7 @@ framework     = arduino
447 447
 board         = genericSTM32F103ZE
448 448
 extra_scripts = buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py
449 449
 build_flags   = !python Marlin/src/HAL/HAL_STM32F1/build_flags.py
450
-  ${common.build_flags} -DSTM32F1xx -std=gnu++14
450
+  ${common.build_flags} -DSTM32F1xx -std=gnu++14 -DSTM32_XL_DENSITY
451 451
 build_unflags = -std=gnu++11
452 452
 src_filter    = ${common.default_src_filter} +<src/HAL/HAL_STM32F1>
453 453
 lib_deps      = ${common.lib_deps}
@@ -547,7 +547,7 @@ framework     = arduino
547 547
 board         = genericSTM32F103ZE
548 548
 extra_scripts = buildroot/share/PlatformIO/scripts/chitu_crypt.py
549 549
 build_flags   = !python Marlin/src/HAL/HAL_STM32F1/build_flags.py
550
-  ${common.build_flags} -DSTM32F1xx -std=gnu++14
550
+  ${common.build_flags} -DSTM32F1xx -std=gnu++14 -DSTM32_XL_DENSITY
551 551
 build_unflags = -std=gnu++11 -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG= -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
552 552
 src_filter    = ${common.default_src_filter} +<src/HAL/HAL_STM32F1>
553 553
 lib_deps      = ${common.lib_deps}

Loading…
Cancel
Save