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_MINI_V1_1.h 7.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  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(TARGET_STM32F1)
  24. #error "Oops! Select an STM32F1 board in 'Tools > Board.'"
  25. #endif
  26. #define BOARD_INFO_NAME "BTT SKR Mini V1.1"
  27. //#define DISABLE_DEBUG
  28. #define DISABLE_JTAG
  29. // Ignore temp readings during development.
  30. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
  31. #if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION)
  32. #define FLASH_EEPROM_EMULATION
  33. #define EEPROM_PAGE_SIZE (0x800U) // 2KB
  34. #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL)
  35. #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE // 2KB
  36. #endif
  37. //
  38. // Limit Switches
  39. //
  40. #define X_MIN_PIN PC2
  41. #define X_MAX_PIN PA2
  42. #define Y_MIN_PIN PC1
  43. #define Y_MAX_PIN PA1
  44. #define Z_MIN_PIN PC0
  45. #define Z_MAX_PIN PC3
  46. //
  47. // Steppers
  48. //
  49. #define X_STEP_PIN PC6
  50. #define X_DIR_PIN PC7
  51. #define X_ENABLE_PIN PB15
  52. #define Y_STEP_PIN PB13
  53. #define Y_DIR_PIN PB14
  54. #define Y_ENABLE_PIN PB12
  55. #define Z_STEP_PIN PB10
  56. #define Z_DIR_PIN PB11
  57. #define Z_ENABLE_PIN PB2
  58. #define E0_STEP_PIN PC5
  59. #define E0_DIR_PIN PB0
  60. #define E0_ENABLE_PIN PC4
  61. #if ENABLED(TMC_USE_SW_SPI)
  62. #ifndef TMC_SW_SCK
  63. #define TMC_SW_SCK PB3
  64. #endif
  65. #ifndef TMC_SW_MISO
  66. #define TMC_SW_MISO PB4
  67. #endif
  68. #ifndef TMC_SW_MOSI
  69. #define TMC_SW_MOSI PB5
  70. #endif
  71. #endif
  72. //
  73. // Heaters / Fans
  74. //
  75. #define HEATER_0_PIN PA8
  76. #define FAN_PIN PC8
  77. #define HEATER_BED_PIN PC9
  78. //
  79. // Temperature Sensors
  80. //
  81. #define TEMP_BED_PIN PB1 // Analog Input
  82. #define TEMP_0_PIN PA0 // Analog Input
  83. //
  84. // LCD Pins
  85. //
  86. /**
  87. * _____ _____
  88. * NC | · · | GND 5V | · · | GND
  89. * RESET | · · | PB9 (SD_DETECT) (LCD_D7) PC14 | · · | PC15 (LCD_D6)
  90. * (MOSI) PB5 | · · | PB8 (BTN_EN2) (LCD_D5) PB7 | · · | PC13 (LCD_D4)
  91. * (SD_SS) PA15 | · · | PD2 (BTN_EN1) (LCD_RS) PC12 | · · | PB6 (LCD_EN)
  92. * (SCK) PB3 | · · | PB4 (MISO) (BTN_ENC) PC11 | · · | PC10 (BEEPER)
  93. * ----- -----
  94. * EXP2 EXP1
  95. */
  96. #if HAS_WIRED_LCD
  97. #define BEEPER_PIN PC10
  98. #define BTN_ENC PC11
  99. #if ENABLED(CR10_STOCKDISPLAY)
  100. #define LCD_PINS_RS PC15
  101. #define BTN_EN1 PB6
  102. #define BTN_EN2 PC13
  103. #define LCD_PINS_ENABLE PC14
  104. #define LCD_PINS_D4 PB7
  105. #elif IS_TFTGLCD_PANEL
  106. #undef BEEPER_PIN
  107. #undef BTN_ENC
  108. #if ENABLED(TFTGLCD_PANEL_SPI)
  109. #define TFTGLCD_CS PD2
  110. #endif
  111. #define SD_DETECT_PIN PB9
  112. #else
  113. #define LCD_PINS_RS PC12
  114. #define BTN_EN1 PD2
  115. #define BTN_EN2 PB8
  116. #define LCD_PINS_ENABLE PB6
  117. #if ENABLED(FYSETC_MINI_12864)
  118. #define LCD_BACKLIGHT_PIN -1
  119. #define LCD_RESET_PIN PC13
  120. #define DOGLCD_A0 PC12
  121. #define DOGLCD_CS PB6
  122. #define DOGLCD_SCK PB3
  123. #define DOGLCD_MOSI PB5
  124. #define FORCE_SOFT_SPI // SPI MODE3
  125. #define LED_PIN PB7 // red pwm
  126. //#define LED_PIN PC15 // green
  127. //#define LED_PIN PC14 // blue
  128. //#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
  129. // #ifndef RGB_LED_R_PIN
  130. // #define RGB_LED_R_PIN PB7
  131. // #endif
  132. // #ifndef RGB_LED_G_PIN
  133. // #define RGB_LED_G_PIN PC15
  134. // #endif
  135. // #ifndef RGB_LED_B_PIN
  136. // #define RGB_LED_B_PIN PC14
  137. // #endif
  138. //#elif ENABLED(FYSETC_MINI_12864_2_1)
  139. // #define NEOPIXEL_PIN PB7
  140. //#endif
  141. #else // !FYSETC_MINI_12864
  142. #define LCD_PINS_D4 PC13
  143. #if IS_ULTIPANEL
  144. #define LCD_PINS_D5 PB7
  145. #define LCD_PINS_D6 PC15
  146. #define LCD_PINS_D7 PC14
  147. #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
  148. #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
  149. #endif
  150. #endif
  151. #endif // !FYSETC_MINI_12864
  152. #if HAS_MARLINUI_U8GLIB
  153. #ifndef BOARD_ST7920_DELAY_1
  154. #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
  155. #endif
  156. #ifndef BOARD_ST7920_DELAY_2
  157. #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
  158. #endif
  159. #ifndef BOARD_ST7920_DELAY_3
  160. #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
  161. #endif
  162. #endif
  163. #endif
  164. #endif // HAS_WIRED_LCD
  165. //
  166. // SD Card
  167. //
  168. // By default the onboard SD is enabled.
  169. // Change SDCARD_CONNECTION from 'ONBOARD' to 'LCD' for an external (LCD module) SD
  170. #ifndef SDCARD_CONNECTION
  171. #define SDCARD_CONNECTION ONBOARD
  172. #endif
  173. #if SD_CONNECTION_IS(LCD)
  174. #define SPI_DEVICE 3
  175. #define SD_DETECT_PIN PB9
  176. #define SCK_PIN PB3
  177. #define MISO_PIN PB4
  178. #define MOSI_PIN PB5
  179. #define SS_PIN PA15
  180. #elif SD_CONNECTION_IS(ONBOARD)
  181. #define SD_DETECT_PIN PA3
  182. #define SCK_PIN PA5
  183. #define MISO_PIN PA6
  184. #define MOSI_PIN PA7
  185. #define SS_PIN PA4
  186. #endif
  187. #define ONBOARD_SPI_DEVICE 1 // SPI1
  188. #define ONBOARD_SD_CS_PIN PA4 // Chip select for "System" SD card