My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

pins_RUMBA32_common.h 5.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  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. /**
  24. * Common pin assignments for all RUMBA32 boards
  25. */
  26. #if NOT_TARGET(STM32F4)
  27. #error "Oops! Select an STM32F4 board in 'Tools > Board.'"
  28. #elif HOTENDS > 3 || E_STEPPERS > 3
  29. #error "RUMBA32 boards support up to 3 hotends / E-steppers."
  30. #endif
  31. #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
  32. // Use soft PWM for fans - PWM is not working properly when paired with STM32 Arduino Core v1.7.0
  33. // This can be removed when Core version is updated and PWM behaviour is fixed.
  34. #define FAN_SOFT_PWM
  35. //
  36. // Configure Timers
  37. // TIM6 is used for TONE
  38. // TIM7 is used for SERVO
  39. // TIMER_SERIAL defaults to TIM7 and must be overridden in the platformio.h file if SERVO will also be used.
  40. // This will be difficult to solve from the Arduino IDE, without modifying the RUMBA32 variant
  41. // included with the STM32 framework.
  42. #define STEP_TIMER 10
  43. #define TEMP_TIMER 14
  44. //
  45. // Limit Switches
  46. //
  47. #define X_MIN_PIN PB12
  48. #define X_MAX_PIN PB13
  49. #define Y_MIN_PIN PB15
  50. #define Y_MAX_PIN PD8
  51. #define Z_MIN_PIN PD9
  52. #define Z_MAX_PIN PD10
  53. //
  54. // Steppers
  55. //
  56. #define X_STEP_PIN PA0
  57. #define X_DIR_PIN PC15
  58. #define X_ENABLE_PIN PC11
  59. #define X_CS_PIN PC14
  60. #define Y_STEP_PIN PE5
  61. #define Y_DIR_PIN PE6
  62. #define Y_ENABLE_PIN PE3
  63. #define Y_CS_PIN PE4
  64. #define Z_STEP_PIN PE1
  65. #define Z_DIR_PIN PE2
  66. #define Z_ENABLE_PIN PB7
  67. #define Z_CS_PIN PE0
  68. #define E0_STEP_PIN PB5
  69. #define E0_DIR_PIN PB6
  70. #define E0_ENABLE_PIN PC12
  71. #define E0_CS_PIN PC13
  72. #define E1_STEP_PIN PD6
  73. #define E1_DIR_PIN PD7
  74. #define E1_ENABLE_PIN PD4
  75. #define E1_CS_PIN PD5
  76. #define E2_STEP_PIN PD2
  77. #define E2_DIR_PIN PD3
  78. #define E2_ENABLE_PIN PD0
  79. #define E2_CS_PIN PD1
  80. #if ENABLED(TMC_USE_SW_SPI)
  81. #ifndef TMC_SW_MOSI
  82. #define TMC_SW_MOSI PA7
  83. #endif
  84. #ifndef TMC_SW_MISO
  85. #define TMC_SW_MISO PA6
  86. #endif
  87. #ifndef TMC_SW_SCK
  88. #define TMC_SW_SCK PA5
  89. #endif
  90. #endif
  91. //
  92. // Temperature Sensors
  93. //
  94. #define TEMP_0_PIN PC4
  95. #define TEMP_1_PIN PC3
  96. #define TEMP_2_PIN PC2
  97. #define TEMP_3_PIN PC1
  98. #define TEMP_BED_PIN PC0
  99. //
  100. // Heaters / Fans
  101. //
  102. #define HEATER_0_PIN PC6
  103. #define HEATER_1_PIN PC7
  104. #define HEATER_2_PIN PC8
  105. #define HEATER_BED_PIN PA1
  106. #define FAN_PIN PC9
  107. #define FAN1_PIN PA8
  108. //
  109. // SPI
  110. //
  111. #define SCK_PIN PA5
  112. #define MISO_PIN PA6
  113. #define MOSI_PIN PA7
  114. //
  115. // Misc. Functions
  116. //
  117. #define LED_PIN PB14
  118. #define BTN_PIN PC10
  119. #define PS_ON_PIN PE11
  120. #define KILL_PIN PC5
  121. #define SDSS PA2
  122. #define SD_DETECT_PIN PB0
  123. #define BEEPER_PIN PE8
  124. //
  125. // LCD / Controller
  126. //
  127. #if HAS_WIRED_LCD
  128. #define BTN_EN1 PB2
  129. #define BTN_EN2 PB1
  130. #define BTN_ENC PE7
  131. #define LCD_PINS_RS PE10
  132. #define LCD_PINS_ENABLE PE9
  133. #define LCD_PINS_D4 PE12
  134. #if ENABLED(MKS_MINI_12864)
  135. #define DOGLCD_CS PE13
  136. #define DOGLCD_A0 PE14
  137. #endif
  138. #if IS_ULTIPANEL
  139. #define LCD_PINS_D5 PE13
  140. #define LCD_PINS_D6 PE14
  141. #define LCD_PINS_D7 PE15
  142. #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
  143. #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
  144. #endif
  145. #endif
  146. // Alter timing for graphical display
  147. #if HAS_MARLINUI_U8GLIB
  148. #ifndef BOARD_ST7920_DELAY_1
  149. #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
  150. #endif
  151. #ifndef BOARD_ST7920_DELAY_2
  152. #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
  153. #endif
  154. #ifndef BOARD_ST7920_DELAY_3
  155. #define BOARD_ST7920_DELAY_3 DELAY_NS(600)
  156. #endif
  157. #endif
  158. #endif