1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-30 07:17:59 +00:00

🔧 Improve BIQU BX pins, allow Z swap (#26871)

* Add a swap Z & E1 option for BIQU BX

Users can add #define BX_SWAP_ZM_E1M to their config instead of opening their printer up & swapping Z & E1 motor cables. Allows G34 to work correctly on early BX printers since both Z motor wires were installed without a standard procedure in place and wires could be swapped from the factory.

* Add BOARD URL, DIAG pin info, update pin comments

* Add WIFISUPPORT defines for documentation purposes

WIFISUPPORT does not need to be enabled (read: shouldn't be enabled). Simply enable an available SERIAL_PORT*, set it to 4, and connect an ESP-01/ESP-01S flashed with luc-github's ESP3D firmware for basic WiFi functionality.

* Sanity check TOUCH_SCREEN_CALIBRATION on GT911 TFTs (BIQU BX TFT70)

Use a sanity check so it's clear which options are valid for TFT_TOUCH_DEVICE_GT911 / BIQU_BX_TFT70.
This commit is contained in:
Keith Bennett 2024-04-07 10:49:36 -07:00 committed by GitHub
parent c31d9e717b
commit 2bf56b00d4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 95 additions and 36 deletions

View File

@ -1852,10 +1852,6 @@
#if NONE(TFT_TOUCH_DEVICE_GT911, TFT_TOUCH_DEVICE_XPT2046)
#define TFT_TOUCH_DEVICE_XPT2046 // ADS7843/XPT2046 ADC Touchscreen such as ILI9341 2.8
#endif
#if ENABLED(TFT_TOUCH_DEVICE_GT911) // GT911 Capacitive touch screen such as BIQU_BX_TFT70
#undef TOUCH_SCREEN_CALIBRATION
#undef TOUCH_CALIBRATION_AUTO_SAVE
#endif
#if !HAS_GRAPHICAL_TFT
#undef TOUCH_SCREEN
#if ENABLED(TFT_CLASSIC_UI)

View File

@ -3919,6 +3919,11 @@ static_assert(_PLUS_TEST(3), "DEFAULT_MAX_ACCELERATION values must be positive."
#error "TOUCH_CALIBRATION_[XY] and TOUCH_OFFSET_[XY] are required for resistive touch screens with TOUCH_SCREEN_CALIBRATION disabled."
#endif
// GT911 Capacitive touch screen such as BIQU_BX_TFT70
#if ALL(TFT_TOUCH_DEVICE_GT911, TOUCH_SCREEN_CALIBRATION)
#error "TOUCH_SCREEN_CALIBRATION is not supported by the selected LCD controller."
#endif
/**
* Sanity check WiFi options
*/

View File

@ -23,8 +23,11 @@
#include "env_validate.h"
#define BOARD_WEBSITE_URL "github.com/bigtreetech/BIQU-BX"
#define DEFAULT_MACHINE_NAME "BIQU BX"
#define USES_DIAG_JUMPERS
// Onboard I2C EEPROM
#define I2C_EEPROM
#define MARLIN_EEPROM_SIZE 0x1000 // 4K (24C32)
@ -32,18 +35,27 @@
#define HAS_OTG_USB_HOST_SUPPORT // USB Flash Drive support
//#define SWD_DEBUG // Use pins PA13 and PA14 on STM32H7 for the SWD debugger
//
// Trinamic Stallguard pins
//
#define X_DIAG_PIN PB11 // X-
#define Y_DIAG_PIN PB12 // Y-
#define Z_DIAG_PIN PD12 // Z-
#define E0_DIAG_PIN PD13 // X+
#define E1_DIAG_PIN PB13 // Y+
//
// Limit Switches
//
#define X_MIN_PIN PB11
#define X_MAX_PIN PD13
#define Y_MIN_PIN PB12
#define Y_MAX_PIN PB13
#define Z_MIN_PIN PD12
#define Z_MAX_PIN PD11
#define X_MIN_PIN X_DIAG_PIN // X-
#define X_MAX_PIN E0_DIAG_PIN // X+
#define Y_MIN_PIN Y_DIAG_PIN // Y-
#define Y_MAX_PIN E1_DIAG_PIN // Y+
#define Z_MIN_PIN Z_DIAG_PIN // Z-
#define Z_MAX_PIN PD11 // Z+
#define FIL_RUNOUT_PIN PD13
#define FIL_RUNOUT2_PIN PB13
#define FIL_RUNOUT_PIN E0_DIAG_PIN // X+
#define FIL_RUNOUT2_PIN E1_DIAG_PIN // Y+
#ifndef SWD_DEBUG
#define LED_PIN PA13
@ -53,13 +65,13 @@
#define POWER_MONITOR_PIN PB0
#define RPI_POWER_PIN PE5
#define SERVO0_PIN PA2
#define SERVO0_PIN PA2 // PROBE
//
// Z Probe (when not Z_MIN_PIN)
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN PH2 // Probe
#define Z_MIN_PROBE_PIN PH2 // PROBE
#endif
//
@ -72,30 +84,44 @@
//
// Steppers
//
#define X_STEP_PIN PG13
#define X_STEP_PIN PG13 // X
#define X_DIR_PIN PG12
#define X_ENABLE_PIN PG14
#define X_CS_PIN PG10
#define Y_STEP_PIN PB3
#define Y_STEP_PIN PB3 // Y
#define Y_DIR_PIN PD3
#define Y_ENABLE_PIN PB4
#define Y_CS_PIN PD4
#define Z_STEP_PIN PD7
#define Z_DIR_PIN PD6
#define Z_ENABLE_PIN PG9
#define Z_CS_PIN PD5
#ifdef BX_SWAP_ZM_E1M
#define Z_STEP_PIN PA8 // E1
#define Z_DIR_PIN PC9
#define Z_ENABLE_PIN PD2
#define Z_CS_PIN PC8
#else
#define Z_STEP_PIN PD7 // Z1
#define Z_DIR_PIN PD6
#define Z_ENABLE_PIN PG9
#define Z_CS_PIN PD5
#endif
#define E0_STEP_PIN PC14
#define E0_STEP_PIN PC14 // E0
#define E0_DIR_PIN PC13
#define E0_ENABLE_PIN PC15
#define E0_CS_PIN PI8
#define E1_STEP_PIN PA8
#define E1_DIR_PIN PC9
#define E1_ENABLE_PIN PD2
#define E1_CS_PIN PC8
#ifdef BX_SWAP_ZM_E1M
#define E1_STEP_PIN PD7 // Z1
#define E1_DIR_PIN PD6
#define E1_ENABLE_PIN PG9
#define E1_CS_PIN PD5
#else
#define E1_STEP_PIN PA8 // E1
#define E1_DIR_PIN PC9
#define E1_ENABLE_PIN PD2
#define E1_CS_PIN PC8
#endif
//
// SPI pins for TMC2130 stepper drivers
@ -138,14 +164,24 @@
#define Y_SERIAL_TX_PIN PD4
#define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN
#define Z_SERIAL_TX_PIN PD5
#define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN
#ifdef BX_SWAP_ZM_E1M
#define Z_SERIAL_TX_PIN PC8
#define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN
#else
#define Z_SERIAL_TX_PIN PD5
#define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN
#endif
#define E0_SERIAL_TX_PIN PI8
#define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
#define E1_SERIAL_TX_PIN PC8
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
#ifdef BX_SWAP_ZM_E1M
#define E1_SERIAL_TX_PIN PD5
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
#else
#define E1_SERIAL_TX_PIN PC8
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
#endif
// Reduce baud rate to improve software serial reliability
#ifndef TMC_BAUD_RATE
@ -164,15 +200,15 @@
//
// Heaters / Fans
//
#define HEATER_0_PIN PC4
#define HEATER_1_PIN PC5
#define HEATER_BED_PIN PA4
#define HEATER_0_PIN PC4 // HE0
#define HEATER_1_PIN PC5 // HE1
#define HEATER_BED_PIN PA4 // BED
#define FAN0_PIN PA5 // "FAN0"
#define FAN1_PIN PA6 // "FAN1"
#define FAN2_PIN PA7 // "FAN2"
#define FAN0_PIN PA5 // FAN0
#define FAN1_PIN PA6 // FAN1
#define FAN2_PIN PA7 // FAN2 / DCOT
#define BOARD_NEOPIXEL_PIN PH3
#define BOARD_NEOPIXEL_PIN PH3 // RGB
#define NEOPIXEL2_PIN PB1
#if HAS_LTDC_TFT
@ -238,3 +274,25 @@
#define SD_MISO_PIN PC11
#define SD_MOSI_PIN PC12
#define SD_DETECT_PIN PI3
#if ENABLED(WIFISUPPORT)
//
// WIFI
//
/**
* -----
* (ESP-RX4) PA1 | 1 8 | GND
* (ESP-EN) -- | 2 7 | -- (ESP-IO2)
* (ESP-RST) -- | 3 6 | -- (ESP-IO0)
* 3.3V | 4 5 | PA0 (ESP-TX4)
* -----
* WIFI-ESP01
*/
#define ESP_WIFI_MODULE_COM 4 // Must also set either SERIAL_PORT / SERIAL_PORT_2 / SERIAL_PORT_3 to this
#define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT / SERIAL_PORT_2 / SERIAL_PORT_3
#define ESP_WIFI_MODULE_RESET_PIN -1
#define ESP_WIFI_MODULE_ENABLE_PIN -1
#define ESP_WIFI_MODULE_GPIO0_PIN -1
#define ESP_WIFI_MODULE_GPIO2_PIN -1
#endif