My Marlin configs for Fabrikator Mini and CTC i3 Pro B
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

pins_BTT_SKR_E3_DIP.h 9.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  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. #include "env_validate.h"
  24. #define BOARD_INFO_NAME "BTT SKR E3 DIP V1.x"
  25. // Release PB3/PB4 (TMC_SW Pins) from JTAG pins
  26. #define DISABLE_JTAG
  27. // Ignore temp readings during development.
  28. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
  29. #if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION)
  30. #define FLASH_EEPROM_EMULATION
  31. #define EEPROM_PAGE_SIZE (0x800U) // 2K
  32. #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL)
  33. #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE // 2K
  34. #endif
  35. //
  36. // Servos
  37. //
  38. #define SERVO0_PIN PA1 // SERVOS
  39. //
  40. // Limit Switches
  41. //
  42. #define X_STOP_PIN PC1 // X-STOP
  43. #define Y_STOP_PIN PC0 // Y-STOP
  44. #define Z_STOP_PIN PC15 // Z-STOP
  45. //
  46. // Z Probe must be this pin
  47. //
  48. #define Z_MIN_PROBE_PIN PC14 // PROBE
  49. //
  50. // Filament Runout Sensor
  51. //
  52. #ifndef FIL_RUNOUT_PIN
  53. #define FIL_RUNOUT_PIN PC2 // E0-STOP
  54. #endif
  55. //
  56. // Steppers
  57. //
  58. #define X_ENABLE_PIN PC7
  59. #define X_STEP_PIN PC6
  60. #define X_DIR_PIN PB15
  61. #ifndef X_CS_PIN
  62. #define X_CS_PIN PC10
  63. #endif
  64. #define Y_ENABLE_PIN PB14
  65. #define Y_STEP_PIN PB13
  66. #define Y_DIR_PIN PB12
  67. #ifndef Y_CS_PIN
  68. #define Y_CS_PIN PC11
  69. #endif
  70. #define Z_ENABLE_PIN PB11
  71. #define Z_STEP_PIN PB10
  72. #define Z_DIR_PIN PB2
  73. #ifndef Z_CS_PIN
  74. #define Z_CS_PIN PC12
  75. #endif
  76. #define E0_ENABLE_PIN PB1
  77. #define E0_STEP_PIN PB0
  78. #define E0_DIR_PIN PC5
  79. #ifndef E0_CS_PIN
  80. #define E0_CS_PIN PD2
  81. #endif
  82. //
  83. // Software SPI pins for TMC2130 stepper drivers
  84. //
  85. #if ENABLED(TMC_USE_SW_SPI)
  86. #ifndef TMC_SW_MOSI
  87. #define TMC_SW_MOSI PB5
  88. #endif
  89. #ifndef TMC_SW_MISO
  90. #define TMC_SW_MISO PB4
  91. #endif
  92. #ifndef TMC_SW_SCK
  93. #define TMC_SW_SCK PB3
  94. #endif
  95. #endif
  96. #if HAS_TMC_UART
  97. /**
  98. * TMC2208/TMC2209 stepper drivers
  99. *
  100. * Hardware serial communication ports.
  101. * If undefined software serial is used according to the pins below
  102. */
  103. //#define X_HARDWARE_SERIAL MSerial1
  104. //#define Y_HARDWARE_SERIAL MSerial1
  105. //#define Z_HARDWARE_SERIAL MSerial1
  106. //#define E0_HARDWARE_SERIAL MSerial1
  107. #define X_SERIAL_TX_PIN PC10
  108. #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN
  109. #define Y_SERIAL_TX_PIN PC11
  110. #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN
  111. #define Z_SERIAL_TX_PIN PC12
  112. #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN
  113. #define E0_SERIAL_TX_PIN PD2
  114. #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
  115. // Reduce baud rate to improve software serial reliability
  116. #define TMC_BAUD_RATE 19200
  117. #endif
  118. //
  119. // Temperature Sensors
  120. //
  121. #define TEMP_0_PIN PA0 // Analog Input "TH0"
  122. #define TEMP_BED_PIN PC3 // Analog Input "TB0"
  123. //
  124. // Heaters / Fans
  125. //
  126. #define HEATER_0_PIN PC8 // "HE"
  127. #define HEATER_BED_PIN PC9 // "HB"
  128. #define FAN_PIN PA8 // "FAN0"
  129. //
  130. // USB connect control
  131. //
  132. #define USB_CONNECT_PIN PC13
  133. #define USB_CONNECT_INVERTING false
  134. /**
  135. * ------
  136. * (BEEPER) PA15 | 1 2 | PB6 (BTN_ENC)
  137. * (BTN_EN1) PA9 | 3 4 | RESET
  138. * (BTN_EN2) PA10 5 6 | PB9 (LCD_D4)
  139. * (LCD_RS) PB8 | 7 8 | PB7 (LCD_EN)
  140. * GND | 9 10 | 5V
  141. * ------
  142. * EXP1
  143. */
  144. #if HAS_WIRED_LCD
  145. #if ENABLED(CR10_STOCKDISPLAY)
  146. #define BEEPER_PIN PA15
  147. #define BTN_ENC PB6
  148. #define BTN_EN1 PA9
  149. #define BTN_EN2 PA10
  150. #define LCD_PINS_RS PB8
  151. #define LCD_PINS_ENABLE PB7
  152. #define LCD_PINS_D4 PB9
  153. #elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD!
  154. #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
  155. #error "CAUTION! ZONESTAR_LCD requires wiring modifications. See 'pins_BTT_SKR_MINI_E3_DIP.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
  156. #endif
  157. #define LCD_PINS_RS PB9
  158. #define LCD_PINS_ENABLE PB6
  159. #define LCD_PINS_D4 PB8
  160. #define LCD_PINS_D5 PA10
  161. #define LCD_PINS_D6 PA9
  162. #define LCD_PINS_D7 PA15
  163. #define ADC_KEYPAD_PIN PA1 // Repurpose servo pin for ADC - CONNECTING TO 5V WILL DAMAGE THE BOARD!
  164. #elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
  165. /** Creality Ender-2 display pinout
  166. * ------
  167. * (SCK) PA15 | 1 2 | PB6 (BTN_ENC)
  168. * (BTN_EN1) PA9 | 3 4 | RESET
  169. * (BTN_EN2) PA10 5 6 | PB9 (LCD_A0)
  170. * (LCD_RS) PB8 | 7 8 | PB7 (MOSI)
  171. * GND | 9 10 | 5V
  172. * ------
  173. * EXP1
  174. */
  175. #define BTN_ENC PB6
  176. #define BTN_EN1 PA9
  177. #define BTN_EN2 PA10
  178. #define DOGLCD_CS PB8
  179. #define DOGLCD_A0 PB9
  180. #define DOGLCD_SCK PA15
  181. #define DOGLCD_MOSI PB7
  182. #define FORCE_SOFT_SPI
  183. #define LCD_BACKLIGHT_PIN -1
  184. #else
  185. #error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, and MKS_LCD12864A/B are currently supported on the BIGTREE_SKR_E3_DIP."
  186. #endif
  187. #endif // HAS_WIRED_LCD
  188. #if BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050)
  189. #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
  190. #error "CAUTION! LCD_FYSETC_TFT81050 requires wiring modifications. See 'pins_BTT_SKR_E3_DIP.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
  191. #endif
  192. /** FYSETC TFT TFT81050 display pinout
  193. *
  194. * Board Display
  195. * ------ ------
  196. * (SD_DET) PA15 | 1 2 | PB6 (BEEPER) 5V |10 9 | GND
  197. * (MOD_RESET) PA9 | 3 4 | RESET (RESET) | 8 7 | (SD_DET)
  198. * (SD_CS) PA10 5 6 | PB9 (MOSI) 6 5 | (LCD_CS)
  199. * (LCD_CS) PB8 | 7 8 | PB7 (SD_CS) | 4 3 | (MOD_RESET)
  200. * GND | 9 10 | 5V (SCK) | 2 1 | (MISO)
  201. * ------ ------
  202. * EXP1 EXP1
  203. *
  204. * Needs custom cable:
  205. *
  206. * Board Adapter Display
  207. * ----------------------------------
  208. * EXP1-10 ---------- EXP1-10 5V
  209. * EXP1-9 ----------- EXP1-9 GND
  210. * SPI1-4 ----------- EXP1-6 MOSI
  211. * EXP1-7 ----------- EXP1-5 LCD_CS
  212. * SP11-3 ----------- EXP1-2 SCK
  213. * EXP1-5 ----------- EXP1-4 SD_CS
  214. * EXP1-4 ----------- EXP1-8 RESET
  215. * EXP1-3 ----------- EXP1-3 MOD_RST
  216. * SPI1-1 ----------- EXP1-1 MISO
  217. * EXP1-1 ----------- EXP1-7 SD_DET
  218. */
  219. #define CLCD_SPI_BUS 1 // SPI1 connector
  220. #define BEEPER_PIN PB6
  221. #define CLCD_MOD_RESET PA9
  222. #define CLCD_SPI_CS PB8
  223. #endif // TOUCH_UI_FTDI_EVE && LCD_FYSETC_TFT81050
  224. //
  225. // SD Support
  226. //
  227. #ifndef SDCARD_CONNECTION
  228. #define SDCARD_CONNECTION ONBOARD
  229. #endif
  230. #if SD_CONNECTION_IS(ONBOARD)
  231. #define SD_DETECT_PIN PC4
  232. #define SD_SCK_PIN PA5
  233. #define SD_MISO_PIN PA6
  234. #define SD_MOSI_PIN PA7
  235. #elif SD_CONNECTION_IS(LCD) && BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050)
  236. #define SD_DETECT_PIN PA15
  237. #define SD_SS_PIN PA10
  238. #elif SD_CONNECTION_IS(CUSTOM_CABLE)
  239. #error "SD CUSTOM_CABLE is not compatible with SKR E3 DIP."
  240. #endif
  241. #define ONBOARD_SPI_DEVICE 1 // SPI1
  242. #define ONBOARD_SD_CS_PIN PA4 // Chip select for "System" SD card
  243. #define SDSS ONBOARD_SD_CS_PIN