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

pins_BTT_SKR_E3_DIP.h 9.0KB

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