My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

pins_BTT_E3_RRF.h 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2021 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. #endif
  26. #ifndef BOARD_INFO_NAME
  27. #define BOARD_INFO_NAME "BTT E3 RRF"
  28. #endif
  29. // Add-on board for IDEX conversion
  30. //#define BTT_E3_RRF_IDEX_BOARD
  31. // Onboard I2C EEPROM
  32. #define I2C_EEPROM
  33. #define MARLIN_EEPROM_SIZE 0x1000 // 4KB
  34. //
  35. // Servos
  36. //
  37. #define SERVO0_PIN PB0 // SERVOS
  38. //
  39. // Limit Switches
  40. //
  41. #define X_STOP_PIN PC0 // X-STOP
  42. #define Y_STOP_PIN PC1 // Y-STOP
  43. #define Z_STOP_PIN PC2 // Z-STOP
  44. #if ENABLED(BTT_E3_RRF_IDEX_BOARD)
  45. #if X2_USE_ENDSTOP == _XMAX_
  46. #define X_MAX_PIN FPC2_PIN // X2-STOP
  47. #elif X2_USE_ENDSTOP == _XMIN_
  48. #define X_MIN_PIN FPC2_PIN // X2-STOP
  49. #endif
  50. #endif
  51. //
  52. // Z Probe must be this pin
  53. //
  54. #define Z_MIN_PROBE_PIN PC5 // PROBE
  55. //
  56. // Filament Runout Sensor
  57. //
  58. #ifndef FIL_RUNOUT_PIN
  59. #define FIL_RUNOUT_PIN PC3 // E0-STOP
  60. #endif
  61. #if !defined(FIL1_RUNOUT2_PIN) && ENABLED(BTT_E3_RRF_IDEX_BOARD)
  62. #define FIL_RUNOUT2_PIN FPC3_PIN // E1-STOP
  63. #endif
  64. //
  65. // Power-loss Detection
  66. //
  67. #ifndef POWER_LOSS_PIN
  68. #define POWER_LOSS_PIN PE0 // Power Loss Detection: PWR-DET
  69. #endif
  70. //
  71. // Steppers
  72. //
  73. #define X_ENABLE_PIN PD7
  74. #define X_STEP_PIN PD5
  75. #define X_DIR_PIN PD4
  76. #define Y_ENABLE_PIN PD3
  77. #define Y_STEP_PIN PD0
  78. #define Y_DIR_PIN PA15
  79. #define Z_ENABLE_PIN PD14
  80. #define Z_STEP_PIN PC6
  81. #define Z_DIR_PIN PC7
  82. #define E0_ENABLE_PIN PD10
  83. #define E0_STEP_PIN PD12
  84. #define E0_DIR_PIN PD13
  85. #if ENABLED(BTT_E3_RRF_IDEX_BOARD)
  86. #define E1_ENABLE_PIN FPC7_PIN // E1EN
  87. #define E1_STEP_PIN FPC5_PIN // E1STP
  88. #define E1_DIR_PIN FPC4_PIN // E1DIR
  89. #define X2_ENABLE_PIN FPC13_PIN // X2EN
  90. #define X2_STEP_PIN FPC11_PIN // X2STP
  91. #define X2_DIR_PIN FPC10_PIN // X2DIR
  92. #endif
  93. /**
  94. * TMC2208/TMC2209 stepper drivers
  95. */
  96. #if HAS_TMC_UART
  97. #define X_SERIAL_TX_PIN PD6
  98. #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN
  99. #define Y_SERIAL_TX_PIN PD1
  100. #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN
  101. #define Z_SERIAL_TX_PIN PD15
  102. #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN
  103. #define E0_SERIAL_TX_PIN PD11
  104. #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
  105. #if ENABLED(BTT_E3_RRF_IDEX_BOARD)
  106. #define X2_SERIAL_TX_PIN FPC12_PIN // X2UART
  107. #define X2_SERIAL_RX_PIN X2_SERIAL_TX_PIN
  108. #define E1_SERIAL_TX_PIN FPC6_PIN // E1UART
  109. #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
  110. #endif
  111. // Reduce baud rate to improve software serial reliability
  112. #define TMC_BAUD_RATE 19200
  113. #endif
  114. //
  115. // Temperature Sensors
  116. //
  117. #define TEMP_BED_PIN PA1 // Analog Input "TB"
  118. #define TEMP_0_PIN PA0 // Analog Input "TH0"
  119. #if ENABLED(BTT_E3_RRF_IDEX_BOARD)
  120. #define TEMP_1_PIN FPC9_PIN // Analog Input "TH1"
  121. #define PT100_PIN FPC8_PIN // Analog Input "PT100" (INA826)
  122. #endif
  123. //
  124. // Heaters / Fans
  125. //
  126. #define HEATER_BED_PIN PB4 // "HB"
  127. #define HEATER_0_PIN PB3 // "HE0"
  128. #if ENABLED(BTT_E3_RRF_IDEX_BOARD)
  129. #define HEATER_1_PIN FPC16_PIN // "HE1"
  130. #endif
  131. #define FAN_PIN PB5 // "FAN0"
  132. #ifndef CONTROLLER_FAN_PIN
  133. #define CONTROLLER_FAN_PIN PB6 // "FAN1"
  134. #endif
  135. #if ENABLED(BTT_E3_RRF_IDEX_BOARD)
  136. #define FAN1_PIN FPC15_PIN // "FAN0" in IDEX board
  137. #define FAN2_PIN FPC14_PIN // "FAN1" in IDEX board
  138. #else
  139. //#define FAN1_PIN PB6 // "FAN1"
  140. #endif
  141. //
  142. // Misc. Functions
  143. //
  144. #ifndef NEOPIXEL_PIN
  145. #define NEOPIXEL_PIN PB7 // LED driving pin
  146. #endif
  147. #ifndef PS_ON_PIN
  148. #define PS_ON_PIN PE1 // Power Supply Control
  149. #endif
  150. /**
  151. * BTT E3 RRF
  152. * -----
  153. * 5V | 1 2 | GND
  154. * (LCD_EN) PE11 | 3 4 | PB1 (LCD_RS)
  155. * (LCD_D4) PE10 | 5 6 PB2 (BTN_EN2)
  156. * RESET | 7 8 | PE7 (BTN_EN1)
  157. * (BTN_ENC) PE9 | 9 10| PE8 (BEEPER)
  158. * -----
  159. * EXP1
  160. */
  161. #if HAS_WIRED_LCD
  162. #if ENABLED(CR10_STOCKDISPLAY)
  163. #define BEEPER_PIN PE8
  164. #define BTN_ENC PE9
  165. #define BTN_EN1 PE7
  166. #define BTN_EN2 PB2
  167. #define LCD_PINS_RS PB1
  168. #define LCD_PINS_ENABLE PE11
  169. #define LCD_PINS_D4 PE10
  170. #elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD!
  171. #error "CAUTION! ZONESTAR_LCD requires wiring modifications. See 'pins_BTT_E3_RRF.h' for details. Comment out this line to continue."
  172. #define LCD_PINS_RS PE10
  173. #define LCD_PINS_ENABLE PE9
  174. #define LCD_PINS_D4 PB1
  175. #define LCD_PINS_D5 PB2
  176. #define LCD_PINS_D6 PE7
  177. #define LCD_PINS_D7 PE8
  178. #define ADC_KEYPAD_PIN PB0 // Repurpose servo pin for ADC - CONNECTING TO 5V WILL DAMAGE THE BOARD!
  179. #elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
  180. #define BTN_ENC PE9
  181. #define BTN_EN1 PE7
  182. #define BTN_EN2 PB2
  183. #define DOGLCD_CS PB1
  184. #define DOGLCD_A0 PE10
  185. #define DOGLCD_SCK PE8
  186. #define DOGLCD_MOSI PE11
  187. #define FORCE_SOFT_SPI
  188. #define LCD_BACKLIGHT_PIN -1
  189. #elif IS_TFTGLCD_PANEL
  190. #if ENABLED(TFTGLCD_PANEL_SPI)
  191. #error "CAUTION! TFTGLCD_PANEL_SPI requires wiring modifications. See 'pins_BTT_E3_RRF.h' for details. Comment out this line to continue."
  192. /**
  193. * TFTGLCD_PANEL_SPI display pinout
  194. *
  195. * Board Display
  196. * ----- -----
  197. * 5V | 1 2 | GND (SPI1-MISO) MISO | 1 2 | SCK (SPI1-SCK)
  198. * (FREE) PE11 | 3 4 | PB1 (LCD_CS) (PE7) LCD_CS | 3 4 | SD_CS (PB2)
  199. * (FREE) PE10 | 5 6 | PB2 (SD_CS) (FREE) | 5 6 | MOSI (SPI1-MOSI)
  200. * RESET | 7 8 | PE7 (MOD_RESET) (PE8) SD_DET | 7 8 | (FREE)
  201. * (BEEPER) PE9 | 9 10| PE8 (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 ----------- FREE
  213. * SPI1-3 ----------- EXP1-2
  214. * EXP1-6 ----------- EXP1-4
  215. * EXP1-7 ----------- FREE
  216. * EXP1-8 ----------- EXP1-3
  217. * SPI1-1 ----------- EXP1-1
  218. * EXP1-10 ----------- EXP1-7
  219. */
  220. #define TFTGLCD_CS PE7
  221. #endif
  222. #else
  223. #error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, and TFTGLCD_PANEL_(SPI|I2C) are currently supported on the BTT_E3_RRF."
  224. #endif
  225. // Alter timing for graphical display
  226. #if IS_U8GLIB_ST7920
  227. #define BOARD_ST7920_DELAY_1 96
  228. #define BOARD_ST7920_DELAY_2 48
  229. #define BOARD_ST7920_DELAY_3 600
  230. #endif
  231. #endif // HAS_WIRED_LCD
  232. #if BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050)
  233. #error "CAUTION! LCD_FYSETC_TFT81050 requires wiring modifications. See 'pins_BTT_E3_RRF.h' for details. Comment out this line to continue."
  234. /** FYSETC TFT TFT81050 display pinout
  235. *
  236. * Board Display
  237. * ----- -----
  238. * 5V | 1 2 | GND (SPI1-MISO) MISO | 1 2 | SCK (SPI1-SCK)
  239. * (FREE) PE11 | 3 4 | PB1 (LCD_CS) (PE7) MOD_RESET | 3 4 | SD_CS (PB2)
  240. * (FREE) PE10 | 5 6 | PB2 (SD_CS) (PB1) LCD_CS | 5 6 | MOSI (SPI1-MOSI)
  241. * RESET | 7 8 | PE7 (MOD_RESET) (PE8) SD_DET | 7 8 | RESET
  242. * (BEEPER) PE9 | 9 10| PE8 (SD_DET) GND | 9 10| 5V
  243. * ----- -----
  244. * EXP1 EXP1
  245. *
  246. * Needs custom cable:
  247. *
  248. * Board Adapter Display
  249. * _________
  250. * EXP1-1 ----------- EXP1-10
  251. * EXP1-2 ----------- EXP1-9
  252. * SPI1-4 ----------- EXP1-6
  253. * EXP1-4 ----------- EXP1-5
  254. * SPI1-3 ----------- EXP1-2
  255. * EXP1-6 ----------- EXP1-4
  256. * EXP1-7 ----------- EXP1-8
  257. * EXP1-8 ----------- EXP1-3
  258. * SPI1-1 ----------- EXP1-1
  259. * EXP1-10 ----------- EXP1-7
  260. */
  261. #define CLCD_SPI_BUS 1 // SPI1 connector
  262. #define BEEPER_PIN PE9
  263. #define CLCD_MOD_RESET PE7
  264. #define CLCD_SPI_CS PB1
  265. #endif // TOUCH_UI_FTDI_EVE && LCD_FYSETC_TFT81050
  266. //
  267. // SD Support
  268. //
  269. #ifndef SDCARD_CONNECTION
  270. #define SDCARD_CONNECTION ONBOARD
  271. #endif
  272. #if SD_CONNECTION_IS(ONBOARD)
  273. #define SDIO_SUPPORT // Use SDIO for onboard SD
  274. #define SDIO_D0_PIN PC8
  275. #define SDIO_D1_PIN PC9
  276. #define SDIO_D2_PIN PC10
  277. #define SDIO_D3_PIN PC11
  278. #define SDIO_CK_PIN PC12
  279. #define SDIO_CMD_PIN PD2
  280. //#define SDIO_CLOCK 48000000
  281. #define SD_DETECT_PIN PC4
  282. #elif SD_CONNECTION_IS(CUSTOM_CABLE)
  283. #error "SD CUSTOM_CABLE is not compatible with BTT E3 RRF."
  284. #endif
  285. //
  286. // WIFI
  287. //
  288. #define ESP_WIFI_MODULE_COM 3 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this
  289. #define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2
  290. #define ESP_WIFI_MODULE_RESET_PIN PA4
  291. #define ESP_WIFI_MODULE_ENABLE_PIN PA5
  292. #define ESP_WIFI_MODULE_GPIO0_PIN PA6
  293. #if ENABLED(BTT_E3_RRF_IDEX_BOARD)
  294. #define FPC2_PIN PB11
  295. #define FPC3_PIN PB10
  296. #define FPC4_PIN PE12
  297. #define FPC5_PIN PE13
  298. #define FPC6_PIN PE14
  299. #define FPC7_PIN PE15
  300. #define FPC8_PIN PA3
  301. #define FPC9_PIN PA2
  302. #define FPC10_PIN PA8
  303. #define FPC11_PIN PC15
  304. #define FPC12_PIN PC14
  305. #define FPC13_PIN PC13
  306. #define FPC14_PIN PE6
  307. #define FPC15_PIN PE5
  308. #define FPC16_PIN PE4
  309. #define FPC17_PIN PE3
  310. #endif