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 6.9KB

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