My Marlin configs for Fabrikator Mini and CTC i3 Pro B
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

pins_BTT_SKR_MINI_V1_1.h 7.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  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. #include "env_validate.h"
  24. #define BOARD_INFO_NAME "BTT SKR Mini V1.1"
  25. //#define DISABLE_DEBUG
  26. #define DISABLE_JTAG
  27. // Ignore temp readings during development.
  28. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
  29. #if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION)
  30. #define FLASH_EEPROM_EMULATION
  31. #define EEPROM_PAGE_SIZE (0x800U) // 2KB
  32. #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL)
  33. #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE // 2KB
  34. #endif
  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) // Shared with EXP2
  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. * (BEEPER) PC10 |10 9 | PC11 (BTN_ENC) (MISO) PB4 |10 9 | PB3 (SCK)
  83. * (LCD_EN) PB6 | 8 7 | PC12 (LCD_RS) (BTN_EN1) PD2 | 8 7 | PA15 (SD_SS)
  84. * (LCD_D4) PC13 6 5 | PB7 (LCD_D5) (BTN_EN2) PB8 6 5 | PB5 (MOSI)
  85. * (LCD_D6) PC15 | 4 3 | PC14 (LCD_D7) (SD_DETECT) PB9 | 4 3 | RESET
  86. * GND | 2 1 | 5V GND | 2 1 | NC
  87. * ------ ------
  88. * EXP1 EXP2
  89. */
  90. #define EXP1_03_PIN PC14
  91. #define EXP1_04_PIN PC15
  92. #define EXP1_05_PIN PB7
  93. #define EXP1_06_PIN PC13
  94. #define EXP1_07_PIN PC12
  95. #define EXP1_08_PIN PB6
  96. #define EXP1_09_PIN PC11
  97. #define EXP1_10_PIN PC10
  98. #define EXP2_03_PIN -1 // RESET
  99. #define EXP2_04_PIN PB9
  100. #define EXP2_05_PIN PB5
  101. #define EXP2_06_PIN PB8
  102. #define EXP2_07_PIN PA15
  103. #define EXP2_08_PIN PD2
  104. #define EXP2_09_PIN PB3
  105. #define EXP2_10_PIN PB4
  106. //
  107. // LCD / Controller
  108. //
  109. #if HAS_WIRED_LCD
  110. #define BEEPER_PIN EXP1_10_PIN
  111. #define BTN_ENC EXP1_09_PIN
  112. #if ENABLED(CR10_STOCKDISPLAY)
  113. #define LCD_PINS_RS EXP1_04_PIN
  114. #define BTN_EN1 EXP1_08_PIN
  115. #define BTN_EN2 EXP1_06_PIN
  116. #define LCD_PINS_ENABLE EXP1_03_PIN
  117. #define LCD_PINS_D4 EXP1_05_PIN
  118. #elif IS_TFTGLCD_PANEL
  119. #undef BEEPER_PIN
  120. #undef BTN_ENC
  121. #if ENABLED(TFTGLCD_PANEL_SPI)
  122. #define TFTGLCD_CS EXP2_08_PIN
  123. #endif
  124. #define SD_DETECT_PIN EXP2_04_PIN
  125. #else
  126. #define LCD_PINS_RS EXP1_07_PIN
  127. #define BTN_EN1 EXP2_08_PIN
  128. #define BTN_EN2 EXP2_06_PIN
  129. #define LCD_PINS_ENABLE EXP1_08_PIN
  130. #if ENABLED(FYSETC_MINI_12864)
  131. #define LCD_BACKLIGHT_PIN -1
  132. #define LCD_RESET_PIN EXP1_06_PIN
  133. #define DOGLCD_A0 EXP1_07_PIN
  134. #define DOGLCD_CS EXP1_08_PIN
  135. #define DOGLCD_SCK EXP2_09_PIN
  136. #define DOGLCD_MOSI EXP2_05_PIN
  137. #define FORCE_SOFT_SPI // SPI MODE3
  138. #define LED_PIN EXP1_05_PIN // red pwm
  139. //#define LED_PIN EXP1_04_PIN // green
  140. //#define LED_PIN EXP1_03_PIN // blue
  141. //#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
  142. // #ifndef RGB_LED_R_PIN
  143. // #define RGB_LED_R_PIN EXP1_05_PIN
  144. // #endif
  145. // #ifndef RGB_LED_G_PIN
  146. // #define RGB_LED_G_PIN EXP1_04_PIN
  147. // #endif
  148. // #ifndef RGB_LED_B_PIN
  149. // #define RGB_LED_B_PIN EXP1_03_PIN
  150. // #endif
  151. //#elif ENABLED(FYSETC_MINI_12864_2_1)
  152. // #define NEOPIXEL_PIN EXP1_05_PIN
  153. //#endif
  154. #else // !FYSETC_MINI_12864
  155. #define LCD_PINS_D4 EXP1_06_PIN
  156. #if IS_ULTIPANEL
  157. #define LCD_PINS_D5 EXP1_05_PIN
  158. #define LCD_PINS_D6 EXP1_04_PIN
  159. #define LCD_PINS_D7 EXP1_03_PIN
  160. #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
  161. #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
  162. #endif
  163. #endif
  164. #endif // !FYSETC_MINI_12864
  165. // Alter timing for graphical display
  166. #if IS_U8GLIB_ST7920
  167. #define BOARD_ST7920_DELAY_1 125
  168. #define BOARD_ST7920_DELAY_2 125
  169. #define BOARD_ST7920_DELAY_3 125
  170. #endif
  171. #endif
  172. #endif // HAS_WIRED_LCD
  173. //
  174. // SD Card
  175. //
  176. // By default the onboard SD is enabled.
  177. // Change SDCARD_CONNECTION from 'ONBOARD' to 'LCD' for an external (LCD module) SD
  178. #ifndef SDCARD_CONNECTION
  179. #define SDCARD_CONNECTION ONBOARD
  180. #endif
  181. #if SD_CONNECTION_IS(LCD)
  182. #define SPI_DEVICE 3
  183. #define SD_DETECT_PIN EXP2_04_PIN
  184. #define SD_SCK_PIN EXP2_09_PIN
  185. #define SD_MISO_PIN EXP2_10_PIN
  186. #define SD_MOSI_PIN EXP2_05_PIN
  187. #define SD_SS_PIN EXP2_07_PIN
  188. #elif SD_CONNECTION_IS(ONBOARD)
  189. #define SD_DETECT_PIN PA3
  190. #define SD_SCK_PIN PA5
  191. #define SD_MISO_PIN PA6
  192. #define SD_MOSI_PIN PA7
  193. #define SD_SS_PIN PA4
  194. #endif
  195. #define ONBOARD_SPI_DEVICE 1 // SPI1
  196. #define ONBOARD_SD_CS_PIN PA4 // Chip select for "System" SD card