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_RUMBA32_common.h 5.5KB

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