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_FLYF407ZG.h 8.5KB

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. #if !defined(STM32F4) && !defined(STM32F4xx)
  24. #error "Oops! Select an STM32F4 board in 'Tools > Board.'"
  25. #elif HOTENDS > 6 || E_STEPPERS > 6
  26. #error "FLYF407ZG supports up to 6 hotends / E-steppers."
  27. #endif
  28. #define BOARD_INFO_NAME "FLYF407ZG"
  29. #define BOARD_WEBSITE_URL "github.com/FLYmaker/FLYF407ZG"
  30. #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
  31. //
  32. // EEPROM Emulation
  33. //
  34. #if NO_EEPROM_SELECTED
  35. #define FLASH_EEPROM_EMULATION
  36. //#define SRAM_EEPROM_EMULATION
  37. //#define I2C_EEPROM
  38. #endif
  39. #if ENABLED(FLASH_EEPROM_EMULATION)
  40. // Decrease delays and flash wear by spreading writes across
  41. // the 128kB sector allocated for EEPROM emulation.
  42. #define FLASH_EEPROM_LEVELING
  43. #elif ENABLED(I2C_EEPROM)
  44. #define MARLIN_EEPROM_SIZE 0x2000 // 8KB
  45. #endif
  46. #ifndef MARLIN_EEPROM_SIZE
  47. #define MARLIN_EEPROM_SIZE 0x1000 // 4KB
  48. #endif
  49. //
  50. // Servos
  51. //
  52. #define SERVO0_PIN PE11
  53. //
  54. // Limit Switches
  55. //
  56. #define X_MIN_PIN PC3
  57. #define X_MAX_PIN PC2
  58. #define Y_MIN_PIN PF2
  59. #define Y_MAX_PIN PF1
  60. #define Z_MIN_PIN PF0
  61. #define Z_MAX_PIN PC15
  62. //
  63. // Z Probe (when not Z_MIN_PIN)
  64. //
  65. #define Z_MIN_PROBE_PIN PC14 // Z3_PIN
  66. //
  67. // Steppers
  68. //
  69. #define X_STEP_PIN PB9
  70. #define X_DIR_PIN PE0
  71. #define X_ENABLE_PIN PE1
  72. #ifndef X_CS_PIN
  73. #define X_CS_PIN PG13
  74. #endif
  75. #define Y_STEP_PIN PB8
  76. #define Y_DIR_PIN PG11
  77. #define Y_ENABLE_PIN PG12
  78. #ifndef Y_CS_PIN
  79. #define Y_CS_PIN PG10
  80. #endif
  81. #define Z_STEP_PIN PA8
  82. #define Z_DIR_PIN PD6
  83. #define Z_ENABLE_PIN PD7
  84. #ifndef Z_CS_PIN
  85. #define Z_CS_PIN PD5
  86. #endif
  87. #define E0_STEP_PIN PC7
  88. #define E0_DIR_PIN PD3
  89. #define E0_ENABLE_PIN PD4
  90. #ifndef E0_CS_PIN
  91. #define E0_CS_PIN PD1
  92. #endif
  93. #define E1_STEP_PIN PC6
  94. #define E1_DIR_PIN PA15
  95. #define E1_ENABLE_PIN PD0
  96. #ifndef E1_CS_PIN
  97. #define E1_CS_PIN PA14
  98. #endif
  99. #define E2_STEP_PIN PD15
  100. #define E2_DIR_PIN PG7
  101. #define E2_ENABLE_PIN PG8
  102. #ifndef E2_CS_PIN
  103. #define E2_CS_PIN PG6
  104. #endif
  105. #define E3_STEP_PIN PD14
  106. #define E3_DIR_PIN PG4
  107. #define E3_ENABLE_PIN PG5
  108. #ifndef E3_CS_PIN
  109. #define E3_CS_PIN PG3
  110. #endif
  111. #define E4_STEP_PIN PD13
  112. #define E4_DIR_PIN PD11
  113. #define E4_ENABLE_PIN PG2
  114. #ifndef E4_CS_PIN
  115. #define E4_CS_PIN PD10
  116. #endif
  117. #define E5_STEP_PIN PD12
  118. #define E5_DIR_PIN PD8
  119. #define E5_ENABLE_PIN PD9
  120. #ifndef E5_CS_PIN
  121. #define E5_CS_PIN PB12
  122. #endif
  123. //
  124. // Temperature Sensors
  125. //
  126. #define TEMP_0_PIN PA0 // Analog Input
  127. #define TEMP_1_PIN PC1 // Analog Input
  128. #define TEMP_2_PIN PC0 // Analog Input
  129. #define TEMP_3_PIN PF10 // Analog Input
  130. #define TEMP_4_PIN PF5 // Analog Input
  131. #define TEMP_5_PIN PF4 // Analog Input
  132. #define TEMP_BED_PIN PF3 // Analog Input
  133. //
  134. // Heaters / Fans
  135. //
  136. #define HEATER_0_PIN PF7
  137. #define HEATER_1_PIN PF6
  138. #define HEATER_2_PIN PE6
  139. #define HEATER_3_PIN PE5
  140. #define HEATER_4_PIN PE4
  141. #define HEATER_5_PIN PE3
  142. #define HEATER_BED_PIN PE2
  143. #ifndef FAN_PIN
  144. #define FAN_PIN PF8
  145. #endif
  146. #define FAN1_PIN PF9
  147. #define FAN2_PIN PA2
  148. #define FAN3_PIN PA1
  149. #define FAN4_PIN PE13
  150. #define FAN5_PIN PB11
  151. //
  152. // Onboard SD support
  153. //
  154. #define SDIO_D0_PIN PC8
  155. #define SDIO_D1_PIN PC9
  156. //#define SD_CARD_DETECT_PIN PC13
  157. #define SDIO_D2_PIN PC10
  158. #define SDIO_D3_PIN PC11
  159. #define SDIO_CK_PIN PC12
  160. #define SDIO_CMD_PIN PD2
  161. #ifndef SDCARD_CONNECTION
  162. #define SDCARD_CONNECTION ONBOARD
  163. #endif
  164. #if SD_CONNECTION_IS(ONBOARD)
  165. #define SDIO_SUPPORT // Use SDIO for onboard SD
  166. #ifndef SDIO_SUPPORT
  167. #define SOFTWARE_SPI // Use soft SPI for onboard SD
  168. #define SDSS SDIO_D3_PIN
  169. #define SCK_PIN SDIO_CK_PIN
  170. #define MISO_PIN SDIO_D0_PIN
  171. #define MOSI_PIN SDIO_CMD_PIN
  172. #endif
  173. #elif SD_CONNECTION_IS(LCD)
  174. #define SCK_PIN PB13
  175. #define MISO_PIN PB14
  176. #define MOSI_PIN PB15
  177. #define SDSS PF11
  178. #define SD_DETECT_PIN PB2
  179. #endif
  180. //
  181. // Trinamic Software SPI
  182. //
  183. #if ENABLED(TMC_USE_SW_SPI)
  184. #ifndef TMC_SW_MOSI
  185. #define TMC_SW_MOSI PB15
  186. #endif
  187. #ifndef TMC_SW_MISO
  188. #define TMC_SW_MISO PB14
  189. #endif
  190. #ifndef TMC_SW_SCK
  191. #define TMC_SW_SCK PB13
  192. #endif
  193. #endif
  194. //
  195. // Trinamic Software Serial
  196. //
  197. #if HAS_TMC_UART
  198. #define X_SERIAL_TX_PIN PG13
  199. #define X_SERIAL_RX_PIN PG13
  200. #define Y_SERIAL_TX_PIN PG10
  201. #define Y_SERIAL_RX_PIN PG10
  202. #define Z_SERIAL_TX_PIN PD5
  203. #define Z_SERIAL_RX_PIN PD5
  204. #define E0_SERIAL_TX_PIN PD1
  205. #define E0_SERIAL_RX_PIN PD1
  206. #define E1_SERIAL_TX_PIN PA14
  207. #define E1_SERIAL_RX_PIN PA14
  208. #define E2_SERIAL_TX_PIN PG6
  209. #define E2_SERIAL_RX_PIN PG6
  210. #define E3_SERIAL_TX_PIN PG3
  211. #define E3_SERIAL_RX_PIN PG3
  212. #define E4_SERIAL_TX_PIN PD10
  213. #define E4_SERIAL_RX_PIN PD10
  214. #define E5_SERIAL_TX_PIN PB12
  215. #define E5_SERIAL_RX_PIN PB12
  216. #endif
  217. //
  218. // LCD / Controller
  219. //
  220. #define BEEPER_PIN PB10
  221. #define LCD_PINS_RS PE12
  222. #define LCD_PINS_ENABLE PE14
  223. #define LCD_PINS_D4 PE10
  224. #define LCD_PINS_D5 PE9
  225. #define LCD_PINS_D6 PE8
  226. #define LCD_PINS_D7 PE7
  227. #define BTN_EN1 PC4
  228. #define BTN_EN2 PC5
  229. #define BTN_ENC PE15
  230. //
  231. // Filament runout
  232. //
  233. #define FIL_RUNOUT_PIN PA3
  234. //
  235. // ST7920 Delays
  236. //
  237. #ifndef BOARD_ST7920_DELAY_1
  238. #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
  239. #endif
  240. #ifndef BOARD_ST7920_DELAY_2
  241. #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
  242. #endif
  243. #ifndef BOARD_ST7920_DELAY_3
  244. #define BOARD_ST7920_DELAY_3 DELAY_NS(715)
  245. #endif