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_TRIGORILLA_PRO.h 6.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  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. * ANYCUBIC Trigorilla Pro (STM32F103ZET6) board pin assignments.
  25. * It is the same used by the Tronxy X5SA thanks to ftoz1 for sharing it
  26. * https://github.com/MarlinFirmware/Marlin/issues/14655
  27. * https://github.com/MarlinFirmware/Marlin/files/3401484/x5sa-main_board-2.pdf
  28. */
  29. #include "env_validate.h"
  30. #if HOTENDS > 2 || E_STEPPERS > 2
  31. #error "Trigorilla Pro supports up to 2 hotends / E steppers."
  32. #endif
  33. #define BOARD_INFO_NAME "Trigorilla Pro"
  34. #define BOARD_NO_NATIVE_USB
  35. #define DISABLE_JTAG
  36. //#define SWAPPED_Z_PLUGS
  37. //
  38. // EEPROM
  39. //
  40. #if NO_EEPROM_SELECTED
  41. #define FLASH_EEPROM_EMULATION
  42. #endif
  43. #if ENABLED(FLASH_EEPROM_EMULATION)
  44. // SoC Flash (framework-arduinoststm32-maple/STM32F1/libraries/EEPROM/EEPROM.h)
  45. #define EEPROM_START_ADDRESS (0x8000000UL + (512 * 1024) - 2 * EEPROM_PAGE_SIZE)
  46. #define EEPROM_PAGE_SIZE (0x800U) // 2K, but will use 2x more (4K)
  47. #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE
  48. #else
  49. #define MARLIN_EEPROM_SIZE (0x800U) // On SD, Limit to 2K, require this amount of RAM
  50. #endif
  51. //
  52. // Limit Switches
  53. //
  54. #define X_STOP_PIN PG10
  55. #define Y_STOP_PIN PA12
  56. #ifndef Z_MIN_PIN
  57. #ifdef SWAPPED_Z_PLUGS
  58. #define Z_MIN_PIN PA14
  59. #else
  60. #define Z_MIN_PIN PA13
  61. #endif
  62. #endif
  63. #ifndef Z_MAX_PIN
  64. #ifdef SWAPPED_Z_PLUGS
  65. #define Z_MAX_PIN PA13
  66. #else
  67. #define Z_MAX_PIN PA14
  68. #endif
  69. #endif
  70. //
  71. // Steppers
  72. //
  73. #define X_ENABLE_PIN PC13
  74. #define X_STEP_PIN PE5
  75. #define X_DIR_PIN PE6
  76. #define Y_ENABLE_PIN PE4
  77. #define Y_STEP_PIN PE2
  78. #define Y_DIR_PIN PE3
  79. #define Z_ENABLE_PIN PE1
  80. #define Z_STEP_PIN PB9
  81. #define Z_DIR_PIN PE0
  82. #define E0_ENABLE_PIN PB8
  83. #define E0_STEP_PIN PB4
  84. #define E0_DIR_PIN PB5
  85. #define E1_ENABLE_PIN PG8
  86. #define E1_STEP_PIN PC7
  87. #define E1_DIR_PIN PC6
  88. //
  89. // Temperature Sensors
  90. //
  91. #define TEMP_0_PIN PA1 // TH1
  92. #define TEMP_BED_PIN PA0 // TB1
  93. //
  94. // Heaters
  95. //
  96. #define HEATER_0_PIN PG12 // HEATER1
  97. #define HEATER_BED_PIN PG11 // HOT BED
  98. #define HEATER_BED_INVERTING true
  99. //
  100. // Fans
  101. //
  102. #define CONTROLLER_FAN_PIN PD6 // FAN
  103. #define FAN_PIN PG13 // FAN
  104. #define FAN1_PIN PG14 // FAN
  105. //
  106. // Misc
  107. //
  108. #define BEEPER_PIN PB0
  109. #define LED_PIN PD3
  110. //#define POWER_LOSS_PIN PG2 // PG4 PW_DET
  111. #define FIL_RUNOUT_PIN PA15 // MT_DET
  112. //
  113. // TFT with FSMC interface
  114. //
  115. #if HAS_FSMC_TFT
  116. /**
  117. * Note: MKS Robin TFT screens use various TFT controllers
  118. * Supported screens are based on the ILI9341, ST7789V and ILI9328 (320x240)
  119. * ILI9488 is not supported.
  120. * Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp
  121. *
  122. * If the screen stays white, disable 'LCD_RESET_PIN' to let the bootloader init the screen.
  123. *
  124. * Setting an 'LCD_RESET_PIN' may cause a flicker when entering the LCD menu
  125. * because Marlin uses the reset as a failsafe to revive a glitchy LCD.
  126. */
  127. #define TFT_RESET_PIN PF11
  128. #define TFT_BACKLIGHT_PIN PD13
  129. #define FSMC_CS_PIN PD7 // NE4
  130. #define FSMC_RS_PIN PD11 // A0
  131. #define TFT_CS_PIN FSMC_CS_PIN
  132. #define TFT_RS_PIN FSMC_RS_PIN
  133. #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
  134. #define FSMC_DMA_DEV DMA2
  135. #define FSMC_DMA_CHANNEL DMA_CH5
  136. #define ANYCUBIC_TFT35
  137. #else
  138. #define LCD_RESET_PIN PF11
  139. #define LCD_BACKLIGHT_PIN PD13
  140. #endif
  141. // XPT2046 Touch Screen calibration
  142. #if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI)
  143. #ifndef TOUCH_CALIBRATION_X
  144. #define TOUCH_CALIBRATION_X -17181
  145. #endif
  146. #ifndef TOUCH_CALIBRATION_Y
  147. #define TOUCH_CALIBRATION_Y 11434
  148. #endif
  149. #ifndef TOUCH_OFFSET_X
  150. #define TOUCH_OFFSET_X 501
  151. #endif
  152. #ifndef TOUCH_OFFSET_Y
  153. #define TOUCH_OFFSET_Y -9
  154. #endif
  155. #endif
  156. #if NEED_TOUCH_PINS
  157. #define TOUCH_CS_PIN PB7 // SPI2_NSS
  158. #define TOUCH_SCK_PIN PA5 // SPI2_SCK
  159. #define TOUCH_MISO_PIN PA6 // SPI2_MISO
  160. #define TOUCH_MOSI_PIN PA7 // SPI2_MOSI
  161. #endif
  162. // SPI1(PA7) & SPI3(PB5) not available
  163. #define SPI_DEVICE 2
  164. #if ENABLED(SDIO_SUPPORT)
  165. #define SD_SCK_PIN PB13 // SPI2 ok
  166. #define SD_MISO_PIN PB14 // SPI2 ok
  167. #define SD_MOSI_PIN PB15 // SPI2 ok
  168. #define SD_SS_PIN PC11 // PB12 is X- ok
  169. #define SD_DETECT_PIN -1 // SD_CD ok
  170. #else
  171. // SD as custom software SPI (SDIO pins)
  172. #define SD_SCK_PIN PC12
  173. #define SD_MISO_PIN PC8
  174. #define SD_MOSI_PIN PD2
  175. #define SD_SS_PIN -1
  176. #define ONBOARD_SD_CS_PIN PC11
  177. #define SDSS PD2
  178. #define SD_DETECT_PIN -1
  179. #endif
  180. #undef SWAPPED_Z_PLUGS