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_SKR_E3_DIP.h 5.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2019 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_STM32F1
  24. #error "Oops! Select an STM32F1 board in 'Tools > Board.'"
  25. #endif
  26. #define BOARD_INFO_NAME "BIGTREE SKR E3 DIP V1.0"
  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. #define FLASH_EEPROM_EMULATION
  32. #define EEPROM_PAGE_SIZE uint16(0x800) // 2KB
  33. #define EEPROM_START_ADDRESS uint32(0x8000000 + (STM32_FLASH_SIZE) * 1024 - 2 * EEPROM_PAGE_SIZE)
  34. #undef E2END
  35. #define E2END (EEPROM_PAGE_SIZE - 1) // 2KB
  36. //
  37. // Servos
  38. //
  39. #define SERVO0_PIN PA1
  40. //
  41. // Limit Switches
  42. //
  43. #define X_STOP_PIN PC1
  44. #define Y_STOP_PIN PC0
  45. #define Z_STOP_PIN PC15
  46. //
  47. // Z Probe must be this pin
  48. //
  49. #define Z_MIN_PROBE_PIN PC14
  50. //
  51. // Filament Runout Sensor
  52. //
  53. #ifndef FIL_RUNOUT_PIN
  54. #define FIL_RUNOUT_PIN PC2
  55. #endif
  56. //
  57. // Steppers
  58. //
  59. #define X_ENABLE_PIN PC7
  60. #define X_STEP_PIN PC6
  61. #define X_DIR_PIN PB15
  62. #ifndef X_CS_PIN
  63. #define X_CS_PIN PC10
  64. #endif
  65. #define Y_ENABLE_PIN PB14
  66. #define Y_STEP_PIN PB13
  67. #define Y_DIR_PIN PB12
  68. #ifndef Y_CS_PIN
  69. #define Y_CS_PIN PC11
  70. #endif
  71. #define Z_ENABLE_PIN PB11
  72. #define Z_STEP_PIN PB10
  73. #define Z_DIR_PIN PB2
  74. #ifndef Z_CS_PIN
  75. #define Z_CS_PIN PC12
  76. #endif
  77. #define E0_ENABLE_PIN PB1
  78. #define E0_STEP_PIN PB0
  79. #define E0_DIR_PIN PC5
  80. #ifndef E0_CS_PIN
  81. #define E0_CS_PIN PD2
  82. #endif
  83. //
  84. // Software SPI pins for TMC2130 stepper drivers
  85. //
  86. #if ENABLED(TMC_USE_SW_SPI)
  87. #ifndef TMC_SW_MOSI
  88. #define TMC_SW_MOSI PB5
  89. #endif
  90. #ifndef TMC_SW_MISO
  91. #define TMC_SW_MISO PB4
  92. #endif
  93. #ifndef TMC_SW_SCK
  94. #define TMC_SW_SCK PB3
  95. #endif
  96. #endif
  97. #if HAS_TMC220x
  98. /**
  99. * TMC2208/TMC2209 stepper drivers
  100. *
  101. * Hardware serial communication ports.
  102. * If undefined software serial is used according to the pins below
  103. */
  104. //#define X_HARDWARE_SERIAL Serial1
  105. //#define Y_HARDWARE_SERIAL Serial1
  106. //#define Z_HARDWARE_SERIAL Serial1
  107. //#define E0_HARDWARE_SERIAL Serial1
  108. //
  109. // Software serial
  110. //
  111. #define X_SERIAL_TX_PIN PC10
  112. #define X_SERIAL_RX_PIN PC10
  113. #define Y_SERIAL_TX_PIN PC11
  114. #define Y_SERIAL_RX_PIN PC11
  115. #define Z_SERIAL_TX_PIN PC12
  116. #define Z_SERIAL_RX_PIN PC12
  117. #define E0_SERIAL_TX_PIN PD2
  118. #define E0_SERIAL_RX_PIN PD2
  119. // Reduce baud rate to improve software serial reliability
  120. #define TMC_BAUD_RATE 19200
  121. #endif
  122. //
  123. // Temperature Sensors
  124. //
  125. #define TEMP_0_PIN PA0 // Analog Input
  126. #define TEMP_BED_PIN PC3 // Analog Input
  127. //
  128. // Heaters / Fans
  129. //
  130. #define HEATER_0_PIN PC8 // EXTRUDER
  131. #define HEATER_BED_PIN PC9 // BED
  132. #define FAN_PIN PA8
  133. //
  134. // USB connect control
  135. //
  136. #define USB_CONNECT_PIN PC13
  137. #define USB_CONNECT_INVERTING false
  138. #define SD_DETECT_PIN PC4
  139. /**
  140. * _____
  141. * 5V | · · | GND
  142. * (LCD_EN) PB7 | · · | PB8 (LCD_RS)
  143. * (LCD_D4) PB9 | · · | PA10 (BTN_EN2)
  144. * RESET | · · | PA9 (BTN_EN1)
  145. * (BTN_ENC) PB6 | · · | PA15 (BEEPER)
  146. * -----
  147. * EXP1
  148. */
  149. #if HAS_SPI_LCD
  150. #define BEEPER_PIN PA15
  151. #define BTN_ENC PB6
  152. #if ENABLED(CR10_STOCKDISPLAY)
  153. #define LCD_PINS_RS PB8
  154. #define BTN_EN1 PA9
  155. #define BTN_EN2 PA10
  156. #define LCD_PINS_ENABLE PB7
  157. #define LCD_PINS_D4 PB9
  158. #elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
  159. /** Creality Ender-2 display pinout
  160. * _____
  161. * 5V | · · | GND
  162. * (MOSI) PB7 | · · | PB8 (LCD_RS)
  163. * (LCD_A0) PB9 | · · | PA10 (BTN_EN2)
  164. * RESET | · · | PA9 (BTN_EN1)
  165. * (BTN_ENC) PB6 | · · | PA15 (SCK)
  166. * -----
  167. * EXP1
  168. */
  169. #define BTN_EN1 PA9
  170. #define BTN_EN2 PA10
  171. #define DOGLCD_CS PB8
  172. #define DOGLCD_A0 PB9
  173. #define DOGLCD_SCK PA15
  174. #define DOGLCD_MOSI PB7
  175. #define FORCE_SOFT_SPI
  176. #define LCD_BACKLIGHT_PIN -1
  177. #else
  178. #error "Only CR10_STOCKDISPLAY and MKS_MINI_12864 are currently supported on the BIGTREE_SKR_E3_DIP."
  179. #endif
  180. #endif // HAS_SPI_LCD
  181. //
  182. // SD Support
  183. //
  184. #define HAS_ONBOARD_SD
  185. #ifndef SDCARD_CONNECTION
  186. #define SDCARD_CONNECTION ONBOARD
  187. #endif
  188. #define ON_BOARD_SPI_DEVICE 1 //SPI1
  189. #define ONBOARD_SD_CS_PIN PA4 // Chip select for "System" SD card