Merge 4e2e521a82 into fbc2d2d726
This commit is contained in:
commit
6dd2fe5df8
1 changed files with 93 additions and 113 deletions
|
|
@ -58,7 +58,7 @@
|
||||||
// SPI
|
// SPI
|
||||||
// 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
|
||||||
|
|
||||||
// SPI Flash
|
// SPI Flash
|
||||||
#define HAS_SPI_FLASH 1
|
#define HAS_SPI_FLASH 1
|
||||||
|
|
@ -108,49 +108,40 @@
|
||||||
#define E0_STEP_PIN PD6 // E0_STEP
|
#define E0_STEP_PIN PD6 // E0_STEP
|
||||||
#define E0_DIR_PIN PD3 // E0_DIR
|
#define E0_DIR_PIN PD3 // E0_DIR
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FLSUN Hi-Speed has no hard-wired UART pins for TMC drivers.
|
||||||
|
* Several wiring options are provided below, defaulting to
|
||||||
|
* to the most compatible.
|
||||||
|
*/
|
||||||
|
|
||||||
//
|
//
|
||||||
// Drivers
|
// Drivers
|
||||||
//
|
//
|
||||||
#if HAS_TMC220x
|
#if HAS_TMC220x
|
||||||
|
// SoftwareSerial with one pin per driver
|
||||||
|
// Compatible with TMC2208 and TMC2209 drivers
|
||||||
|
#define X_SERIAL_TX_PIN PA10 // RXD1
|
||||||
|
#define X_SERIAL_RX_PIN PA10 // RXD1
|
||||||
|
#define Y_SERIAL_TX_PIN PA9 // TXD1
|
||||||
|
#define Y_SERIAL_RX_PIN PA9 // TXD1
|
||||||
|
#define Z_SERIAL_TX_PIN PC7 // IO1
|
||||||
|
#define Z_SERIAL_RX_PIN PC7 // IO1
|
||||||
|
#define TMC_BAUD_RATE 19200
|
||||||
|
|
||||||
#if ENABLED(HARDWARE_SERIAL) /* TMC2209 */
|
/**
|
||||||
#define X_SLAVE_ADDRESS 3 // | | :
|
* HardwareSerial with one pin for four drivers.
|
||||||
#define Y_SLAVE_ADDRESS 2 // : | :
|
* The 4xTMC2209 module doesn't have a serial multiplexer and
|
||||||
#define Z_SLAVE_ADDRESS 1 // | : :
|
* needs to set *_SLAVE_ADDRESS in Configuration_adv.h for X,Y,Z,E0
|
||||||
//#define E0_SLAVE_ADDRESS 0 // : : :
|
* and proper jumper configuration.
|
||||||
|
* Uses only one I/O pin like PA10/PA9/PC7/PA8.
|
||||||
|
* Install the jumpers in the following way, for example:
|
||||||
|
*/
|
||||||
|
//#define X_SLAVE_ADDRESS 3 // * * . JP0, JP1
|
||||||
|
//#define Y_SLAVE_ADDRESS 2 // . * . JP1
|
||||||
|
//#define Z_SLAVE_ADDRESS 1 // * . . JP0
|
||||||
|
//#define E0_SLAVE_ADDRESS 0 // . . .
|
||||||
|
|
||||||
#define X_SERIAL_TX_PIN PA9 // TXD1
|
|
||||||
#define X_SERIAL_RX_PIN PA9 // TXD1
|
|
||||||
|
|
||||||
#define Y_SERIAL_TX_PIN PA9 // TXD1
|
|
||||||
#define Y_SERIAL_RX_PIN PA9 // TXD1
|
|
||||||
|
|
||||||
#define Z_SERIAL_TX_PIN PA9 // TXD1
|
|
||||||
#define Z_SERIAL_RX_PIN PA9 // TXD1
|
|
||||||
|
|
||||||
#elif ENABLED(SOFTWARE_SERIAL) /* TMC220x */
|
|
||||||
/**
|
|
||||||
* TMC2208 stepper UART-configurable by PDN_UART pin
|
|
||||||
* Software serial
|
|
||||||
*/
|
|
||||||
#define X_SLAVE_ADDRESS 0
|
|
||||||
#define Y_SLAVE_ADDRESS 0
|
|
||||||
#define Z_SLAVE_ADDRESS 0
|
|
||||||
|
|
||||||
#define X_SERIAL_TX_PIN PA10 // RXD1
|
|
||||||
#define X_SERIAL_RX_PIN PA10 // RXD1
|
|
||||||
|
|
||||||
#define Y_SERIAL_TX_PIN PA9 // TXD1
|
|
||||||
#define Y_SERIAL_RX_PIN PA9 // TXD1
|
|
||||||
|
|
||||||
#define Z_SERIAL_TX_PIN PC7 // IO1
|
|
||||||
#define Z_SERIAL_RX_PIN PC7 // IO1
|
|
||||||
|
|
||||||
#endif
|
|
||||||
// Reduce baud rate to improve software serial reliability
|
|
||||||
#define TMC_BAUD_RATE 19200
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
// Motor current PWM pins
|
// Motor current PWM pins
|
||||||
#define MOTOR_CURRENT_PWM_XY_PIN PA6 // VREF2/3 CONTROL XY
|
#define MOTOR_CURRENT_PWM_XY_PIN PA6 // VREF2/3 CONTROL XY
|
||||||
#define MOTOR_CURRENT_PWM_Z_PIN PA7 // VREF4 CONTROL Z
|
#define MOTOR_CURRENT_PWM_Z_PIN PA7 // VREF4 CONTROL Z
|
||||||
|
|
@ -159,33 +150,33 @@
|
||||||
#define DEFAULT_PWM_MOTOR_CURRENT { 800, 800, 800 }
|
#define DEFAULT_PWM_MOTOR_CURRENT { 800, 800, 800 }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* src: MKS Robin_Mini V2
|
* MKS Robin_Wifi or another ESP8266 module
|
||||||
* __ESP(M1)__ -J1-
|
*
|
||||||
* GND| 15 | | 08 |+3v3 (22)=>RXD1(PA10) //
|
* __ESP(M1)__ -J1-
|
||||||
* | 16 | | 07 |MOSI (21)=>TXD1(PA9) // active low, probably OK to leave floating
|
* GND| 15 | | 08 |+3v3 (22) RXD1 (PA10)
|
||||||
* IO2| 17 | | 06 |MISO (19)=>IO1(PC7) // Leave as unused (ESP3D software configures this with a pullup so OK to leave as floating)
|
* | 16 | | 07 |MOSI (21) TXD1 (PA9) Active LOW, probably OK to leave floating
|
||||||
* IO0| 18 | | 05 |CLK (18)=>IO0(PA8) // must be high (ESP3D software configures this with a pullup so OK to leave as floating)
|
* IO2| 17 | | 06 |MISO (19) IO1 (PC7) Leave as unused (ESP3D software configures this with a pullup so OK to leave as floating)
|
||||||
* IO1| 19 | | 03 |EN (03)=>WIFI_EN() // Must be high for module to run
|
* IO0| 18 | | 05 |CLK (18) IO0 (PA8) Must be HIGH (ESP3D software configures this with a pullup so OK to leave as floating)
|
||||||
* | nc | | nc | (01)=>WIFI_CTRL(PA5)
|
* IO1| 19 | | 03 |EN (03) WIFI_EN Must be HIGH for module to run
|
||||||
* RX| 21 | | nc |
|
* | nc | | nc | (01) WIFI_CTRL (PA5)
|
||||||
* TX| 22 | | 01 |RST
|
* RX| 21 | | nc |
|
||||||
*  ̄ ̄ AE ̄ ̄
|
* TX| 22 | | 01 |RST
|
||||||
*
|
*  ̄ ̄ AE ̄ ̄
|
||||||
*/
|
*/
|
||||||
#ifdef ESP_WIFI
|
//Module ESP-WIFI
|
||||||
#define WIFI_IO0_PIN PA8 // PC13 MKS ESP WIFI IO0 PIN
|
#define ESP_WIFI_MODULE_COM 2 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this
|
||||||
#define WIFI_IO1_PIN PC7 // MKS ESP WIFI IO1 PIN
|
#define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2
|
||||||
#define WIFI_RESET_PIN PA5 // MKS ESP WIFI RESET PIN
|
#define ESP_WIFI_MODULE_RESET_PIN PA5 // WIFI CTRL/RST
|
||||||
#endif
|
#define ESP_WIFI_MODULE_ENABLE_PIN -1
|
||||||
|
#define ESP_WIFI_MODULE_TXD_PIN PA9 // MKS or ESP WIFI RX PIN
|
||||||
|
#define ESP_WIFI_MODULE_RXD_PIN PA10 // MKS or ESP WIFI TX PIN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// EXTRUDER
|
// EXTRUDER
|
||||||
//
|
//
|
||||||
#if AXIS_DRIVER_TYPE(E0,TMC2208)||AXIS_DRIVER_TYPE(E0,TMC2209)
|
#if AXIS_DRIVER_TYPE_E0(TMC2208) || AXIS_DRIVER_TYPE_E0(TMC2209)
|
||||||
#define E0_SLAVE_ADDRESS 0
|
|
||||||
|
|
||||||
#define E0_SERIAL_TX_PIN PA8 // IO0
|
#define E0_SERIAL_TX_PIN PA8 // IO0
|
||||||
#define E0_SERIAL_RX_PIN PA8 // IO0
|
#define E0_SERIAL_RX_PIN PA8 // IO0
|
||||||
#define TMC_BAUD_RATE 19200
|
#define TMC_BAUD_RATE 19200
|
||||||
|
|
@ -199,7 +190,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// Temperature Sensors(THM)
|
// Temperature Sensors (THM)
|
||||||
//
|
//
|
||||||
#define TEMP_0_PIN PC1 // TEMP_E0
|
#define TEMP_0_PIN PC1 // TEMP_E0
|
||||||
#define TEMP_BED_PIN PC0 // TEMP_BED
|
#define TEMP_BED_PIN PC0 // TEMP_BED
|
||||||
|
|
@ -211,7 +202,6 @@
|
||||||
#define HEATER_BED_PIN PA0 // HEATER_BED-WKUP
|
#define HEATER_BED_PIN PA0 // HEATER_BED-WKUP
|
||||||
|
|
||||||
#define FAN_PIN PB1 // E_FAN
|
#define FAN_PIN PB1 // E_FAN
|
||||||
//#define CONTROLLER_FAN_PIN PD6 // BOARD FAN
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Misc. Functions
|
// Misc. Functions
|
||||||
|
|
@ -221,6 +211,19 @@
|
||||||
#define POWER_LOSS_PIN PA2 // PW_DET (UPS) MKSPWC
|
#define POWER_LOSS_PIN PA2 // PW_DET (UPS) MKSPWC
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//
|
||||||
|
//
|
||||||
|
/** Connector J2
|
||||||
|
* -------
|
||||||
|
* DIO O|1 2|O 3v3
|
||||||
|
* CSK O|3 5|O GND
|
||||||
|
* RST O|5 6|O GND
|
||||||
|
* -------
|
||||||
|
*/
|
||||||
|
//SW_DIO PA13 //
|
||||||
|
//SW_CLK PA14 //
|
||||||
|
//SW_RST NRST //(14)
|
||||||
|
|
||||||
//
|
//
|
||||||
// Power Supply Control
|
// Power Supply Control
|
||||||
//
|
//
|
||||||
|
|
@ -240,28 +243,32 @@
|
||||||
//#define LED_PIN PB2 // BOOT1
|
//#define LED_PIN PB2 // BOOT1
|
||||||
|
|
||||||
#if ENABLED(NEOPIXEL_LED)
|
#if ENABLED(NEOPIXEL_LED)
|
||||||
#define LED_PWM PA8
|
#define LED_PWM PC7 // IO1
|
||||||
#ifndef NEOPIXEL_PIN
|
#ifndef NEOPIXEL_PIN
|
||||||
#define NEOPIXEL_PIN LED_PWM // USED WIFI IO0/IO1/TX/RX PIN
|
#define NEOPIXEL_PIN LED_PWM // USED WIFI IO0/IO1 PIN
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//Others test.
|
|
||||||
//#define SERVO0_PIN PA5 // WIFI CRTL
|
|
||||||
//#define GPIO_CLEAR PA8 // IO0
|
|
||||||
//#define GPIO_SET PA5
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// SD Card
|
// SD Card
|
||||||
//
|
//
|
||||||
#define SDIO_SUPPORT
|
#define SDIO_CLOCK 4500000 // 4.5 MHz
|
||||||
#define SDIO_CLOCK 4500000 // 4.5 MHz /* 18 MHz (18000000) or 4.5MHz (450000) */
|
#define SDIO_READ_RETRIES 16
|
||||||
//#define SDIO_CLOCK 18000000 // 18 MHz (18000000)
|
|
||||||
#if ENABLED(SDIO_SUPPORT)
|
#if ENABLED(SDIO_SUPPORT)
|
||||||
#define SCK_PIN PB13 // SPI2
|
#define SCK_PIN PB13 // SPI2
|
||||||
#define MISO_PIN PB14 // SPI2
|
#define MISO_PIN PB14 // SPI2
|
||||||
#define MOSI_PIN PB15 // SPI2
|
#define MOSI_PIN PB15 // SPI2
|
||||||
#define SD_DETECT_PIN PD12 // SD_CD
|
#define SD_DETECT_PIN -1 // SD_CD (-1 active refresh)
|
||||||
|
#define SS_PIN PC2
|
||||||
|
#else // Use the on-board card socket labeled SD_Extender
|
||||||
|
#define SCK_PIN PC12
|
||||||
|
#define MISO_PIN PC8
|
||||||
|
#define MOSI_PIN PD2
|
||||||
|
#define SS_PIN -1
|
||||||
|
#define ONBOARD_SD_CS_PIN PC11
|
||||||
|
#define SDSS PD2
|
||||||
|
#define SD_DETECT_PIN PD12 // SD_CD (if -1 no detection)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
@ -271,6 +278,10 @@
|
||||||
#define BEEPER_PIN PC5
|
#define BEEPER_PIN PC5
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if ENABLED(SPEAKER) && BEEPER_PIN == PC5
|
||||||
|
#error "FLSun HiSpeed default BEEPER_PIN is not a SPEAKER."
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Note: MKS Robin TFT screens use various TFT controllers
|
* Note: MKS Robin TFT screens use various TFT controllers
|
||||||
* Supported screens are based on the ILI9341, ST7789V and ILI9328 (320x240)
|
* Supported screens are based on the ILI9341, ST7789V and ILI9328 (320x240)
|
||||||
|
|
@ -284,26 +295,7 @@
|
||||||
* because Marlin uses the reset as a failsafe to revive a glitchy LCD.
|
* because Marlin uses the reset as a failsafe to revive a glitchy LCD.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// MKS Robin TFT v2.0 with ILI9341
|
// QQS-Pro uses MKS Robin TFT v2.0 320x240
|
||||||
// Read display identification information (0xD3 on ILI9341)
|
|
||||||
//#define XPT2046_X_CALIBRATION 12013
|
|
||||||
//#define XPT2046_Y_CALIBRATION -8711
|
|
||||||
//#define XPT2046_X_OFFSET -32
|
|
||||||
//#define XPT2046_Y_OFFSET 256
|
|
||||||
|
|
||||||
// MKS Robin TFT v1.1 with ILI9328
|
|
||||||
//#define XPT2046_X_CALIBRATION -11792
|
|
||||||
//#define XPT2046_Y_CALIBRATION 8947
|
|
||||||
//#define XPT2046_X_OFFSET 342
|
|
||||||
//#define XPT2046_Y_OFFSET -19
|
|
||||||
|
|
||||||
// MKS Robin TFT v1.1 with R61505
|
|
||||||
//#define XPT2046_X_CALIBRATION 12489
|
|
||||||
//#define XPT2046_Y_CALIBRATION 9210
|
|
||||||
//#define XPT2046_X_OFFSET -52
|
|
||||||
//#define XPT2046_Y_OFFSET -17
|
|
||||||
|
|
||||||
// QQS-Pro uses MKS Robin TFT v2.0
|
|
||||||
|
|
||||||
// Shared FSMC Configs
|
// Shared FSMC Configs
|
||||||
#if HAS_FSMC_TFT
|
#if HAS_FSMC_TFT
|
||||||
|
|
@ -325,39 +317,27 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// XPT2046 Touch Screen calibration
|
// XPT2046 Touch Screen calibration
|
||||||
#if EITHER(TFT_LVGL_UI_FSMC, TFT_COLOR_UI)
|
#if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI)
|
||||||
#define TFT_BUFFER_SIZE 14400
|
#define TFT_BUFFER_SIZE 14400
|
||||||
|
|
||||||
#ifndef XPT2046_X_CALIBRATION
|
#ifndef XPT2046_X_CALIBRATION
|
||||||
#define XPT2046_X_CALIBRATION 12218
|
#define XPT2046_X_CALIBRATION 12033
|
||||||
#endif
|
#endif
|
||||||
#ifndef XPT2046_Y_CALIBRATION
|
#ifndef XPT2046_Y_CALIBRATION
|
||||||
#define XPT2046_Y_CALIBRATION -8814
|
#define XPT2046_Y_CALIBRATION -9047
|
||||||
#endif
|
#endif
|
||||||
#ifndef XPT2046_X_OFFSET
|
#ifndef XPT2046_X_OFFSET
|
||||||
#define XPT2046_X_OFFSET -35
|
#define XPT2046_X_OFFSET -30
|
||||||
#endif
|
#endif
|
||||||
#ifndef XPT2046_Y_OFFSET
|
#ifndef XPT2046_Y_OFFSET
|
||||||
#define XPT2046_Y_OFFSET 256
|
#define XPT2046_Y_OFFSET 254
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#elif ENABLED(TFT_CLASSIC_UI)
|
#ifdef TFT_CLASSIC_UI
|
||||||
#ifndef XPT2046_X_CALIBRATION
|
#define TFT_MARLINUI_COLOR 0xFFFF // White
|
||||||
#define XPT2046_X_CALIBRATION 12149
|
#define TFT_BTARROWS_COLOR 0xDEE6 // Yellow
|
||||||
|
#define TFT_BTOKMENU_COLOR 0x145F // Cyan
|
||||||
#endif
|
#endif
|
||||||
#ifndef XPT2046_Y_CALIBRATION
|
|
||||||
#define XPT2046_Y_CALIBRATION -8746
|
|
||||||
#endif
|
|
||||||
#ifndef XPT2046_X_OFFSET
|
|
||||||
#define XPT2046_X_OFFSET -35
|
|
||||||
#endif
|
|
||||||
#ifndef XPT2046_Y_OFFSET
|
|
||||||
#define XPT2046_Y_OFFSET 256
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define TFT_MARLINUI_COLOR 0xFFFF // White
|
|
||||||
#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow
|
|
||||||
#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if NEED_TOUCH_PINS
|
#if NEED_TOUCH_PINS
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue