Skip to content

Commit 17f853d

Browse files
thisiskeithbthinkyhead
authored andcommitted
⚡️ BTT002 (STM32F407VET6) variant, MK3_FAN_PINS flag (#23093)
1 parent 6f9f25d commit 17f853d

File tree

4 files changed

+73
-3
lines changed

4 files changed

+73
-3
lines changed

Marlin/src/pins/pins.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@
616616
#elif MB(BTT_GTR_V1_0)
617617
#include "stm32f4/pins_BTT_GTR_V1_0.h" // STM32F4 env:BIGTREE_GTR_V1_0 env:BIGTREE_GTR_V1_0_usb_flash_drive
618618
#elif MB(BTT_BTT002_V1_0)
619-
#include "stm32f4/pins_BTT_BTT002_V1_0.h" // STM32F4 env:BIGTREE_BTT002
619+
#include "stm32f4/pins_BTT_BTT002_V1_0.h" // STM32F4 env:BIGTREE_BTT002 env:BIGTREE_BTT002_VET6
620620
#elif MB(BTT_E3_RRF)
621621
#include "stm32f4/pins_BTT_E3_RRF.h" // STM32F4 env:BIGTREE_E3_RRF
622622
#elif MB(BTT_SKR_V2_0_REV_A)

Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929

3030
#define BOARD_INFO_NAME "BTT BTT002 V1.0"
3131

32+
//#define MK3_FAN_PINS
33+
3234
#define USES_DIAG_PINS
3335

3436
// Ignore temp readings during development.
@@ -169,8 +171,22 @@
169171
//
170172
#define HEATER_0_PIN PE6 // Heater0
171173
#define HEATER_BED_PIN PE5 // Hotbed
172-
#define FAN_PIN PB8 // Fan1
173-
#define FAN1_PIN PB9 // Fan0
174+
175+
#ifndef FAN_PIN
176+
#ifdef MK3_FAN_PINS
177+
#define FAN_PIN PB8 // Fan1
178+
#else
179+
#define FAN_PIN PB9 // Fan0
180+
#endif
181+
#endif
182+
183+
#ifndef FAN1_PIN
184+
#ifdef MK3_FAN_PINS
185+
#define FAN1_PIN PB9 // Fan0
186+
#else
187+
#define FAN1_PIN PB8 // Fan1
188+
#endif
189+
#endif
174190

175191
/**
176192
* -----------------------------------BTT002 V1.0----------------------------------------
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"build": {
3+
"core": "stm32",
4+
"cpu": "cortex-m4",
5+
"extra_flags": "-DSTM32F4 -DSTM32F407xx -DSTM32F40_41xxx",
6+
"f_cpu": "168000000L",
7+
"hwids": [
8+
[
9+
"0x1EAF",
10+
"0x0003"
11+
],
12+
[
13+
"0x0483",
14+
"0x3748"
15+
]
16+
],
17+
"mcu": "stm32f407vet6",
18+
"variant": "MARLIN_BIGTREE_BTT002"
19+
},
20+
"debug": {
21+
"jlink_device": "STM32F407VE",
22+
"openocd_target": "stm32f4x",
23+
"svd_path": "STM32F40x.svd"
24+
},
25+
"frameworks": [
26+
"arduino"
27+
],
28+
"name": "STM32F407VE (192k RAM. 512k Flash)",
29+
"upload": {
30+
"disable_flushing": false,
31+
"maximum_ram_size": 131072,
32+
"maximum_size": 524288,
33+
"protocol": "stlink",
34+
"protocols": [
35+
"stlink",
36+
"dfu",
37+
"jlink"
38+
],
39+
"offset_address": "0x8008000",
40+
"require_upload_port": true,
41+
"use_1200bps_touch": false,
42+
"wait_for_upload_port": false
43+
},
44+
"url": "https://www.st.com/en/microcontrollers-microprocessors/stm32f407ve.html",
45+
"vendor": "ST"
46+
}

ini/stm32f4.ini

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,14 @@ build_flags = ${stm32_variant.build_flags}
204204
-DPIN_SERIAL2_RX=PD_6
205205
-DPIN_SERIAL2_TX=PD_5
206206

207+
#
208+
# BigTreeTech BTT002 V1.x with 512k of flash (STM32F407VET6 ARM Cortex-M4)
209+
#
210+
[env:BIGTREE_BTT002_VET6]
211+
platform = ${env:BIGTREE_BTT002.platform}
212+
extends = env:BIGTREE_BTT002
213+
board = marlin_BigTree_BTT002_VET6
214+
207215
#
208216
# BigTreeTech SKR V2.0 (STM32F407VGT6 ARM Cortex-M4) with USB Flash Drive Support
209217
#

0 commit comments

Comments
 (0)