소스 검색

Migrate Hispeedv1 (QQS-Pro) to HAL/STM32 (#20354)

Foxies 4 년 전
부모
커밋
0a99f8feed
No account linked to committer's email address
2개의 변경된 파일49개의 추가작업 그리고 39개의 파일을 삭제
  1. 31
    28
      Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h
  2. 18
    11
      platformio.ini

+ 31
- 28
Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h 파일 보기

@@ -60,6 +60,9 @@
60 60
 // Note: FLSun Hispeed (clone MKS_Robin_miniV2) board is using SPI2 interface.
61 61
 //
62 62
 #define SPI_DEVICE 2
63
+#define SCK_PIN                            PB13  // SPI2
64
+#define MISO_PIN                           PB14  // SPI2
65
+#define MOSI_PIN                           PB15  // SPI2
63 66
 
64 67
 // SPI Flash
65 68
 #define HAS_SPI_FLASH                          1
@@ -269,43 +272,42 @@
269 272
   #error "FLSun HiSpeed default BEEPER_PIN is not a SPEAKER."
270 273
 #endif
271 274
 
272
-/**
273
- * Note: MKS Robin TFT screens use various TFT controllers
274
- * Supported screens are based on the ILI9341, ST7789V and ILI9328 (320x240)
275
- * ILI9488 is not supported
276
- * Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp
277
- *
278
- * If the screen stays white, disable 'LCD_RESET_PIN'
279
- * to let the bootloader init the screen.
280
- *
281
- * Setting an 'LCD_RESET_PIN' may cause a flicker when entering the LCD menu
282
- * because Marlin uses the reset as a failsafe to revive a glitchy LCD.
283
- */
284
-
285
-// QQS-Pro uses MKS Robin TFT v2.0 320x240
275
+#if HAS_FSMC_TFT || HAS_GRAPHICAL_TFT
276
+  #define TFT_CS_PIN                        PD7   // NE4
277
+  #define TFT_RS_PIN                        PD11  // A0
278
+#endif
286 279
 
287
-// Shared FSMC Configs
288 280
 #if HAS_FSMC_TFT
289
-  #define DOGLCD_MOSI                       -1    // Prevent auto-define by Conditionals_post.h
290
-  #define DOGLCD_SCK                        -1
291
-
292
-  #define FSMC_CS_PIN                       PD7   // NE4
293
-  #define FSMC_RS_PIN                       PD11  // A0
294
-
295
-  #define TFT_RESET_PIN                     PC6   // FSMC_RST
281
+  /**
282
+   * Note: MKS Robin TFT screens use various TFT controllers
283
+   * Supported screens are based on the ILI9341, ST7789V and ILI9328 (320x240)
284
+   * ILI9488 is not supported
285
+   * Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp
286
+   *
287
+   * If the screen stays white, disable 'LCD_RESET_PIN'
288
+   * to let the bootloader init the screen.
289
+   *
290
+   * Setting an 'LCD_RESET_PIN' may cause a flicker when entering the LCD menu
291
+   * because Marlin uses the reset as a failsafe to revive a glitchy LCD.
292
+   */
293
+  //#define TFT_RESET_PIN                   PC6   // FSMC_RST
296 294
   #define TFT_BACKLIGHT_PIN                 PD13
295
+  #define FSMC_CS_PIN                 TFT_CS_PIN  // NE4
296
+  #define FSMC_RS_PIN                 TFT_RS_PIN  // A0
297 297
 
298 298
   #define LCD_USE_DMA_FSMC                        // Use DMA transfers to send data to the TFT
299 299
   #define FSMC_DMA_DEV                      DMA2
300 300
   #define FSMC_DMA_CHANNEL               DMA_CH5
301
-
302
-  #define TFT_BUFFER_SIZE                  14400
303
-  #if ENABLED(TFT_CLASSIC_UI)
304
-    #define TFT_MARLINBG_COLOR            0x3186  // White
305
-    #define TFT_MARLINUI_COLOR            0xC7B6  // green
301
+  #ifdef TFT_CLASSIC_UI
302
+    #define TFT_MARLINBG_COLOR            0x3186  // Grey
303
+    #define TFT_MARLINUI_COLOR            0xC7B6  // Green
306 304
     #define TFT_BTARROWS_COLOR            0xDEE6  // Yellow
307 305
     #define TFT_BTOKMENU_COLOR            0x145F  // Cyan
308
-  #endif
306
+  #endif  
307
+  #define TFT_BUFFER_SIZE                  14400
308
+#elif HAS_GRAPHICAL_TFT
309
+  #define TFT_RESET_PIN                     PC6
310
+  #define TFT_BACKLIGHT_PIN                 PD13
309 311
 #endif
310 312
 
311 313
 #if NEED_TOUCH_PINS
@@ -313,4 +315,5 @@
313 315
   #define TOUCH_SCK_PIN                     PB13  // SPI2_SCK
314 316
   #define TOUCH_MISO_PIN                    PB14  // SPI2_MISO
315 317
   #define TOUCH_MOSI_PIN                    PB15  // SPI2_MOSI
318
+  #define TOUCH_INT_PIN                     -1
316 319
 #endif

+ 18
- 11
platformio.ini 파일 보기

@@ -1150,18 +1150,25 @@ debug_tool      = jlink
1150 1150
 upload_protocol = jlink
1151 1151
 
1152 1152
 #
1153
-# FLSUN QQ (STM32F103VET6)
1153
+# FLSUN QQS Pro (STM32F103VET6) using hal STM32
1154
+# board Hispeedv1
1154 1155
 #
1155
-[env:flsun_hispeed]
1156
-platform          = ${common_stm32f1.platform}
1157
-extends           = common_stm32f1
1158
-board             = genericSTM32F103VE
1159
-extra_scripts     = ${common.extra_scripts}
1160
-  buildroot/share/PlatformIO/scripts/mks_robin_mini.py
1161
-  buildroot/share/PlatformIO/scripts/add_nanolib.py
1162
-build_flags       = ${common_stm32f1.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4
1163
-lib_deps          = SoftwareSerialM
1164
-  #Adafruit NeoPixel=https://github.com/Foxies-CSTL/Robin-NeoPixel-Lib/archive/master.zip
1156
+[env:flsun_hispeedv1]
1157
+platform             = ${common_stm32.platform}
1158
+extends              = common_stm32
1159
+build_flags          = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8
1160
+board                = genericSTM32F103VE
1161
+board_build.core     = stm32
1162
+board_build.variant  = MARLIN_F103Vx
1163
+board_build.ldscript = ldscript.ld
1164
+board_build.offset   = 0x7000
1165
+board_build.firmware = Robin_mini.bin
1166
+board_upload.offset_address = 0x08007000
1167
+build_unflags        = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
1168
+extra_scripts        = ${common.extra_scripts}
1169
+  pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
1170
+  buildroot/share/PlatformIO/scripts/stm32_bootloader.py
1171
+  buildroot/share/PlatformIO/scripts/mks_encrypt.py
1165 1172
 
1166 1173
 #
1167 1174
 # STM32F401VE

Loading…
취소
저장