My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pins_BTT_GTR_V1_0.h 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. *
  5. * Based on Sprinter and grbl.
  6. * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #pragma once
  23. #if NOT_TARGET(STM32F4)
  24. #error "Oops! Select an STM32F4 board in 'Tools > Board.'"
  25. #elif HOTENDS > 8 || E_STEPPERS > 8
  26. #error "BIGTREE GTR V1.0 supports up to 8 hotends / E-steppers."
  27. #elif HOTENDS > MAX_EXTRUDERS || E_STEPPERS > MAX_EXTRUDERS
  28. #error "Marlin extruder/hotends limit! Increase MAX_EXTRUDERS to continue."
  29. #endif
  30. #define BOARD_INFO_NAME "BTT GTR V1.0"
  31. // Onboard I2C EEPROM
  32. #define I2C_EEPROM
  33. #define MARLIN_EEPROM_SIZE 0x2000 // 8KB (24C64 ... 64Kb = 8KB)
  34. #define TP // Enable to define servo and probe pins
  35. //
  36. // Servos
  37. //
  38. #if ENABLED(TP)
  39. #define SERVO0_PIN PB11
  40. #endif
  41. #define PS_ON_PIN PH6
  42. //
  43. // Limit Switches
  44. //
  45. #define X_MIN_PIN PF2
  46. #define X_MAX_PIN PG14
  47. #define Y_MIN_PIN PC13
  48. #define Y_MAX_PIN PG9
  49. #define Z_MIN_PIN PE0
  50. #define Z_MAX_PIN PD3
  51. //
  52. // Pins on the extender
  53. //
  54. //#define X_MIN_PIN PI4
  55. //#define X2_MIN_PIN PF12
  56. //#define Y_MIN_PIN PF4
  57. //#define Y2_MIN_PIN PI7
  58. //#define Z_MIN_PIN PF6
  59. #if ENABLED(TP) && !defined(Z_MIN_PROBE_PIN)
  60. #define Z_MIN_PROBE_PIN PH11 // Z Probe must be PH11
  61. #endif
  62. //
  63. // Steppers
  64. //
  65. #define X_STEP_PIN PC15
  66. #define X_DIR_PIN PF0
  67. #define X_ENABLE_PIN PF1
  68. #ifndef X_CS_PIN
  69. #define X_CS_PIN PC14
  70. #endif
  71. #define Y_STEP_PIN PE3
  72. #define Y_DIR_PIN PE2
  73. #define Y_ENABLE_PIN PE4
  74. #ifndef Y_CS_PIN
  75. #define Y_CS_PIN PE1
  76. #endif
  77. #define Z_STEP_PIN PB8
  78. #define Z_DIR_PIN PB7 // PB7
  79. #define Z_ENABLE_PIN PB9
  80. #ifndef Z_CS_PIN
  81. #define Z_CS_PIN PB5
  82. #endif
  83. #define E0_STEP_PIN PG12
  84. #define E0_DIR_PIN PG11
  85. #define E0_ENABLE_PIN PG13
  86. #ifndef E0_CS_PIN
  87. #define E0_CS_PIN PG10
  88. #endif
  89. #define E1_STEP_PIN PD6
  90. #define E1_DIR_PIN PD5
  91. #define E1_ENABLE_PIN PD7
  92. #ifndef E1_CS_PIN
  93. #define E1_CS_PIN PD4
  94. #endif
  95. #define E2_STEP_PIN PD1
  96. #define E2_DIR_PIN PD0
  97. #define E2_ENABLE_PIN PD2
  98. #ifndef E2_CS_PIN
  99. #define E2_CS_PIN PC12
  100. #endif
  101. #define E3_STEP_PIN PF3
  102. #define E3_DIR_PIN PG3
  103. #define E3_ENABLE_PIN PF8
  104. #ifndef E3_CS_PIN
  105. #define E3_CS_PIN PG4
  106. #endif
  107. #define E4_STEP_PIN PD14
  108. #define E4_DIR_PIN PD11
  109. #define E4_ENABLE_PIN PG2
  110. #ifndef E4_CS_PIN
  111. #define E4_CS_PIN PE15
  112. #endif
  113. #define E5_STEP_PIN PE12
  114. #define E5_DIR_PIN PE10
  115. #define E5_ENABLE_PIN PF14
  116. #ifndef E5_CS_PIN
  117. #define E5_CS_PIN PE7
  118. #endif
  119. #define E6_STEP_PIN PG0
  120. #define E6_DIR_PIN PG1
  121. #define E6_ENABLE_PIN PE8
  122. #ifndef E6_CS_PIN
  123. #define E6_CS_PIN PF15
  124. #endif
  125. #define E7_STEP_PIN PH12
  126. #define E7_DIR_PIN PH15
  127. #define E7_ENABLE_PIN PI0
  128. #ifndef E7_CS_PIN
  129. #define E7_CS_PIN PH14
  130. #endif
  131. //
  132. // Software SPI pins for TMC2130 stepper drivers
  133. //
  134. #if ENABLED(TMC_USE_SW_SPI)
  135. #ifndef TMC_SW_MOSI
  136. #define TMC_SW_MOSI PG15
  137. #endif
  138. #ifndef TMC_SW_MISO
  139. #define TMC_SW_MISO PB6
  140. #endif
  141. #ifndef TMC_SW_SCK
  142. #define TMC_SW_SCK PB3
  143. #endif
  144. #endif
  145. #if HAS_TMC_UART
  146. /**
  147. * TMC2208/TMC2209 stepper drivers
  148. *
  149. * Hardware serial communication ports.
  150. * If undefined software serial is used according to the pins below
  151. */
  152. //#define X_HARDWARE_SERIAL Serial1
  153. //#define X2_HARDWARE_SERIAL Serial1
  154. //#define Y_HARDWARE_SERIAL Serial1
  155. //#define Y2_HARDWARE_SERIAL Serial1
  156. //#define Z_HARDWARE_SERIAL Serial1
  157. //#define Z2_HARDWARE_SERIAL Serial1
  158. //#define E0_HARDWARE_SERIAL Serial1
  159. //#define E1_HARDWARE_SERIAL Serial1
  160. //#define E2_HARDWARE_SERIAL Serial1
  161. //#define E3_HARDWARE_SERIAL Serial1
  162. //#define E4_HARDWARE_SERIAL Serial1
  163. //#define E5_HARDWARE_SERIAL Serial1
  164. //#define E6_HARDWARE_SERIAL Serial1
  165. //#define E7_HARDWARE_SERIAL Serial1
  166. //
  167. // Software serial
  168. //
  169. #define X_SERIAL_TX_PIN PC14
  170. #define X_SERIAL_RX_PIN PC14
  171. #define Y_SERIAL_TX_PIN PE1
  172. #define Y_SERIAL_RX_PIN PE1
  173. #define Z_SERIAL_TX_PIN PB5
  174. #define Z_SERIAL_RX_PIN PB5
  175. #define E0_SERIAL_TX_PIN PG10
  176. #define E0_SERIAL_RX_PIN PG10
  177. #define E1_SERIAL_TX_PIN PD4
  178. #define E1_SERIAL_RX_PIN PD4
  179. #define E2_SERIAL_TX_PIN PC12
  180. #define E2_SERIAL_RX_PIN PC12
  181. #define E3_SERIAL_TX_PIN PG4
  182. #define E3_SERIAL_RX_PIN PG4
  183. #define E4_SERIAL_TX_PIN PE15
  184. #define E4_SERIAL_RX_PIN PE15
  185. #define E5_SERIAL_TX_PIN PE7
  186. #define E5_SERIAL_RX_PIN PE7
  187. #define E6_SERIAL_TX_PIN PF15
  188. #define E6_SERIAL_RX_PIN PF15
  189. #define E7_SERIAL_TX_PIN PH14
  190. #define E7_SERIAL_RX_PIN PH14
  191. // Reduce baud rate to improve software serial reliability
  192. #define TMC_BAUD_RATE 19200
  193. #endif
  194. //
  195. // Temperature Sensors
  196. //
  197. #define TEMP_0_PIN PC1 // T1 <-> E0
  198. #define TEMP_1_PIN PC2 // T2 <-> E1
  199. #define TEMP_2_PIN PC3 // T3 <-> E2
  200. #define TEMP_3_PIN PA3 // T4 <-> E3
  201. #define TEMP_4_PIN PF9 // T5 <-> E4
  202. #define TEMP_5_PIN PF10 // T6 <-> E5
  203. #define TEMP_6_PIN PF7 // T7 <-> E6
  204. #define TEMP_7_PIN PF5 // T8 <-> E7
  205. #define TEMP_BED_PIN PC0 // T0 <-> Bed
  206. // SPI for Max6675 or Max31855 Thermocouple
  207. // Uses a separate SPI bus
  208. // If you have a two-way thermocouple, you can customize two THERMO_CSx_PIN pins (x:1~2)
  209. #define THERMO_SCK_PIN PI1 // SCK
  210. #define THERMO_DO_PIN PI2 // MISO
  211. #define THERMO_CS1_PIN PH9 // CS1
  212. #define THERMO_CS2_PIN PH2 // CS2
  213. #define MAX6675_SS_PIN THERMO_CS1_PIN
  214. #define MAX6675_SS2_PIN THERMO_CS2_PIN
  215. #define MAX6675_SCK_PIN THERMO_SCK_PIN
  216. #define MAX6675_DO_PIN THERMO_DO_PIN
  217. //
  218. // Heaters / Fans
  219. //
  220. #define HEATER_0_PIN PB1 // Heater0
  221. #define HEATER_1_PIN PA1 // Heater1
  222. #define HEATER_2_PIN PB0 // Heater2
  223. #define HEATER_3_PIN PD15 // Heater3
  224. #define HEATER_4_PIN PD13 // Heater4
  225. #define HEATER_5_PIN PD12 // Heater5
  226. #define HEATER_6_PIN PE13 // Heater6
  227. #define HEATER_7_PIN PI6 // Heater7
  228. #define HEATER_BED_PIN PA2 // Hotbed
  229. #define FAN_PIN PE5 // Fan0
  230. #define FAN1_PIN PE6 // Fan1
  231. #define FAN2_PIN PC8 // Fan2
  232. #define FAN3_PIN PI5 // Fan3
  233. #define FAN4_PIN PE9 // Fan4
  234. #define FAN5_PIN PE11 // Fan5
  235. //#define FAN6_PIN PC9 // Fan6
  236. //#define FAN7_PIN PE14 // Fan7
  237. #ifndef SDCARD_CONNECTION
  238. #define SDCARD_CONNECTION ONBOARD
  239. #endif
  240. //
  241. // By default the LCD SD (SPI2) is enabled
  242. // Onboard SD is on a completely separate SPI bus, and requires
  243. // overriding pins to access.
  244. //
  245. #if SD_CONNECTION_IS(LCD)
  246. #define SD_DETECT_PIN PB10
  247. #define SDSS PB12
  248. #elif SD_CONNECTION_IS(ONBOARD)
  249. // Instruct the STM32 HAL to override the default SPI pins from the variant.h file
  250. #define CUSTOM_SPI_PINS
  251. #define SDSS PA4
  252. #define SS_PIN SDSS
  253. #define SCK_PIN PA5
  254. #define MISO_PIN PA6
  255. #define MOSI_PIN PA7
  256. #define SD_DETECT_PIN PC4
  257. #elif SD_CONNECTION_IS(CUSTOM_CABLE)
  258. #error "CUSTOM_CABLE is not a supported SDCARD_CONNECTION for this board"
  259. #endif
  260. /**
  261. * ----- -----
  262. * NC | · · | GND 5V | · · | GND
  263. * RESET | · · | PB10(SD_DETECT) (LCD_D7) PG5 | · · | PG6 (LCD_D6)
  264. * (MOSI)PB15 | · · | PH10(BTN_EN2) (LCD_D5) PG7 | · · | PG8 (LCD_D4)
  265. * (SD_SS)PB12 | · · | PD10(BTN_EN1) (LCD_RS) PA8 | · · | PC10 (LCD_EN)
  266. * (SCK)PB13 | · · | PB14(MISO) (BTN_ENC) PA15 | · · | PC11 (BEEPER)
  267. * ----- -----
  268. * EXP2 EXP1
  269. */
  270. //
  271. // LCDs and Controllers
  272. //
  273. #if HAS_WIRED_LCD
  274. #define BEEPER_PIN PC11
  275. #define BTN_ENC PA15
  276. #if ENABLED(CR10_STOCKDISPLAY)
  277. #define LCD_PINS_RS PG6
  278. #define BTN_EN1 PC10
  279. #define BTN_EN2 PG8
  280. #define LCD_PINS_ENABLE PG5
  281. #define LCD_PINS_D4 PG7
  282. // CR10_STOCKDISPLAY default timing is too fast
  283. #undef BOARD_ST7920_DELAY_1
  284. #undef BOARD_ST7920_DELAY_2
  285. #undef BOARD_ST7920_DELAY_3
  286. #elif ENABLED(MKS_MINI_12864)
  287. #define DOGLCD_A0 PG6
  288. #define DOGLCD_CS PG7
  289. #define BTN_EN1 PD10
  290. #define BTN_EN2 PH10
  291. #if SD_CONNECTION_IS(ONBOARD)
  292. #define SOFTWARE_SPI
  293. #endif
  294. #else
  295. #define LCD_PINS_RS PA8
  296. #define BTN_EN1 PD10
  297. #define BTN_EN2 PH10
  298. #define LCD_PINS_ENABLE PC10
  299. #define LCD_PINS_D4 PG8
  300. #if ENABLED(FYSETC_MINI_12864)
  301. #define DOGLCD_CS PC10
  302. #define DOGLCD_A0 PA8
  303. #if SD_CONNECTION_IS(ONBOARD)
  304. #define SOFTWARE_SPI
  305. #endif
  306. //#define LCD_BACKLIGHT_PIN -1
  307. #define LCD_RESET_PIN PG8 // Must be high or open for LCD to operate normally.
  308. #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
  309. #ifndef RGB_LED_R_PIN
  310. #define RGB_LED_R_PIN PG7
  311. #endif
  312. #ifndef RGB_LED_G_PIN
  313. #define RGB_LED_G_PIN PG6
  314. #endif
  315. #ifndef RGB_LED_B_PIN
  316. #define RGB_LED_B_PIN PG5
  317. #endif
  318. #elif ENABLED(FYSETC_MINI_12864_2_1)
  319. #define NEOPIXEL_PIN PF13
  320. #endif
  321. #endif // !FYSETC_MINI_12864
  322. #if ENABLED(ULTIPANEL)
  323. #define LCD_PINS_D5 PG7
  324. #define LCD_PINS_D6 PG6
  325. #define LCD_PINS_D7 PG5
  326. #endif
  327. #endif
  328. // Alter timing for graphical display
  329. #if HAS_MARLINUI_U8GLIB
  330. #ifndef BOARD_ST7920_DELAY_1
  331. #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
  332. #endif
  333. #ifndef BOARD_ST7920_DELAY_2
  334. #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
  335. #endif
  336. #ifndef BOARD_ST7920_DELAY_3
  337. #define BOARD_ST7920_DELAY_3 DELAY_NS(600)
  338. #endif
  339. #endif
  340. #endif // HAS_WIRED_LCD
  341. #undef TP