Skip to content

Commit

Permalink
✨ BTT Octopus Max EZ 1.0, SKR 3.0 / 3.0 EZ (MarlinFirmware#25387, Mar…
Browse files Browse the repository at this point in the history
  • Loading branch information
thisiskeithb authored and thinkyhead committed Apr 7, 2023
1 parent a50ff5d commit 75aa880
Show file tree
Hide file tree
Showing 29 changed files with 3,833 additions and 56 deletions.
2 changes: 1 addition & 1 deletion Marlin/src/HAL/STM32/HAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@

typedef double isr_float_t; // FPU ops are used for single-precision, so use double for ISRs.

#ifdef STM32G0B1xx
#if defined(STM32G0B1xx) || defined(STM32H7xx)
typedef int32_t pin_t;
#else
typedef int16_t pin_t;
Expand Down
1 change: 0 additions & 1 deletion Marlin/src/HAL/STM32/HAL_SPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ static SPISettings spiConfig;
case SPI_SPEED_6: delaySPIFunc = &delaySPI_2000; break; // desired: 250,000 actual: ~210K
default: delaySPIFunc = &delaySPI_4000; break; // desired: 125,000 actual: ~123K
}
SPI.begin();
}

// Begin SPI transaction, set clock, bit order, data mode
Expand Down
1 change: 1 addition & 0 deletions Marlin/src/core/boards.h
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@
#define BOARD_BTT_SKR_SE_BX_V3 6005 // BigTreeTech SKR SE BX V3.0 (STM32H743II)
#define BOARD_BTT_SKR_V3_0 6006 // BigTreeTech SKR V3.0 (STM32H743VG)
#define BOARD_BTT_SKR_V3_0_EZ 6007 // BigTreeTech SKR V3.0 EZ (STM32H743VG)
#define BOARD_BTT_OCTOPUS_MAX_EZ_V1_0 6008 // BigTreeTech Octopus Max EZ V1.0 (STM32H723VE / STM32H723ZE)

//
// Espressif ESP32 WiFi
Expand Down
12 changes: 7 additions & 5 deletions Marlin/src/pins/pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -666,11 +666,11 @@
#elif MB(BTT_SKR_V2_0_REV_B)
#include "stm32f4/pins_BTT_SKR_V2_0_REV_B.h" // STM32F4 env:BIGTREE_SKR_2 env:BIGTREE_SKR_2_USB env:BIGTREE_SKR_2_USB_debug env:BIGTREE_SKR_2_F429 env:BIGTREE_SKR_2_F429_USB env:BIGTREE_SKR_2_F429_USB_debug
#elif MB(BTT_OCTOPUS_V1_0)
#include "stm32f4/pins_BTT_OCTOPUS_V1_0.h" // STM32F4 env:BIGTREE_OCTOPUS_V1 env:BIGTREE_OCTOPUS_V1_USB
#include "stm32f4/pins_BTT_OCTOPUS_V1_0.h" // STM32F4 env:STM32F446ZE_btt env:STM32F446ZE_btt_USB
#elif MB(BTT_OCTOPUS_V1_1)
#include "stm32f4/pins_BTT_OCTOPUS_V1_1.h" // STM32F4 env:BIGTREE_OCTOPUS_V1 env:BIGTREE_OCTOPUS_V1_USB env:BIGTREE_OCTOPUS_V1_F407 env:BIGTREE_OCTOPUS_V1_F407_USB
#include "stm32f4/pins_BTT_OCTOPUS_V1_1.h" // STM32F4 env:STM32F446ZE_btt env:STM32F446ZE_btt_USB env:STM32F429ZG_btt env:STM32F429ZG_btt_USB env:STM32F407ZE_btt env:STM32F407ZE_btt_USB
#elif MB(BTT_OCTOPUS_PRO_V1_0)
#include "stm32f4/pins_BTT_OCTOPUS_PRO_V1_0.h" // STM32F4 env:BIGTREE_OCTOPUS_V1 env:BIGTREE_OCTOPUS_V1_USB env:BIGTREE_OCTOPUS_PRO_V1_F429 env:BIGTREE_OCTOPUS_PRO_V1_F429_USB
#include "stm32f4/pins_BTT_OCTOPUS_PRO_V1_0.h" // STM32F4 env:STM32F446ZE_btt env:STM32F446ZE_btt_USB env:STM32F429ZG_btt env:STM32F429ZG_btt_USB env:STM32H723Zx_btt
#elif MB(LERDGE_K)
#include "stm32f4/pins_LERDGE_K.h" // STM32F4 env:LERDGEK env:LERDGEK_usb_flash_drive
#elif MB(LERDGE_S)
Expand Down Expand Up @@ -741,9 +741,11 @@
#elif MB(BTT_SKR_SE_BX_V3)
#include "stm32h7/pins_BTT_SKR_SE_BX_V3.h" // STM32H7 env:BTT_SKR_SE_BX
#elif MB(BTT_SKR_V3_0)
#include "stm32h7/pins_BTT_SKR_V3_0.h" // STM32H7 env:STM32H743Vx_btt
#include "stm32h7/pins_BTT_SKR_V3_0.h" // STM32H7 env:STM32H723Vx_btt env:STM32H743Vx_btt
#elif MB(BTT_SKR_V3_0_EZ)
#include "stm32h7/pins_BTT_SKR_V3_0_EZ.h" // STM32H7 env:STM32H743Vx_btt
#include "stm32h7/pins_BTT_SKR_V3_0_EZ.h" // STM32H7 env:STM32H723Vx_btt env:STM32H743Vx_btt
#elif MB(BTT_OCTOPUS_MAX_EZ_V1_0)
#include "stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h" // STM32H7 env:STM32H723Vx_btt env:STM32H723Zx_btt
#elif MB(TEENSY41)
#include "teensy4/pins_TEENSY41.h" // Teensy-4.x env:teensy41
#elif MB(T41U5XBB)
Expand Down
5 changes: 5 additions & 0 deletions Marlin/src/pins/pins_postprocess.h
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,11 @@
#define NUM_SERVO_PLUGS 4
#endif

// Only used within pins files
#undef NEEDS_X_MINMAX
#undef NEEDS_Y_MINMAX
#undef NEEDS_Z_MINMAX

//
// Assign endstop pins for boards with only 3 connectors
//
Expand Down
28 changes: 14 additions & 14 deletions Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,17 @@
#define USES_DIAG_JUMPERS

// Onboard I2C EEPROM
#define I2C_EEPROM
#define MARLIN_EEPROM_SIZE 0x1000 // 4K (AT24C32)
#define I2C_SCL_PIN PB8
#define I2C_SDA_PIN PB9
#if EITHER(NO_EEPROM_SELECTED, I2C_EEPROM)
#undef NO_EEPROM_SELECTED
#define I2C_EEPROM
#define MARLIN_EEPROM_SIZE 0x1000 // 4K (AT24C32)
#define SOFT_I2C_EEPROM // Force the use of Software I2C
#define I2C_SCL_PIN PB8
#define I2C_SDA_PIN PB9
#endif

// Avoid conflict with TIMER_TONE
#define STEP_TIMER 10
#define STEP_TIMER 8

//
// Servos
Expand Down Expand Up @@ -70,13 +74,13 @@
#if HAS_EXTRA_ENDSTOPS
#define _ENDSTOP_IS_ANY(ES) X2_USE_ENDSTOP == ES || Y2_USE_ENDSTOP == ES || Z2_USE_ENDSTOP == ES || Z3_USE_ENDSTOP == ES || Z4_USE_ENDSTOP == ES
#if _ENDSTOP_IS_ANY(_XMIN_) || _ENDSTOP_IS_ANY(_XMAX_)
#define NEEDS_X_MINMAX 1
#define NEEDS_X_MINMAX
#endif
#if _ENDSTOP_IS_ANY(_YMIN_) || _ENDSTOP_IS_ANY(_YMAX_)
#define NEEDS_Y_MINMAX 1
#define NEEDS_Y_MINMAX
#endif
#if _ENDSTOP_IS_ANY(_ZMIN_) || _ENDSTOP_IS_ANY(_ZMAX_)
#define NEEDS_Z_MINMAX 1
#define NEEDS_Z_MINMAX
#endif
#undef _ENDSTOP_IS_ANY
#endif
Expand Down Expand Up @@ -109,7 +113,7 @@
#else
#define Y_MIN_PIN E1_DIAG_PIN // E1DET
#endif
#elif NEEDS_Y_MINMAX
#elif ENABLED(NEEDS_Y_MINMAX)
#ifndef Y_MIN_PIN
#define Y_MIN_PIN Y_DIAG_PIN // Y-STOP
#endif
Expand All @@ -127,7 +131,7 @@
#else
#define Z_MIN_PIN E2_DIAG_PIN // PWRDET
#endif
#elif NEEDS_Z_MINMAX
#elif ENABLED(NEEDS_Z_MINMAX)
#ifndef Z_MIN_PIN
#define Z_MIN_PIN Z_DIAG_PIN // Z-STOP
#endif
Expand All @@ -138,10 +142,6 @@
#define Z_STOP_PIN Z_DIAG_PIN // Z-STOP
#endif

#undef NEEDS_X_MINMAX
#undef NEEDS_Y_MINMAX
#undef NEEDS_Z_MINMAX

//
// Filament Runout Sensor
//
Expand Down
14 changes: 5 additions & 9 deletions Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@
#if HAS_EXTRA_ENDSTOPS
#define _ENDSTOP_IS_ANY(ES) X2_USE_ENDSTOP == ES || Y2_USE_ENDSTOP == ES || Z2_USE_ENDSTOP == ES || Z3_USE_ENDSTOP == ES || Z4_USE_ENDSTOP == ES
#if _ENDSTOP_IS_ANY(_XMIN_) || _ENDSTOP_IS_ANY(_XMAX_)
#define NEEDS_X_MINMAX 1
#define NEEDS_X_MINMAX
#endif
#if _ENDSTOP_IS_ANY(_YMIN_) || _ENDSTOP_IS_ANY(_YMAX_)
#define NEEDS_Y_MINMAX 1
#define NEEDS_Y_MINMAX
#endif
#if _ENDSTOP_IS_ANY(_ZMIN_) || _ENDSTOP_IS_ANY(_ZMAX_)
#define NEEDS_Z_MINMAX 1
#define NEEDS_Z_MINMAX
#endif
#undef _ENDSTOP_IS_ANY
#endif
Expand All @@ -88,7 +88,7 @@

#ifdef Y_STALL_SENSITIVITY
#define Y_STOP_PIN Y_DIAG_PIN // Y-
#elif NEEDS_Y_MINMAX
#elif ENABLED(NEEDS_Y_MINMAX)
#ifndef Y_MIN_PIN
#define Y_MIN_PIN Y_DIAG_PIN // Y-
#endif
Expand All @@ -101,7 +101,7 @@

#ifdef Z_STALL_SENSITIVITY
#define Z_STOP_PIN Z_DIAG_PIN // Z-
#elif NEEDS_Z_MINMAX
#elif ENABLED(NEEDS_Z_MINMAX)
#ifndef Z_MIN_PIN
#define Z_MIN_PIN Z_DIAG_PIN // Z-
#endif
Expand All @@ -118,10 +118,6 @@
#endif
#endif

#undef NEEDS_X_MINMAX
#undef NEEDS_Y_MINMAX
#undef NEEDS_Z_MINMAX

//
// Steppers
//
Expand Down
9 changes: 3 additions & 6 deletions Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@
#if HAS_EXTRA_ENDSTOPS
#define _ENDSTOP_IS_ANY(ES) X2_USE_ENDSTOP == ES || Y2_USE_ENDSTOP == ES || Z2_USE_ENDSTOP == ES || Z3_USE_ENDSTOP == ES || Z4_USE_ENDSTOP == ES
#if _ENDSTOP_IS_ANY(_XMIN_) || _ENDSTOP_IS_ANY(_XMAX_)
#define NEEDS_X_MINMAX 1
#define NEEDS_X_MINMAX
#endif
#if _ENDSTOP_IS_ANY(_YMIN_) || _ENDSTOP_IS_ANY(_YMAX_)
#define NEEDS_Y_MINMAX 1
#define NEEDS_Y_MINMAX
#endif
#undef _ENDSTOP_IS_ANY
#endif
Expand Down Expand Up @@ -117,7 +117,7 @@
#else
#define Y_MIN_PIN E1_DIAG_PIN // MIN6
#endif
#elif NEEDS_Y_MINMAX
#elif ENABLED(NEEDS_Y_MINMAX)
#ifndef Y_MIN_PIN
#define Y_MIN_PIN Y_DIAG_PIN // MIN2
#endif
Expand All @@ -130,9 +130,6 @@

#define Z_STOP_PIN Z_DIAG_PIN // MIN3

#undef NEEDS_X_MINMAX
#undef NEEDS_Y_MINMAX

//
// Filament Runout Sensors
//
Expand Down
26 changes: 26 additions & 0 deletions Marlin/src/pins/stm32h7/env_validate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once

#if NOT_TARGET(STM32H7)
#error "Oops! Select an STM32H7 board in 'Tools > Board.'"
#endif
Loading

0 comments on commit 75aa880

Please sign in to comment.