Browse Source

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

vanilla_fb_2.0.x
Foxies 4 years ago
committed by Scott Lahteine
parent
commit
642110b072
  1. 59
      Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h
  2. 29
      platformio.ini

59
Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h

@ -60,6 +60,9 @@
// Note: FLSun Hispeed (clone MKS_Robin_miniV2) board is using SPI2 interface. // Note: FLSun Hispeed (clone MKS_Robin_miniV2) board is using SPI2 interface.
// //
#define SPI_DEVICE 2 #define SPI_DEVICE 2
#define SCK_PIN PB13 // SPI2
#define MISO_PIN PB14 // SPI2
#define MOSI_PIN PB15 // SPI2
// SPI Flash // SPI Flash
#define HAS_SPI_FLASH 1 #define HAS_SPI_FLASH 1
@ -269,43 +272,42 @@
#error "FLSun HiSpeed default BEEPER_PIN is not a SPEAKER." #error "FLSun HiSpeed default BEEPER_PIN is not a SPEAKER."
#endif #endif
/** #if HAS_FSMC_TFT || HAS_GRAPHICAL_TFT
* Note: MKS Robin TFT screens use various TFT controllers #define TFT_CS_PIN PD7 // NE4
* Supported screens are based on the ILI9341, ST7789V and ILI9328 (320x240) #define TFT_RS_PIN PD11 // A0
* ILI9488 is not supported #endif
* 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
* because Marlin uses the reset as a failsafe to revive a glitchy LCD.
*/
// QQS-Pro uses MKS Robin TFT v2.0 320x240
// Shared FSMC Configs
#if HAS_FSMC_TFT #if HAS_FSMC_TFT
#define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals_post.h /**
#define DOGLCD_SCK -1 * Note: MKS Robin TFT screens use various TFT controllers
* Supported screens are based on the ILI9341, ST7789V and ILI9328 (320x240)
#define FSMC_CS_PIN PD7 // NE4 * ILI9488 is not supported
#define FSMC_RS_PIN PD11 // A0 * Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp
*
#define TFT_RESET_PIN PC6 // FSMC_RST * 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
* 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 TFT_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 #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
#define FSMC_DMA_DEV DMA2 #define FSMC_DMA_DEV DMA2
#define FSMC_DMA_CHANNEL DMA_CH5 #define FSMC_DMA_CHANNEL DMA_CH5
#ifdef TFT_CLASSIC_UI
#define TFT_BUFFER_SIZE 14400 #define TFT_MARLINBG_COLOR 0x3186 // Grey
#if ENABLED(TFT_CLASSIC_UI) #define TFT_MARLINUI_COLOR 0xC7B6 // Green
#define TFT_MARLINBG_COLOR 0x3186 // White
#define TFT_MARLINUI_COLOR 0xC7B6 // green
#define TFT_BTARROWS_COLOR 0xDEE6 // Yellow #define TFT_BTARROWS_COLOR 0xDEE6 // Yellow
#define TFT_BTOKMENU_COLOR 0x145F // Cyan #define TFT_BTOKMENU_COLOR 0x145F // Cyan
#endif #endif
#define TFT_BUFFER_SIZE 14400
#elif HAS_GRAPHICAL_TFT
#define TFT_RESET_PIN PC6
#define TFT_BACKLIGHT_PIN PD13
#endif #endif
#if NEED_TOUCH_PINS #if NEED_TOUCH_PINS
@ -313,4 +315,5 @@
#define TOUCH_SCK_PIN PB13 // SPI2_SCK #define TOUCH_SCK_PIN PB13 // SPI2_SCK
#define TOUCH_MISO_PIN PB14 // SPI2_MISO #define TOUCH_MISO_PIN PB14 // SPI2_MISO
#define TOUCH_MOSI_PIN PB15 // SPI2_MOSI #define TOUCH_MOSI_PIN PB15 // SPI2_MOSI
#define TOUCH_INT_PIN -1
#endif #endif

29
platformio.ini

@ -1150,18 +1150,25 @@ debug_tool = jlink
upload_protocol = jlink upload_protocol = jlink
# #
# FLSUN QQ (STM32F103VET6) # FLSUN QQS Pro (STM32F103VET6) using hal STM32
# board Hispeedv1
# #
[env:flsun_hispeed] [env:flsun_hispeedv1]
platform = ${common_stm32f1.platform} platform = ${common_stm32.platform}
extends = common_stm32f1 extends = common_stm32
board = genericSTM32F103VE build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8
extra_scripts = ${common.extra_scripts} board = genericSTM32F103VE
buildroot/share/PlatformIO/scripts/mks_robin_mini.py board_build.core = stm32
buildroot/share/PlatformIO/scripts/add_nanolib.py board_build.variant = MARLIN_F103Vx
build_flags = ${common_stm32f1.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 board_build.ldscript = ldscript.ld
lib_deps = SoftwareSerialM board_build.offset = 0x7000
#Adafruit NeoPixel=https://github.com/Foxies-CSTL/Robin-NeoPixel-Lib/archive/master.zip board_build.firmware = Robin_mini.bin
board_upload.offset_address = 0x08007000
build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
extra_scripts = ${common.extra_scripts}
pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
buildroot/share/PlatformIO/scripts/stm32_bootloader.py
buildroot/share/PlatformIO/scripts/mks_encrypt.py
# #
# STM32F401VE # STM32F401VE

Loading…
Cancel
Save