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_CR6.h 4.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  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. * BigTreeTech SKR CR-6 (STM32F103RET6) board pin assignments
  25. */
  26. #define DEFAULT_MACHINE_NAME "Creality3D"
  27. #define BOARD_INFO_NAME "BTT SKR CR-6"
  28. #include "env_validate.h"
  29. //
  30. // Release PB4 (Z_STEP_PIN) from JTAG NRST role
  31. //
  32. #define DISABLE_DEBUG
  33. //
  34. // USB connect control
  35. //
  36. #define USB_CONNECT_PIN PA14
  37. #define USB_CONNECT_INVERTING false
  38. //
  39. // EEPROM
  40. //
  41. #if NO_EEPROM_SELECTED
  42. #define I2C_EEPROM
  43. #endif
  44. #if ENABLED(I2C_EEPROM)
  45. #define IIC_EEPROM_SDA PB7
  46. #define IIC_EEPROM_SCL PB6
  47. #define MARLIN_EEPROM_SIZE 0x1000 // 4KB
  48. #elif ENABLED(SDCARD_EEPROM_EMULATION)
  49. #define MARLIN_EEPROM_SIZE 0x1000 // 4KB
  50. #endif
  51. //
  52. // Limit Switches
  53. //
  54. #define X_STOP_PIN PC0
  55. #define Y_STOP_PIN PC1
  56. #define Z_STOP_PIN PC14 // Endstop or Probe
  57. #define FIL_RUNOUT_PIN PC15
  58. //
  59. // Probe
  60. //
  61. #ifndef PROBE_TARE_PIN
  62. #define PROBE_TARE_PIN PA1
  63. #endif
  64. #if ENABLED(PROBE_ACTIVATION_SWITCH)
  65. #ifndef PROBE_ACTIVATION_SWITCH_PIN
  66. #define PROBE_ACTIVATION_SWITCH_PIN PC2 // Optoswitch to Enable Z Probe
  67. #endif
  68. #endif
  69. //
  70. // Steppers
  71. //
  72. #define X_ENABLE_PIN PB14
  73. #define X_STEP_PIN PB13
  74. #define X_DIR_PIN PB12
  75. #define Y_ENABLE_PIN PB11
  76. #define Y_STEP_PIN PB10
  77. #define Y_DIR_PIN PB2
  78. #define Z_ENABLE_PIN PB1
  79. #define Z_STEP_PIN PB0
  80. #define Z_DIR_PIN PC5
  81. #define E0_ENABLE_PIN PD2
  82. #define E0_STEP_PIN PB3
  83. #define E0_DIR_PIN PB4
  84. //
  85. // Temperature Sensors
  86. //
  87. #define TEMP_0_PIN PA0 // TH1
  88. #define TEMP_BED_PIN PC3 // TB1
  89. //
  90. // Heaters / Fans
  91. //
  92. #define HEATER_0_PIN PC8 // HEATER1
  93. #define HEATER_BED_PIN PC9 // HOT BED
  94. #define FAN_PIN PC6 // FAN
  95. #define FAN_SOFT_PWM_REQUIRED
  96. #define CONTROLLER_FAN_PIN PC7
  97. //
  98. // LCD / Controller
  99. //
  100. #if ENABLED(CR10_STOCKDISPLAY)
  101. #define BTN_ENC PA15
  102. #define BTN_EN1 PA9
  103. #define BTN_EN2 PA10
  104. #define LCD_PINS_RS PB8
  105. #define LCD_PINS_ENABLE PB15
  106. #define LCD_PINS_D4 PB9
  107. #define BEEPER_PIN PB5
  108. #endif
  109. #if HAS_TMC_UART
  110. /**
  111. * TMC2209 stepper drivers
  112. * Hardware serial communication ports.
  113. */
  114. #define X_HARDWARE_SERIAL MSerial4
  115. #define Y_HARDWARE_SERIAL MSerial4
  116. #define Z_HARDWARE_SERIAL MSerial4
  117. #define E0_HARDWARE_SERIAL MSerial4
  118. // Default TMC slave addresses
  119. #ifndef X_SLAVE_ADDRESS
  120. #define X_SLAVE_ADDRESS 0
  121. #endif
  122. #ifndef Y_SLAVE_ADDRESS
  123. #define Y_SLAVE_ADDRESS 1
  124. #endif
  125. #ifndef Z_SLAVE_ADDRESS
  126. #define Z_SLAVE_ADDRESS 2
  127. #endif
  128. #ifndef E0_SLAVE_ADDRESS
  129. #define E0_SLAVE_ADDRESS 3
  130. #endif
  131. #endif
  132. //
  133. // SD Card
  134. //
  135. #ifndef SDCARD_CONNECTION
  136. #define SDCARD_CONNECTION ONBOARD
  137. #endif
  138. #if SD_CONNECTION_IS(ONBOARD)
  139. #define SD_DETECT_PIN PC4
  140. #define ONBOARD_SD_CS_PIN PA4 // Chip select for "System" SD card
  141. #define SDSS ONBOARD_SD_CS_PIN
  142. #endif
  143. //
  144. // Misc. Functions
  145. //
  146. #define CASE_LIGHT_PIN PA13
  147. #ifndef NEOPIXEL_PIN
  148. #define NEOPIXEL_PIN PA8
  149. #endif
  150. #define SUICIDE_PIN PC13
  151. #ifndef SUICIDE_PIN_STATE
  152. #define SUICIDE_PIN_STATE LOW
  153. #endif