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.6KB

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