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_PANDA_PI_V29.h 7.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2022 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 "PANDA PI V2.9"
  25. // Release PB3/PB4 (TMC_SW Pins) from JTAG pins
  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) // 2K
  32. #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL)
  33. #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE // 2K
  34. #endif
  35. #if ENABLED(BD_SENSOR)
  36. #define I2C_BD_SDA_PIN PC6
  37. #define I2C_BD_SCL_PIN PB2
  38. #define I2C_BD_DELAY 10 // (seconds)
  39. #endif
  40. //
  41. // Servos
  42. //
  43. #define SERVO0_PIN PA11 // SERVOS
  44. //
  45. // Limit Switches
  46. //
  47. #define X_STOP_PIN PA3 // X-STOP
  48. #define Y_STOP_PIN PC9 // Y-STOP
  49. #define Z_STOP_PIN PA1 // Z-STOP
  50. //
  51. // Z Probe must be this pin
  52. //
  53. //#define Z_MIN_PROBE_PIN PA1 // PROBE
  54. //
  55. // Filament Runout Sensor
  56. //
  57. //#ifndef FIL_RUNOUT_PIN
  58. // #define FIL_RUNOUT_PIN PC2 // E0-STOP
  59. //#endif
  60. //
  61. // Steppers
  62. //
  63. #define X_ENABLE_PIN PC12
  64. #define X_STEP_PIN PC11
  65. #define X_DIR_PIN PB6
  66. #define Y_ENABLE_PIN PC12
  67. #define Y_STEP_PIN PB5
  68. #define Y_DIR_PIN PB4
  69. #define Z_ENABLE_PIN PC12
  70. #define Z_STEP_PIN PB3
  71. #define Z_DIR_PIN PA15
  72. #define E0_ENABLE_PIN PC12
  73. #define E0_STEP_PIN PB15
  74. #define E0_DIR_PIN PB14
  75. //
  76. // Software SPI pins for TMC2130 stepper drivers
  77. //
  78. #if ENABLED(TMC_USE_SW_SPI)
  79. #ifndef TMC_SW_MOSI
  80. #define TMC_SW_MOSI PB5
  81. #endif
  82. #ifndef TMC_SW_MISO
  83. #define TMC_SW_MISO PB4
  84. #endif
  85. #ifndef TMC_SW_SCK
  86. #define TMC_SW_SCK PB3
  87. #endif
  88. #endif
  89. #if HAS_TMC_UART
  90. /**
  91. * TMC2208/TMC2209 stepper drivers
  92. *
  93. * Hardware serial communication ports.
  94. * If undefined software serial is used according to the pins below
  95. */
  96. //#define X_HARDWARE_SERIAL MSerial1
  97. //#define Y_HARDWARE_SERIAL MSerial1
  98. //#define Z_HARDWARE_SERIAL MSerial1
  99. //#define E0_HARDWARE_SERIAL MSerial1
  100. #define X_SERIAL_TX_PIN PC10
  101. #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN
  102. #define Y_SERIAL_TX_PIN PC11
  103. #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN
  104. #define Z_SERIAL_TX_PIN PC12
  105. #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN
  106. #define E0_SERIAL_TX_PIN PD2
  107. #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
  108. // Reduce baud rate to improve software serial reliability
  109. #define TMC_BAUD_RATE 19200
  110. #endif
  111. //
  112. // Temperature Sensors
  113. //
  114. #define TEMP_0_PIN PB0 // Analog Input "TH0"
  115. #define TEMP_BED_PIN PB1 // Analog Input "TB0"
  116. #define TEMP_1_PIN PA2
  117. //
  118. // Heaters / Fans
  119. //
  120. #define HEATER_0_PIN PB12 // "HE"
  121. #define HEATER_BED_PIN PB13 // "HB"
  122. #define FAN_PIN PA8 // "FAN0"
  123. #define HEATER_1_PIN PA12
  124. //
  125. // SD Support
  126. //
  127. #define ONBOARD_SPI_DEVICE 1 // SPI1
  128. #define ONBOARD_SD_CS_PIN PA4 // Chip select for "System" SD card
  129. #define SDSS ONBOARD_SD_CS_PIN
  130. #ifndef SDCARD_CONNECTION
  131. #define SDCARD_CONNECTION ONBOARD
  132. #endif
  133. #if SD_CONNECTION_IS(ONBOARD)
  134. //#define SD_DETECT_PIN PA4
  135. #define SD_SCK_PIN PA5
  136. #define SD_MISO_PIN PA6
  137. #define SD_MOSI_PIN PA7
  138. #elif SD_CONNECTION_IS(CUSTOM_CABLE)
  139. #error "SD CUSTOM_CABLE is not compatible with SKR E3 DIP."
  140. #endif
  141. //
  142. // LCD / Controller
  143. //
  144. #if HAS_WIRED_LCD
  145. #define BTN_ENC PA0
  146. #define BTN_EN1 PC4
  147. #define BTN_EN2 PC5
  148. #define LCD_PINS_RS PC0
  149. #define LCD_PINS_ENABLE PC2
  150. #define LCD_PINS_D4 PC1
  151. #endif
  152. #if BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050)
  153. #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
  154. #error "CAUTION! LCD_FYSETC_TFT81050 requires wiring modifications. See 'pins_PANDA_PI_V29.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
  155. #endif
  156. /** FYSETC TFT TFT81050 display pinout
  157. *
  158. * Board Display
  159. * ------ ------
  160. * (SD_DET) PA15 | 1 2 | PB6 (BEEPER) (SPI1-MISO) MISO | 1 2 | SCK (SPI1-SCK)
  161. * (MOD_RESET) PA9 | 3 4 | RESET MOD_RESET | 3 4 | SD_CS
  162. * (SD_CS) PA10 5 6 | PB9 (FREE) LCD_CS | 5 6 MOSI (SPI1-MOSI)
  163. * (LCD_CS) PB8 | 7 8 | PB7 (FREE) SD_DET | 7 8 | RESET
  164. * GND | 9 10 | 5V GND | 9 10 | 5V
  165. * ------ ------
  166. * EXP1 EXP1
  167. *
  168. * Needs custom cable:
  169. *
  170. * Board Adapter Display
  171. * ----------------------------------
  172. * EXP1-10 ---------- EXP1-10 5V
  173. * EXP1-9 ----------- EXP1-9 GND
  174. * SPI1-4 ----------- EXP1-6 MOSI
  175. * EXP1-7 ----------- EXP1-5 LCD_CS
  176. * SP11-3 ----------- EXP1-2 SCK
  177. * EXP1-5 ----------- EXP1-4 SD_CS
  178. * EXP1-4 ----------- EXP1-8 RESET
  179. * EXP1-3 ----------- EXP1-3 MOD_RST
  180. * SPI1-1 ----------- EXP1-1 MISO
  181. * EXP1-1 ----------- EXP1-7 SD_DET
  182. */
  183. #define CLCD_SPI_BUS 1 // SPI1 connector
  184. #define BEEPER_PIN PB6
  185. #define CLCD_MOD_RESET PA9
  186. #define CLCD_SPI_CS PB8
  187. #if SD_CONNECTION_IS(LCD) && BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050)
  188. #define SD_DETECT_PIN PA15
  189. #define SD_SS_PIN PA10
  190. #endif
  191. #elif HAS_WIRED_LCD
  192. #define BEEPER_PIN PC3
  193. #endif