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_FYSETC_S6.h 8.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  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(STM32F4)
  24. #error "Oops! Select an STM32F4 board in 'Tools > Board.'"
  25. #elif HOTENDS > 3 || E_STEPPERS > 3
  26. #error "RUMBA32 supports up to 3 hotends / E-steppers."
  27. #endif
  28. #ifndef BOARD_INFO_NAME
  29. #define BOARD_INFO_NAME "FYSETC S6"
  30. #endif
  31. #ifndef DEFAULT_MACHINE_NAME
  32. #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
  33. #endif
  34. // Avoid conflict with TIMER_TONE defined in variant
  35. #define STEP_TIMER 10
  36. //
  37. // EEPROM Emulation
  38. //
  39. #if NO_EEPROM_SELECTED
  40. #define FLASH_EEPROM_EMULATION
  41. //#define SRAM_EEPROM_EMULATION
  42. //#define I2C_EEPROM
  43. #endif
  44. #if ENABLED(FLASH_EEPROM_EMULATION)
  45. // Decrease delays and flash wear by spreading writes across the
  46. // 128 kB sector allocated for EEPROM emulation.
  47. #define FLASH_EEPROM_LEVELING
  48. #elif ENABLED(I2C_EEPROM)
  49. #define MARLIN_EEPROM_SIZE 0x1000 // 4KB
  50. #endif
  51. //
  52. // Servos
  53. //
  54. #define SERVO0_PIN PA3
  55. //
  56. // Limit Switches
  57. //
  58. #define X_MIN_PIN PB14
  59. #define X_MAX_PIN PA1
  60. #define Y_MIN_PIN PB13
  61. #define Y_MAX_PIN PA2
  62. #define Z_MIN_PIN PA0
  63. #define Z_MAX_PIN PA3
  64. //
  65. // Filament Sensor
  66. // share with X_MAX_PIN
  67. //
  68. #ifndef FIL_RUNOUT_PIN
  69. #define FIL_RUNOUT_PIN PA1
  70. #endif
  71. //
  72. // Steppers
  73. //
  74. #define X_STEP_PIN PE11
  75. #define X_DIR_PIN PE10
  76. #ifndef X_ENABLE_PIN
  77. #define X_ENABLE_PIN PE12
  78. #endif
  79. #define X_CS_PIN PE7
  80. #define Y_STEP_PIN PD8
  81. #define Y_DIR_PIN PB12
  82. #define Y_ENABLE_PIN PD9
  83. #define Y_CS_PIN PE15
  84. #define Z_STEP_PIN PD14
  85. #define Z_DIR_PIN PD13
  86. #define Z_ENABLE_PIN PD15
  87. #define Z_CS_PIN PD10
  88. #define E0_STEP_PIN PD5
  89. #define E0_DIR_PIN PD6
  90. #define E0_ENABLE_PIN PD4
  91. #define E0_CS_PIN PD7
  92. #define E1_STEP_PIN PE6
  93. #define E1_DIR_PIN PC13
  94. #define E1_ENABLE_PIN PE5
  95. #define E1_CS_PIN PC14
  96. #define E2_STEP_PIN PE2
  97. #define E2_DIR_PIN PE4
  98. #define E2_ENABLE_PIN PE3
  99. #define E2_CS_PIN PC15
  100. #if HAS_TMC_UART
  101. //
  102. // TMC2208/TMC2209 stepper drivers
  103. //
  104. //
  105. // Software serial
  106. //
  107. #ifndef X_SERIAL_TX_PIN
  108. #define X_SERIAL_TX_PIN PE9
  109. #endif
  110. #ifndef X_SERIAL_RX_PIN
  111. #define X_SERIAL_RX_PIN PE8
  112. #endif
  113. #ifndef Y_SERIAL_TX_PIN
  114. #define Y_SERIAL_TX_PIN PE14
  115. #endif
  116. #ifndef Y_SERIAL_RX_PIN
  117. #define Y_SERIAL_RX_PIN PE13
  118. #endif
  119. #ifndef Z_SERIAL_TX_PIN
  120. #define Z_SERIAL_TX_PIN PD11
  121. #endif
  122. #ifndef Z_SERIAL_RX_PIN
  123. #define Z_SERIAL_RX_PIN PD12
  124. #endif
  125. #ifndef E0_SERIAL_TX_PIN
  126. #define E0_SERIAL_TX_PIN PD3
  127. #endif
  128. #ifndef E0_SERIAL_RX_PIN
  129. #define E0_SERIAL_RX_PIN PA15
  130. #endif
  131. #ifndef E1_SERIAL_TX_PIN
  132. #define E1_SERIAL_TX_PIN PC4
  133. #endif
  134. #ifndef E1_SERIAL_RX_PIN
  135. #define E1_SERIAL_RX_PIN PC5
  136. #endif
  137. #ifndef E2_SERIAL_TX_PIN
  138. #define E2_SERIAL_TX_PIN PE1
  139. #endif
  140. #ifndef E2_SERIAL_RX_PIN
  141. #define E2_SERIAL_RX_PIN PE0
  142. #endif
  143. #endif
  144. //
  145. // Temperature Sensors
  146. //
  147. #define TEMP_0_PIN PC0
  148. #define TEMP_1_PIN PC1
  149. #define TEMP_2_PIN PC2
  150. #define TEMP_BED_PIN PC3
  151. //
  152. // Heaters / Fans
  153. //
  154. #define HEATER_0_PIN PB3
  155. #define HEATER_1_PIN PB4
  156. #define HEATER_2_PIN PB15
  157. #define HEATER_BED_PIN PC8
  158. #define FAN_PIN PB0
  159. #define FAN1_PIN PB1
  160. #define FAN2_PIN PB2
  161. //
  162. // SPI
  163. //
  164. #define SCK_PIN PA5
  165. #define MISO_PIN PA6
  166. #define MOSI_PIN PA7
  167. //
  168. // Misc. Functions
  169. //
  170. //#define LED_PIN PB14
  171. //#define BTN_PIN PC10
  172. //#define PS_ON_PIN PE11
  173. //#define KILL_PIN PC5
  174. #define SDSS PA4
  175. #define SD_DETECT_PIN PB10
  176. //
  177. // LCD / Controller
  178. //
  179. #if HAS_WIRED_LCD
  180. #define BEEPER_PIN PC9
  181. #define BTN_ENC PA8
  182. #if ENABLED(CR10_STOCKDISPLAY)
  183. #define LCD_PINS_RS PD0
  184. #define BTN_EN1 PC11
  185. #define BTN_EN2 PC10
  186. #define LCD_PINS_ENABLE PD1
  187. #define LCD_PINS_D4 PC12
  188. // CR10_STOCKDISPLAY default timing is too fast
  189. #undef BOARD_ST7920_DELAY_1
  190. #undef BOARD_ST7920_DELAY_2
  191. #undef BOARD_ST7920_DELAY_3
  192. #else
  193. #define LCD_PINS_RS PD2
  194. #define BTN_EN1 PC6
  195. #define BTN_EN2 PC7
  196. #define LCD_SDSS PA4
  197. #define LCD_PINS_ENABLE PC11
  198. #define LCD_PINS_D4 PC10
  199. #if ENABLED(FYSETC_MINI_12864)
  200. // See https://wiki.fysetc.com/Mini12864_Panel
  201. #define DOGLCD_CS PC11
  202. #define DOGLCD_A0 PD2
  203. #if ENABLED(FYSETC_GENERIC_12864_1_1)
  204. #define LCD_BACKLIGHT_PIN PD0
  205. #endif
  206. #define LCD_RESET_PIN PC10 // Must be high or open for LCD to operate normally.
  207. #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
  208. #ifndef RGB_LED_R_PIN
  209. #define RGB_LED_R_PIN PC12
  210. #endif
  211. #ifndef RGB_LED_G_PIN
  212. #define RGB_LED_G_PIN PD0
  213. #endif
  214. #ifndef RGB_LED_B_PIN
  215. #define RGB_LED_B_PIN PD1
  216. #endif
  217. #elif ENABLED(FYSETC_MINI_12864_2_1)
  218. #define NEOPIXEL_PIN PC12
  219. #endif
  220. #endif // !FYSETC_MINI_12864
  221. #if IS_ULTIPANEL
  222. #define LCD_PINS_D5 PC12
  223. #define LCD_PINS_D6 PD0
  224. #define LCD_PINS_D7 PD1
  225. #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
  226. #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
  227. #endif
  228. #endif
  229. #endif
  230. // Alter timing for graphical display
  231. #if HAS_MARLINUI_U8GLIB
  232. #ifndef BOARD_ST7920_DELAY_1
  233. #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
  234. #endif
  235. #ifndef BOARD_ST7920_DELAY_2
  236. #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
  237. #endif
  238. #ifndef BOARD_ST7920_DELAY_3
  239. #define BOARD_ST7920_DELAY_3 DELAY_NS(600)
  240. #endif
  241. #endif
  242. #endif // HAS_WIRED_LCD
  243. #ifndef RGB_LED_R_PIN
  244. #define RGB_LED_R_PIN PB6
  245. #endif
  246. #ifndef RGB_LED_G_PIN
  247. #define RGB_LED_G_PIN PB5
  248. #endif
  249. #ifndef RGB_LED_B_PIN
  250. #define RGB_LED_B_PIN PB7
  251. #endif
  252. #ifndef RGB_LED_W_PIN
  253. #define RGB_LED_W_PIN -1
  254. #endif