My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

pins_BTT_SKR_PRO_V1_1.h 7.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  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 <http://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #pragma once
  23. #ifndef TARGET_STM32F4
  24. #error "Oops! Select an STM32F4 board in 'Tools > Board.'"
  25. #elif HOTENDS > 3 || E_STEPPERS > 3
  26. #error "BIGTREE SKR Pro V1.1 supports up to 3 hotends / E-steppers."
  27. #endif
  28. #define BOARD_INFO_NAME "BIGTREE SKR Pro 1.1" // redefined?
  29. // Use one of these or SDCard-based Emulation will be used
  30. //#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation
  31. //#define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation
  32. //
  33. // Servos
  34. //
  35. #define SERVO0_PIN PA1
  36. //
  37. // Limit Switches
  38. //
  39. #define X_MIN_PIN PB10
  40. #define X_MAX_PIN PE15
  41. #define Y_MIN_PIN PE12
  42. #define Y_MAX_PIN PE10
  43. #define Z_MIN_PIN PG8
  44. #define Z_MAX_PIN PG5
  45. //
  46. // Z Probe must be this pins
  47. //
  48. #ifndef Z_MIN_PROBE_PIN
  49. #define Z_MIN_PROBE_PIN PA2
  50. #endif
  51. //
  52. // Steppers
  53. //
  54. #define X_STEP_PIN PE9
  55. #define X_DIR_PIN PF1
  56. #define X_ENABLE_PIN PF2
  57. #ifndef X_CS_PIN
  58. #define X_CS_PIN PA15
  59. #endif
  60. #define Y_STEP_PIN PE11
  61. #define Y_DIR_PIN PE8
  62. #define Y_ENABLE_PIN PD7
  63. #ifndef Y_CS_PIN
  64. #define Y_CS_PIN PB8
  65. #endif
  66. #define Z_STEP_PIN PE13
  67. #define Z_DIR_PIN PC2
  68. #define Z_ENABLE_PIN PC0
  69. #ifndef Z_CS_PIN
  70. #define Z_CS_PIN PB9
  71. #endif
  72. #define E0_STEP_PIN PE14
  73. #define E0_DIR_PIN PA0
  74. #define E0_ENABLE_PIN PC3
  75. #ifndef E0_CS_PIN
  76. #define E0_CS_PIN PB3
  77. #endif
  78. #define E1_STEP_PIN PD15
  79. #define E1_DIR_PIN PE7
  80. #define E1_ENABLE_PIN PA3
  81. #ifndef E1_CS_PIN
  82. #define E1_CS_PIN PG15
  83. #endif
  84. #define E2_STEP_PIN PD13
  85. #define E2_DIR_PIN PG9
  86. #define E2_ENABLE_PIN PF0
  87. #ifndef E2_CS_PIN
  88. #define E2_CS_PIN PG12
  89. #endif
  90. //
  91. // Software SPI pins for TMC2130 stepper drivers
  92. //
  93. #if ENABLED(TMC_USE_SW_SPI)
  94. #ifndef TMC_SW_MOSI
  95. #define TMC_SW_MOSI PC12
  96. #endif
  97. #ifndef TMC_SW_MISO
  98. #define TMC_SW_MISO PC11
  99. #endif
  100. #ifndef TMC_SW_SCK
  101. #define TMC_SW_SCK PC10
  102. #endif
  103. #endif
  104. #if HAS_TMC220x
  105. /**
  106. * TMC2208/TMC2209 stepper drivers
  107. *
  108. * Hardware serial communication ports.
  109. * If undefined software serial is used according to the pins below
  110. */
  111. //#define X_HARDWARE_SERIAL Serial
  112. //#define X2_HARDWARE_SERIAL Serial1
  113. //#define Y_HARDWARE_SERIAL Serial1
  114. //#define Y2_HARDWARE_SERIAL Serial1
  115. //#define Z_HARDWARE_SERIAL Serial1
  116. //#define Z2_HARDWARE_SERIAL Serial1
  117. //#define E0_HARDWARE_SERIAL Serial1
  118. //#define E1_HARDWARE_SERIAL Serial1
  119. //#define E2_HARDWARE_SERIAL Serial1
  120. //#define E3_HARDWARE_SERIAL Serial1
  121. //#define E4_HARDWARE_SERIAL Serial1
  122. //
  123. // Software serial
  124. //
  125. #define X_SERIAL_TX_PIN PC13
  126. #define X_SERIAL_RX_PIN PC13
  127. #define Y_SERIAL_TX_PIN PE3
  128. #define Y_SERIAL_RX_PIN PE3
  129. #define Z_SERIAL_TX_PIN PE1
  130. #define Z_SERIAL_RX_PIN PE1
  131. #define E0_SERIAL_TX_PIN PD4
  132. #define E0_SERIAL_RX_PIN PD4
  133. #define E1_SERIAL_TX_PIN PD1
  134. #define E1_SERIAL_RX_PIN PD1
  135. #define E2_SERIAL_TX_PIN PD6
  136. #define E2_SERIAL_RX_PIN PD6
  137. // Reduce baud rate to improve software serial reliability
  138. #define TMC_BAUD_RATE 19200
  139. #endif
  140. //
  141. // Temperature Sensors
  142. //
  143. #define TEMP_0_PIN PF4 // T1 <-> E0
  144. #define TEMP_1_PIN PF5 // T2 <-> E1
  145. #define TEMP_2_PIN PF6 // T3 <-> E2
  146. #define TEMP_BED_PIN PF3 // T0 <-> Bed
  147. //
  148. // Heaters / Fans
  149. //
  150. #define HEATER_0_PIN PB1 // Heater0
  151. #define HEATER_1_PIN PD14 // Heater1
  152. #define HEATER_2_PIN PB0 // Heater1
  153. #define HEATER_BED_PIN PD12 // Hotbed
  154. #define FAN_PIN PC8 // Fan0
  155. #define FAN1_PIN PE5 // Fan1
  156. #define FAN2_PIN PE6 // Fan2
  157. //
  158. // Misc. Functions
  159. //
  160. //
  161. // Onboard SD card
  162. // NOT compatible with LCD
  163. //
  164. #if SDCARD_CONNECTION == ONBOARD && !defined(HAS_SPI_LCD)
  165. #define SOFTWARE_SPI // Use soft SPI for onboard SD
  166. #define SDSS PA4
  167. #define SCK_PIN PA5
  168. #define MISO_PIN PA6
  169. #define MOSI_PIN PB5
  170. #else
  171. #define SDSS PB12
  172. #endif
  173. /**
  174. * _____ _____
  175. * NC | · · | GND 5V | · · | GND
  176. * RESET | · · | PF12(SD_DETECT) (LCD_D7) PG7 | · · | PG6 (LCD_D6)
  177. * (MOSI)PB15 | · · | PF11(BTN_EN2) (LCD_D5) PG3 | · · | PG2 (LCD_D4)
  178. * (SD_SS)PB12 | · · | PG10(BTN_EN1) (LCD_RS) PD10 | · · | PD11 (LCD_EN)
  179. * (SCK)PB13 | · · | PB14(MISO) (BTN_ENC) PA8 | · · | PG4 (BEEPER)
  180. *  ̄ ̄  ̄ ̄
  181. * EXP2 EXP1
  182. */
  183. //
  184. // LCDs and Controllers
  185. //
  186. #if HAS_SPI_LCD
  187. #define BEEPER_PIN PG4
  188. #define BTN_ENC PA8
  189. #if ENABLED(CR10_STOCKDISPLAY)
  190. #define LCD_PINS_RS PG6
  191. #define BTN_EN1 PD11
  192. #define BTN_EN2 PG2
  193. #define LCD_PINS_ENABLE PG7
  194. #define LCD_PINS_D4 PG3
  195. // CR10_Stock Display needs a different delay setting on SKR PRO v1.1, so undef it here.
  196. // It will be defined again at the #HAS_GRAPHICAL_LCD section below.
  197. #undef ST7920_DELAY_1
  198. #undef ST7920_DELAY_2
  199. #undef ST7920_DELAY_3
  200. #else
  201. #define LCD_PINS_RS PD10
  202. #define BTN_EN1 PG10
  203. #define BTN_EN2 PF11
  204. #define SD_DETECT_PIN PF12
  205. #define LCD_SDSS PB12
  206. #define LCD_PINS_ENABLE PD11
  207. #define LCD_PINS_D4 PG2
  208. #if ENABLED(FYSETC_MINI_12864)
  209. #define DOGLCD_CS PD11
  210. #define DOGLCD_A0 PD10
  211. //#define LCD_BACKLIGHT_PIN -1
  212. #define LCD_RESET_PIN PG2 // Must be high or open for LCD to operate normally.
  213. #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
  214. #ifndef RGB_LED_R_PIN
  215. #define RGB_LED_R_PIN PG3
  216. #endif
  217. #ifndef RGB_LED_G_PIN
  218. #define RGB_LED_G_PIN PG6
  219. #endif
  220. #ifndef RGB_LED_B_PIN
  221. #define RGB_LED_B_PIN PG7
  222. #endif
  223. #elif ENABLED(FYSETC_MINI_12864_2_1)
  224. #define NEOPIXEL_PIN PG3
  225. #endif
  226. #endif // !FYSETC_MINI_12864
  227. #if ENABLED(ULTIPANEL)
  228. #define LCD_PINS_D5 PG3
  229. #define LCD_PINS_D6 PG6
  230. #define LCD_PINS_D7 PG7
  231. #endif
  232. #endif
  233. // Alter timing for graphical display
  234. #if HAS_GRAPHICAL_LCD
  235. #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
  236. #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
  237. #define BOARD_ST7920_DELAY_3 DELAY_NS(600)
  238. #endif
  239. #endif // HAS_SPI_LCD