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 5.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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 <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 Mini 1.1"
  27. //#define DISABLE_DEBUG
  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 (0x800) // 2KB
  33. #define EEPROM_START_ADDRESS uint32(0x8000000 + (STM32_FLASH_SIZE) * 1024 - 2 * EEPROM_PAGE_SIZE)
  34. #define E2END (EEPROM_PAGE_SIZE - 1)
  35. //
  36. // Limit Switches
  37. //
  38. #define X_MIN_PIN PC2
  39. #define X_MAX_PIN PA2
  40. #define Y_MIN_PIN PC1
  41. #define Y_MAX_PIN PA1
  42. #define Z_MIN_PIN PC0
  43. #define Z_MAX_PIN PC3
  44. //
  45. // Steppers
  46. //
  47. #define X_STEP_PIN PC6
  48. #define X_DIR_PIN PC7
  49. #define X_ENABLE_PIN PB15
  50. #define Y_STEP_PIN PB13
  51. #define Y_DIR_PIN PB14
  52. #define Y_ENABLE_PIN PB12
  53. #define Z_STEP_PIN PB10
  54. #define Z_DIR_PIN PB11
  55. #define Z_ENABLE_PIN PB2
  56. #define E0_STEP_PIN PC5
  57. #define E0_DIR_PIN PB0
  58. #define E0_ENABLE_PIN PC4
  59. #if ENABLED(TMC_USE_SW_SPI)
  60. #ifndef TMC_SW_SCK
  61. #define TMC_SW_SCK PB3
  62. #endif
  63. #ifndef TMC_SW_MISO
  64. #define TMC_SW_MISO PB4
  65. #endif
  66. #ifndef TMC_SW_MOSI
  67. #define TMC_SW_MOSI PB5
  68. #endif
  69. #endif
  70. //
  71. // Heaters / Fans
  72. //
  73. #define HEATER_0_PIN PA8
  74. #define FAN_PIN PC8
  75. #define HEATER_BED_PIN PC9
  76. //
  77. // Temperature Sensors
  78. //
  79. #define TEMP_BED_PIN PB1 // Analog Input
  80. #define TEMP_0_PIN PA0 // Analog Input
  81. //
  82. // LCD Pins
  83. //
  84. /**
  85. * _____ _____
  86. * NC | · · | GND 5V | · · | GND
  87. * RESET | · · | PB9 (SD_DETECT) (LCD_D7) PC14 | · · | PC15 (LCD_D6)
  88. * (MOSI) PB5 | · · | PB8 (BTN_EN2) (LCD_D5) PB7 | · · | PC13 (LCD_D4)
  89. * (SD_SS) PA15 | · · | PD2 (BTN_EN1) (LCD_RS) PC12 | · · | PB6 (LCD_EN)
  90. * (SCK) PB3 | · · | PB4 (MISO) (BTN_ENC) PC11 | · · | PC10 (BEEPER)
  91. * ----- -----
  92. * EXP2 EXP1
  93. */
  94. #if HAS_SPI_LCD
  95. #define BEEPER_PIN PC10
  96. #define BTN_ENC PC11
  97. #if ENABLED(CR10_STOCKDISPLAY)
  98. #define LCD_PINS_RS PC15
  99. #define BTN_EN1 PB6
  100. #define BTN_EN2 PC13
  101. #define LCD_PINS_ENABLE PC14
  102. #define LCD_PINS_D4 PB7
  103. #else
  104. #define LCD_PINS_RS PC12
  105. #define BTN_EN1 PD2
  106. #define BTN_EN2 PB8
  107. #define LCD_PINS_ENABLE PB6
  108. #if ENABLED(FYSETC_MINI_12864)
  109. #define LCD_BACKLIGHT_PIN -1
  110. #define LCD_RESET_PIN PC13
  111. #define DOGLCD_A0 PC12
  112. #define DOGLCD_CS PB6
  113. #define DOGLCD_SCK PB3
  114. #define DOGLCD_MOSI PB5
  115. #define FORCE_SOFT_SPI // SPI MODE3
  116. #define LED_PIN PB7 // red pwm
  117. //#define LED_PIN PC15 // green
  118. //#define LED_PIN PC14 // blue
  119. //#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
  120. // #ifndef RGB_LED_R_PIN
  121. // #define RGB_LED_R_PIN PB7
  122. // #endif
  123. // #ifndef RGB_LED_G_PIN
  124. // #define RGB_LED_G_PIN PC15
  125. // #endif
  126. // #ifndef RGB_LED_B_PIN
  127. // #define RGB_LED_B_PIN PC14
  128. // #endif
  129. //#elif ENABLED(FYSETC_MINI_12864_2_1)
  130. // #define NEOPIXEL_PIN PB7
  131. //#endif
  132. #else // !FYSETC_MINI_12864
  133. #define LCD_PINS_D4 PC13
  134. #if ENABLED(ULTIPANEL)
  135. #define LCD_PINS_D5 PB7
  136. #define LCD_PINS_D6 PC15
  137. #define LCD_PINS_D7 PC14
  138. #endif
  139. #endif // !FYSETC_MINI_12864
  140. #endif
  141. #endif // HAS_SPI_LCD
  142. //
  143. // SD Card
  144. //
  145. // By default the onboard SD is enabled.
  146. // set SDCARD_CONNECTION form 'ONBOARD' to 'LCD' and use an external SD (connected to LCD)
  147. #define HAS_ONBOARD_SD
  148. #ifndef SDCARD_CONNECTION
  149. #define SDCARD_CONNECTION ONBOARD
  150. #endif
  151. #if SD_CONNECTION_IS(LCD)
  152. #define ENABLE_SPI3
  153. #define SD_DETECT_PIN PB9
  154. #define SCK_PIN PB3
  155. #define MISO_PIN PB4
  156. #define MOSI_PIN PB5
  157. #define SS_PIN PA15
  158. #elif SD_CONNECTION_IS(ONBOARD)
  159. #define ENABLE_SPI1
  160. #define SD_DETECT_PIN PA3
  161. #define SCK_PIN PA5
  162. #define MISO_PIN PA6
  163. #define MOSI_PIN PA7
  164. #define SS_PIN PA4
  165. #endif
  166. #define ON_BOARD_SPI_DEVICE 1 //SPI1
  167. #define ONBOARD_SD_CS_PIN PA4 // Chip select for "System" SD card
  168. #if HAS_GRAPHICAL_LCD
  169. #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
  170. #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
  171. #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
  172. #endif