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_SE_BX_common.h 7.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  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(STM32H7)
  24. #error "Oops! Select an STM32H7 board in 'Tools > Board.'"
  25. #endif
  26. #define DEFAULT_MACHINE_NAME "Biqu BX"
  27. // Onboard I2C EEPROM
  28. #define I2C_EEPROM
  29. #define MARLIN_EEPROM_SIZE 0x1000 // 4K (24C32)
  30. #define HAS_OTG_USB_HOST_SUPPORT // USB Flash Drive support
  31. //#define SWD_DEBUG // Use pins PA13 and PA14 on STM32H7 for the SWD debugger
  32. //
  33. // Limit Switches
  34. //
  35. #define X_MIN_PIN PB11
  36. #define X_MAX_PIN PD13
  37. #define Y_MIN_PIN PB12
  38. #define Y_MAX_PIN PB13
  39. #define Z_MIN_PIN PD12
  40. #define Z_MAX_PIN PD11
  41. #define FIL_RUNOUT_PIN PD13
  42. #define FIL_RUNOUT2_PIN PB13
  43. #ifndef SWD_DEBUG
  44. #define LED_PIN PA13
  45. #define BEEPER_PIN PA14
  46. #endif
  47. #define POWER_MONITOR_PIN PB0
  48. #define RPI_POWER_PIN PE5
  49. #define SERVO0_PIN PA2
  50. //
  51. // Z Probe (when not Z_MIN_PIN)
  52. //
  53. #ifndef Z_MIN_PROBE_PIN
  54. #define Z_MIN_PROBE_PIN PH2 // Probe
  55. #endif
  56. //
  57. // Steppers
  58. //
  59. #define X_STEP_PIN PG13
  60. #define X_DIR_PIN PG12
  61. #define X_ENABLE_PIN PG14
  62. #define X_CS_PIN PG10
  63. #define Y_STEP_PIN PB3
  64. #define Y_DIR_PIN PD3
  65. #define Y_ENABLE_PIN PB4
  66. #define Y_CS_PIN PD4
  67. #define Z_STEP_PIN PD7
  68. #define Z_DIR_PIN PD6
  69. #define Z_ENABLE_PIN PG9
  70. #define Z_CS_PIN PD5
  71. #define E0_STEP_PIN PC14
  72. #define E0_DIR_PIN PC13
  73. #define E0_ENABLE_PIN PC15
  74. #define E0_CS_PIN PI8
  75. #define E1_STEP_PIN PA8
  76. #define E1_DIR_PIN PC9
  77. #define E1_ENABLE_PIN PD2
  78. #define E1_CS_PIN PC8
  79. //
  80. // Software SPI pins for TMC2130 stepper drivers
  81. //
  82. #if ENABLED(TMC_USE_SW_SPI)
  83. #ifndef TMC_SW_MOSI
  84. #define TMC_SW_MOSI PC6
  85. #endif
  86. #ifndef TMC_SW_MISO
  87. #define TMC_SW_MISO PG3
  88. #endif
  89. #ifndef TMC_SW_SCK
  90. #define TMC_SW_SCK PC7
  91. #endif
  92. #endif
  93. #if HAS_TMC_UART
  94. /**
  95. * TMC2208/TMC2209 stepper drivers
  96. *
  97. * Hardware serial communication ports.
  98. * If undefined software serial is used according to the pins below
  99. */
  100. //#define X_HARDWARE_SERIAL Serial
  101. //#define X2_HARDWARE_SERIAL Serial1
  102. //#define Y_HARDWARE_SERIAL Serial1
  103. //#define Y2_HARDWARE_SERIAL Serial1
  104. //#define Z_HARDWARE_SERIAL Serial1
  105. //#define Z2_HARDWARE_SERIAL Serial1
  106. //#define E0_HARDWARE_SERIAL Serial1
  107. //#define E1_HARDWARE_SERIAL Serial1
  108. //#define E2_HARDWARE_SERIAL Serial1
  109. //#define E3_HARDWARE_SERIAL Serial1
  110. //#define E4_HARDWARE_SERIAL Serial1
  111. //#define E5_HARDWARE_SERIAL Serial1
  112. //#define E6_HARDWARE_SERIAL Serial1
  113. //#define E7_HARDWARE_SERIAL Serial1
  114. #define X_SERIAL_TX_PIN PG10
  115. #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN
  116. #define Y_SERIAL_TX_PIN PD4
  117. #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN
  118. #define Z_SERIAL_TX_PIN PD5
  119. #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN
  120. #define E0_SERIAL_TX_PIN PI8
  121. #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
  122. #define E1_SERIAL_TX_PIN PC8
  123. #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
  124. // Reduce baud rate to improve software serial reliability
  125. #define TMC_BAUD_RATE 19200
  126. #endif
  127. //
  128. // Temperature Sensors
  129. //
  130. #define TEMP_0_PIN PH4 // TH0
  131. #define TEMP_1_PIN PA3 // TH1
  132. #define TEMP_BED_PIN PH5 // TB
  133. //
  134. // Heaters / Fans
  135. //
  136. #define HEATER_0_PIN PC4
  137. #define HEATER_1_PIN PC5
  138. #define HEATER_BED_PIN PA4
  139. #define FAN_PIN PA5 // "FAN0"
  140. #define FAN1_PIN PA6 // "FAN1"
  141. #define FAN2_PIN PA7 // "FAN2"
  142. #define NEOPIXEL_PIN PH3
  143. #define NEOPIXEL2_PIN PB1
  144. #if HAS_LTDC_TFT
  145. // LTDC_LCD Timing
  146. #define LTDC_LCD_CLK 50 // LTDC clock frequency = 50Mhz
  147. #define LTDC_LCD_HSYNC 30 // Horizontal synchronization
  148. #define LTDC_LCD_HBP 114 // Horizontal back porch
  149. #define LTDC_LCD_HFP 16 // Horizontal front porch
  150. #define LTDC_LCD_VSYNC 3 // Vertical synchronization
  151. #define LTDC_LCD_VBP 32 // Vertical back porch
  152. #define LTDC_LCD_VFP 10 // Vertical front porch
  153. #define TFT_BACKLIGHT_PIN PB5
  154. #define LCD_DE_PIN PF10
  155. #define LCD_CLK_PIN PG7
  156. #define LCD_VSYNC_PIN PI9
  157. #define LCD_HSYNC_PIN PI10
  158. #define LCD_R7_PIN PG6 // R5
  159. #define LCD_R6_PIN PH12
  160. #define LCD_R5_PIN PH11
  161. #define LCD_R4_PIN PH10
  162. #define LCD_R3_PIN PH9
  163. #define LCD_G7_PIN PI2 // G6
  164. #define LCD_G6_PIN PI1
  165. #define LCD_G5_PIN PI0
  166. #define LCD_G4_PIN PH15
  167. #define LCD_G3_PIN PH14
  168. #define LCD_G2_PIN PH13
  169. #define LCD_B7_PIN PI7 // B5
  170. #define LCD_B6_PIN PI6
  171. #define LCD_B5_PIN PI5
  172. #define LCD_B4_PIN PI4
  173. #define LCD_B3_PIN PG11
  174. // GT911 Capacitive Touch Sensor
  175. #if ENABLED(TFT_TOUCH_DEVICE_GT911)
  176. #define GT911_RST_PIN PE4
  177. #define GT911_INT_PIN PE3
  178. #define GT911_SW_I2C_SCL_PIN PE2
  179. #define GT911_SW_I2C_SDA_PIN PE6
  180. #endif
  181. #endif
  182. #if IS_NEWPANEL
  183. #define BTN_EN1 PH6
  184. #define BTN_EN2 PH7
  185. #define BTN_ENC PH8
  186. #endif
  187. //
  188. // SD card
  189. //
  190. #ifndef SDCARD_CONNECTION
  191. #define SDCARD_CONNECTION ONBOARD
  192. #endif
  193. #define SOFTWARE_SPI
  194. #define SDSS PA15
  195. #define SD_SS_PIN SDSS
  196. #define SD_SCK_PIN PC10
  197. #define SD_MISO_PIN PC11
  198. #define SD_MOSI_PIN PC12
  199. #define SD_DETECT_PIN PI3