Skip to content

Commit

Permalink
Support for BTT GTR V1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
yangwenxiong authored and thinkyhead committed Jan 20, 2020
1 parent f6468f0 commit aca5a0a
Show file tree
Hide file tree
Showing 8 changed files with 152 additions and 23 deletions.
9 changes: 9 additions & 0 deletions Marlin/src/gcode/control/M42.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@ void GcodeSuite::M42() {
#if HAS_FAN2
case FAN2_PIN: thermalManager.fan_speed[2] = pin_status; break;
#endif
#if HAS_FAN3
case FAN3_PIN: thermalManager.fan_speed[3] = pin_status; break;
#endif
#if HAS_FAN4
case FAN4_PIN: thermalManager.fan_speed[4] = pin_status; break;
#endif
#if HAS_FAN5
case FAN5_PIN: thermalManager.fan_speed[5] = pin_status; break;
#endif
}
#endif
}
12 changes: 11 additions & 1 deletion Marlin/src/inc/Conditionals_post.h
Original file line number Diff line number Diff line change
Expand Up @@ -1111,6 +1111,10 @@
#define HAS_FAN0 (PIN_EXISTS(FAN))
#define HAS_FAN1 (PIN_EXISTS(FAN1) && CONTROLLER_FAN_PIN != FAN1_PIN && E0_AUTO_FAN_PIN != FAN1_PIN && E1_AUTO_FAN_PIN != FAN1_PIN && E2_AUTO_FAN_PIN != FAN1_PIN && E3_AUTO_FAN_PIN != FAN1_PIN && E4_AUTO_FAN_PIN != FAN1_PIN && E5_AUTO_FAN_PIN != FAN1_PIN)
#define HAS_FAN2 (PIN_EXISTS(FAN2) && CONTROLLER_FAN_PIN != FAN2_PIN && E0_AUTO_FAN_PIN != FAN2_PIN && E1_AUTO_FAN_PIN != FAN2_PIN && E2_AUTO_FAN_PIN != FAN2_PIN && E3_AUTO_FAN_PIN != FAN2_PIN && E4_AUTO_FAN_PIN != FAN2_PIN && E5_AUTO_FAN_PIN != FAN2_PIN)
#define HAS_FAN3 (PIN_EXISTS(FAN3) && CONTROLLER_FAN_PIN != FAN3_PIN && E0_AUTO_FAN_PIN != FAN3_PIN && E1_AUTO_FAN_PIN != FAN3_PIN && E2_AUTO_FAN_PIN != FAN3_PIN && E3_AUTO_FAN_PIN != FAN3_PIN && E4_AUTO_FAN_PIN != FAN3_PIN && E5_AUTO_FAN_PIN != FAN3_PIN)
#define HAS_FAN4 (PIN_EXISTS(FAN4) && CONTROLLER_FAN_PIN != FAN4_PIN && E0_AUTO_FAN_PIN != FAN4_PIN && E1_AUTO_FAN_PIN != FAN4_PIN && E2_AUTO_FAN_PIN != FAN4_PIN && E3_AUTO_FAN_PIN != FAN4_PIN && E4_AUTO_FAN_PIN != FAN4_PIN && E5_AUTO_FAN_PIN != FAN4_PIN)
#define HAS_FAN5 (PIN_EXISTS(FAN5) && CONTROLLER_FAN_PIN != FAN5_PIN && E0_AUTO_FAN_PIN != FAN5_PIN && E1_AUTO_FAN_PIN != FAN5_PIN && E2_AUTO_FAN_PIN != FAN5_PIN && E3_AUTO_FAN_PIN != FAN5_PIN && E4_AUTO_FAN_PIN != FAN5_PIN && E5_AUTO_FAN_PIN != FAN5_PIN)
//#define HAS_FAN6 (PIN_EXISTS(FAN6) && CONTROLLER_FAN_PIN != FAN6_PIN && E0_AUTO_FAN_PIN != FAN6_PIN && E1_AUTO_FAN_PIN != FAN6_PIN && E2_AUTO_FAN_PIN != FAN6_PIN && E3_AUTO_FAN_PIN != FAN6_PIN && E4_AUTO_FAN_PIN != FAN6_PIN && E5_AUTO_FAN_PIN != FAN6_PIN)
#define HAS_CONTROLLER_FAN (PIN_EXISTS(CONTROLLER_FAN))

// Servos
Expand Down Expand Up @@ -1310,7 +1314,13 @@
#define FAN_INVERTING false
#endif

#if HAS_FAN2
#if HAS_FAN5
#define FAN_COUNT 6
#elif HAS_FAN4
#define FAN_COUNT 5
#elif HAS_FAN3
#define FAN_COUNT 4
#elif HAS_FAN2
#define FAN_COUNT 3
#elif HAS_FAN1
#define FAN_COUNT 2
Expand Down
7 changes: 5 additions & 2 deletions Marlin/src/libs/softspi.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@
* @return value read
*/
FORCE_INLINE static bool fastDigitalRead(uint8_t pin) {
return g_APinDescription[pin].pPort->PIO_PDSR & g_APinDescription[pin].ulPin;
return digitalRead(pin);
//return g_APinDescription[pin].pPort->PIO_PDSR & g_APinDescription[pin].ulPin;
}

/**
Expand All @@ -75,10 +76,12 @@
* @param[in] level value to write
*/
FORCE_INLINE static void fastDigitalWrite(uint8_t pin, bool value) {
if (value)
digitalWrite(pin, value);
/* if (value)
g_APinDescription[pin].pPort->PIO_SODR = g_APinDescription[pin].ulPin;
else
g_APinDescription[pin].pPort->PIO_CODR = g_APinDescription[pin].ulPin;
*/
}

#endif // !CORE_TEENSY
Expand Down
10 changes: 9 additions & 1 deletion Marlin/src/module/planner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1308,7 +1308,15 @@ void Planner::check_axes_activity() {
#if HAS_FAN2
FAN_SET(2);
#endif

#if HAS_FAN3
FAN_SET(3);
#endif
#if HAS_FAN4
FAN_SET(4);
#endif
#if HAS_FAN5
FAN_SET(5);
#endif
#endif // FAN_COUNT > 0

#if ENABLED(AUTOTEMP)
Expand Down
57 changes: 50 additions & 7 deletions Marlin/src/module/temperature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,19 @@
#if ENABLED(MAX6675_IS_MAX31865)
#include "Adafruit_MAX31865.h"
#ifndef MAX31865_CS_PIN
#define MAX31865_CS_PIN MAX6675_SS_PIN // HW:49 SW:65 for example
#define MAX31865_CS_PIN CS_PIN // HW:49 SW:65 for example
#endif
#ifndef MAX31865_MOSI_PIN
#define MAX31865_MOSI_PIN MOSI_PIN // 63
#define MAX31865_MOSI_PIN MOSI_PIN // 63
#endif
#ifndef MAX31865_MISO_PIN
#define MAX31865_MISO_PIN MAX6675_DO_PIN // 42
#define MAX31865_MISO_PIN MISO_PIN // 42
#endif
#ifndef MAX31865_SCK_PIN
#define MAX31865_SCK_PIN MAX6675_SCK_PIN // 40
#define MAX31865_SCK_PIN SCK_PIN // 40
#endif
Adafruit_MAX31865 max31865 = Adafruit_MAX31865(MAX31865_CS_PIN
#if MAX31865_CS_PIN != MAX6675_SS_PIN
#if MAX31865_CS_PIN != CS_PIN
, MAX31865_MOSI_PIN // For software SPI also set MOSI/MISO/SCK
, MAX31865_MISO_PIN
, MAX31865_SCK_PIN
Expand Down Expand Up @@ -893,7 +893,6 @@ void Temperature::min_temp_error(const heater_ind_t heater) {
pid_output += work_pid[ee].Kc;
}
#endif // PID_EXTRUSION_SCALING

#if ENABLED(PID_FAN_SCALING)
if (thermalManager.fan_speed[active_extruder] > PID_FAN_SCALING_MIN_SPEED) {
work_pid[ee].Kf = PID_PARAM(Kf, ee) + (PID_FAN_SCALING_LIN_FACTOR) * thermalManager.fan_speed[active_extruder];
Expand All @@ -902,7 +901,6 @@ void Temperature::min_temp_error(const heater_ind_t heater) {
//pid_output -= work_pid[ee].Ki;
//pid_output += work_pid[ee].Ki * work_pid[ee].Kf
#endif // PID_FAN_SCALING

LIMIT(pid_output, 0, PID_MAX);
}
temp_dState[ee] = temp_hotend[ee].celsius;
Expand Down Expand Up @@ -1689,6 +1687,15 @@ void Temperature::init() {
#endif
#if HAS_FAN2
INIT_FAN_PIN(FAN2_PIN);
#endif
#if HAS_FAN3
INIT_FAN_PIN(FAN3_PIN);
#endif
#if HAS_FAN4
INIT_FAN_PIN(FAN4_PIN);
#endif
#if HAS_FAN5
INIT_FAN_PIN(FAN5_PIN);
#endif
#if ENABLED(USE_CONTROLLER_FAN)
INIT_FAN_PIN(CONTROLLER_FAN_PIN);
Expand Down Expand Up @@ -2508,6 +2515,15 @@ void Temperature::tick() {
#if HAS_FAN2
_FAN_PWM(2);
#endif
#if HAS_FAN3
_FAN_PWM(3);
#endif
#if HAS_FAN4
_FAN_PWM(4);
#endif
#if HAS_FAN5
_FAN_PWM(5);
#endif
#endif
}
else {
Expand Down Expand Up @@ -2535,6 +2551,15 @@ void Temperature::tick() {
#if HAS_FAN2
if (soft_pwm_count_fan[2] <= pwm_count_tmp) WRITE_FAN(2, LOW);
#endif
#if HAS_FAN3
if (soft_pwm_count_fan[3] <= pwm_count_tmp) WRITE_FAN(3, LOW);
#endif
#if HAS_FAN4
if (soft_pwm_count_fan[4] <= pwm_count_tmp) WRITE_FAN(4, LOW);
#endif
#if HAS_FAN5
if (soft_pwm_count_fan[5] <= pwm_count_tmp) WRITE_FAN(5, LOW);
#endif
#endif
}

Expand Down Expand Up @@ -2599,6 +2624,15 @@ void Temperature::tick() {
#if HAS_FAN2
_PWM_FAN(2);
#endif
#if HAS_FAN3
_FAN_PWM(3);
#endif
#if HAS_FAN4
_FAN_PWM(4);
#endif
#if HAS_FAN5
_FAN_PWM(5);
#endif
}
#if HAS_FAN0
if (soft_pwm_count_fan[0] <= pwm_count_tmp) WRITE_FAN(0, LOW);
Expand All @@ -2609,6 +2643,15 @@ void Temperature::tick() {
#if HAS_FAN2
if (soft_pwm_count_fan[2] <= pwm_count_tmp) WRITE_FAN(2, LOW);
#endif
#if HAS_FAN3
if (soft_pwm_count_fan[3] <= pwm_count_tmp) WRITE_FAN(3, LOW);
#endif
#if HAS_FAN4
if (soft_pwm_count_fan[4] <= pwm_count_tmp) WRITE_FAN(4, LOW);
#endif
#if HAS_FAN5
if (soft_pwm_count_fan[5] <= pwm_count_tmp) WRITE_FAN(5, LOW);
#endif
#endif // FAN_SOFT_PWM

// SOFT_PWM_SCALE to frequency:
Expand Down
2 changes: 2 additions & 0 deletions Marlin/src/pins/pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,8 @@
#include "stm32/pins_STEVAL_3DP001V1.h" // STM32F4 env:STM32F401VE_STEVAL
#elif MB(BIGTREE_SKR_PRO_V1_1)
#include "stm32/pins_BTT_SKR_PRO_V1_1.h" // STM32F4 env:BIGTREE_SKR_PRO
#elif MB(BIGTREE_GTR_V1_0)
#include "stm32/pins_BTT_GTR_V1_0.h" // STM32F4 env:BIGTREE_GTR
#elif MB(BIGTREE_BTT002_V1_0)
#include "stm32/pins_BTT_BTT002_V1_0.h" // STM32F4 env:BIGTREE_BTT002
#elif MB(LERDGE_K)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,13 @@ const PinMap PinMap_I2C_SDA[] = {
{PB_11, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)},
{PC_9, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)},
#if STM32F4X_PIN_NUM >= 144 //144 pins mcu, 114 gpio
{PF_0, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)},
if(STM32F4X_PIN_NUM >= 176){
{PH_5, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)},
{PH_8, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)},
}
else{
{PF_0, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)},
}
#endif
{NC, NP, 0}
};
Expand All @@ -104,7 +110,14 @@ const PinMap PinMap_I2C_SCL[] = {
{PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)},
{PB_10, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)},
#if STM32F4X_PIN_NUM >= 144 //144 pins mcu, 114 gpio
{PF_1, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)},
ifSTM32F4X_PIN_NUM >=176){
//{PF_1, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)},
{PH_4, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)},
{PH_7, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)},
}
else{
{PF_1, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)},
}
#endif
{NC, NP, 0}
};
Expand Down Expand Up @@ -141,8 +154,10 @@ const PinMap PinMap_PWM[] = {
*/
//{PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1
//{PA_0, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 1, 0)}, // TIM5_CH1
//{PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2
//{PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3
{PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 is bltouch analog?
{PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 is bltouch analog?
//{PA_1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 2, 0)}, // TIM5_CH2
//{PA_2, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 3, 0)}, // TIM5_CH3
//{PA_2, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1
//{PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4
//{PA_3, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 4, 0)}, // TIM5_CH4
Expand Down Expand Up @@ -173,7 +188,7 @@ const PinMap PinMap_PWM[] = {
//{PB_9, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4
//{PB_9, TIM11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM11, 1, 0)}, // TIM11_CH1
//{PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3
//{PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4
{PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4
//{PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N
//{PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N
//{PB_14, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N
Expand All @@ -186,21 +201,28 @@ const PinMap PinMap_PWM[] = {
//{PC_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 0)}, // TIM8_CH2
//{PC_8, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3
//{PC_9, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4
//{PD_13, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2
//{PD_15, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4
{PD_13, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2
{PD_15, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4
//{PE_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N
//{PE_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1
{PE_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1
//{PE_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N
//{PE_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2
{PE_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2
//{PE_12, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N
//{PE_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3
//{PE_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4
{PE_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3
{PE_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4
#if STM32F4X_PIN_NUM >= 144 //144 pins mcu, 114 gpio
//{PF_6, TIM10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM10, 1, 0)}, // TIM10_CH1
//{PF_7, TIM11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM11, 1, 0)}, // TIM11_CH1
//{PF_8, TIM13, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM13, 1, 0)}, // TIM13_CH1
//{PF_9, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM14, 1, 0)}, // TIM14_CH1
#endif
#if STM32F4X_PIN_NUM >= 176 //176 pins mcu, 140 gpio
{PH_10, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 1, 0)}, // TIM5_CH1
{PH_6, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 1, 0)}, // TIM12_CH1
//{PH_11, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 2, 0)}, // TIM5_CH2
{PI_5, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 0)}, // TIM8_CH1
{PI_6, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 0)}, // TIM8_CH2
#endif
{NC, NP, 0}
};
#endif
Expand Down Expand Up @@ -275,7 +297,8 @@ const PinMap PinMap_UART_CTS[] = {

#ifdef HAL_SPI_MODULE_ENABLED
const PinMap PinMap_SPI_MOSI[] = {
{PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)},
//{PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)},
{PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)},
{PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
{PC_12, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
{NC, NP, 0}
Expand Down
31 changes: 31 additions & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,37 @@ src_filter = ${common.default_src_filter} +<src/HAL/HAL_STM32>
debug_tool = stlink
debug_init_break =

#
# Bigtreetech GTR V1.0 (STM32F407IGT6 ARM Cortex-M4)
#
[env:BIGTREE_GTR_V1_0]
platform = ststm32@>=5.7.0
framework = arduino
platform_packages = framework-arduinoststm32@>=3.10700.191028
board = BigTree_SKR_Pro
extra_scripts = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
build_flags = ${common.build_flags}
-DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483 -DUSB_PRODUCT=\"STM32F407IG\"
-DTARGET_STM32F4 -DSTM32F407IX -DVECT_TAB_OFFSET=0x8000
-DHAVE_HWSERIAL3
-DHAVE_HWSERIAL6
-DPIN_SERIAL3_RX=PD_9
-DPIN_SERIAL3_TX=PD_8
-DPIN_SERIAL6_RX=PC_7
-DPIN_SERIAL6_TX=PC_6

-IMarlin/src/HAL/HAL_STM32
lib_deps =
U8glib-HAL=https://github.com/MarlinFirmware/U8glib-HAL/archive/bugfix.zip
LiquidCrystal
TMCStepper@>=0.5.2,<1.0.0
Adafruit NeoPixel
LiquidTWI2=https://github.com/lincomatic/LiquidTWI2/archive/master.zip
Arduino-L6470=https://github.com/ameyer/Arduino-L6470/archive/dev.zip
lib_ignore = SoftwareSerial, SoftwareSerialM
src_filter = ${common.default_src_filter} +<src/HAL/HAL_STM32>
monitor_speed = 250000

#
# BigTreeTech BTT002 (STM32F407VET6 ARM Cortex-M4)
#
Expand Down

0 comments on commit aca5a0a

Please sign in to comment.