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_MKS_ROBIN.h 4.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  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 <http://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #pragma once
  23. /**
  24. * MKS Robin (STM32F130ZET6) board pin assignments
  25. *
  26. * https://github.com/makerbase-mks/MKS-Robin/tree/master/MKS%20Robin/Hardware
  27. */
  28. #ifndef __STM32F1__
  29. #error "Oops! Select an STM32F1 board in 'Tools > Board.'"
  30. #elif HOTENDS > 2 || E_STEPPERS > 2
  31. #error "MKS Robin supports up to 2 hotends / E-steppers. Comment out this line to continue."
  32. #endif
  33. #define BOARD_INFO_NAME "MKS Robin"
  34. //
  35. // Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
  36. //
  37. #define DISABLE_JTAG
  38. //
  39. // Servos
  40. //
  41. #define SERVO0_PIN PC3 // XS1 - 5
  42. #define SERVO1_PIN PA1 // XS1 - 6
  43. #define SERVO2_PIN PF9 // XS2 - 5
  44. #define SERVO3_PIN PF8 // XS2 - 6
  45. //
  46. // Limit Switches
  47. //
  48. #define X_MIN_PIN PB12
  49. #define X_MAX_PIN PB0
  50. #define Y_MIN_PIN PC5
  51. #define Y_MAX_PIN PC4
  52. #define Z_MIN_PIN PA4
  53. #define Z_MAX_PIN PF7
  54. //
  55. // Steppers
  56. //
  57. #define X_ENABLE_PIN PB9
  58. #define X_STEP_PIN PB8
  59. #define X_DIR_PIN PB5
  60. #define Y_ENABLE_PIN PB4
  61. #define Y_STEP_PIN PG15
  62. #define Y_DIR_PIN PG10
  63. #define Z_ENABLE_PIN PD7
  64. #define Z_STEP_PIN PD3
  65. #define Z_DIR_PIN PG14
  66. #define E0_ENABLE_PIN PG13
  67. #define E0_STEP_PIN PG8
  68. #define E0_DIR_PIN PA15
  69. #define E1_ENABLE_PIN PA12
  70. #define E1_STEP_PIN PA11
  71. #define E1_DIR_PIN PA8
  72. //
  73. // Temperature Sensors
  74. //
  75. #define TEMP_0_PIN PC1 // TH1
  76. #define TEMP_1_PIN PC2 // TH2
  77. #define TEMP_BED_PIN PC0 // TB1
  78. //
  79. // Heaters / Fans
  80. //
  81. #define HEATER_0_PIN PC7 // HEATER1
  82. #define HEATER_1_PIN PA6 // HEATER2
  83. #define HEATER_BED_PIN PC6 // HOT BED
  84. #define FAN_PIN PA7 // FAN
  85. /**
  86. * Note: MKS Robin board is using SPI2 interface. Make sure your stm32duino library is configured accordingly
  87. */
  88. //#define MAX6675_SS_PIN PE5 // TC1 - CS1
  89. //#define MAX6675_SS_PIN PE6 // TC2 - CS2
  90. #define POWER_LOSS_PIN PA2 // PW_DET
  91. #define PS_ON_PIN PA3 // PW_OFF
  92. #define FIL_RUNOUT_PIN PF11 // MT_DET
  93. #define BEEPER_PIN PC13
  94. #define LED_PIN PB2
  95. /**
  96. * Note: MKS Robin TFT screens use various TFT controllers
  97. * Supported screens are based on the ILI9341, ST7789V and ILI9328 (320x240)
  98. * ILI9488 is not supported
  99. * Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp
  100. *
  101. * If the screen stays white, disable 'LCD_RESET_PIN'
  102. * to let the bootloader init the screen.
  103. *
  104. * Setting an 'LCD_RESET_PIN' may cause a flicker when entering the LCD menu
  105. * because Marlin uses the reset as a failsafe to revive a glitchy LCD.
  106. */
  107. //#define LCD_RESET_PIN PF6
  108. #define LCD_BACKLIGHT_PIN PG11
  109. #define FSMC_CS_PIN PG12 // NE4
  110. #define FSMC_RS_PIN PF0 // A0
  111. #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
  112. #define FSMC_DMA_DEV DMA2
  113. #define FSMC_DMA_CHANNEL DMA_CH5
  114. #if ENABLED(TOUCH_BUTTONS)
  115. #define TOUCH_CS_PIN PB1 // SPI2_NSS
  116. #define TOUCH_SCK_PIN PB13 // SPI2_SCK
  117. #define TOUCH_MISO_PIN PB14 // SPI2_MISO
  118. #define TOUCH_MOSI_PIN PB15 // SPI2_MOSI
  119. #endif
  120. // SPI1(PA7) & SPI3(PB5) not available
  121. #define ENABLE_SPI2
  122. #if ENABLED(SDIO_SUPPORT)
  123. #define SCK_PIN PB13 // SPI2
  124. #define MISO_PIN PB14 // SPI2
  125. #define MOSI_PIN PB15 // SPI2
  126. #define SS_PIN -1 // PB12 is X-
  127. #define SD_DETECT_PIN PF12 // SD_CD
  128. #else
  129. // SD as custom software SPI (SDIO pins)
  130. #define SCK_PIN PC12
  131. #define MISO_PIN PC8
  132. #define MOSI_PIN PD2
  133. #define SS_PIN -1
  134. #define ONBOARD_SD_CS_PIN PC11
  135. #define SDSS PD2
  136. #define SD_DETECT_PIN -1
  137. #endif