My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

pins_MKS_ROBIN_MINI.h 6.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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. * MKS Robin mini (STM32F130VET6) board pin assignments
  25. */
  26. #ifndef __STM32F1__
  27. #error "Oops! Select an STM32F1 board in 'Tools > Board.'"
  28. #elif HOTENDS > 1 || E_STEPPERS > 1
  29. #error "MKS Robin mini only supports 1 hotend / E-stepper. Comment out this line to continue."
  30. #endif
  31. #define BOARD_INFO_NAME "MKS Robin Mini"
  32. //
  33. // Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
  34. //
  35. #define DISABLE_DEBUG
  36. //
  37. // EEPROM
  38. //
  39. #if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION)
  40. #define FLASH_EEPROM_EMULATION
  41. #define EEPROM_PAGE_SIZE (0x800U) // 2KB
  42. #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL)
  43. #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE // 2KB
  44. #endif
  45. #define ENABLE_SPI2
  46. //
  47. // Limit Switches
  48. //
  49. #define X_STOP_PIN PA15
  50. #define Y_STOP_PIN PA12
  51. #define Z_MIN_PIN PA11
  52. #define Z_MAX_PIN PC4
  53. #ifndef FIL_RUNOUT_PIN
  54. #define FIL_RUNOUT_PIN PA4 // MT_DET
  55. #endif
  56. //
  57. // Steppers
  58. //
  59. #define X_ENABLE_PIN PE4
  60. #define X_STEP_PIN PE3
  61. #define X_DIR_PIN PE2
  62. #define Y_ENABLE_PIN PE1
  63. #define Y_STEP_PIN PE0
  64. #define Y_DIR_PIN PB9
  65. #define Z_ENABLE_PIN PB8
  66. #define Z_STEP_PIN PB5
  67. #define Z_DIR_PIN PB4
  68. #define E0_ENABLE_PIN PB3
  69. #define E0_STEP_PIN PD6
  70. #define E0_DIR_PIN PD3
  71. // Motor current PWM pins
  72. #define MOTOR_CURRENT_PWM_XY_PIN PA6
  73. #define MOTOR_CURRENT_PWM_Z_PIN PA7
  74. #define MOTOR_CURRENT_PWM_E_PIN PB0
  75. #define MOTOR_CURRENT_PWM_RANGE 1500 // (255 * (1000mA / 65535)) * 257 = 1000 is equal 1.6v Vref in turn equal 1Amp
  76. #ifndef DEFAULT_PWM_MOTOR_CURRENT
  77. #define DEFAULT_PWM_MOTOR_CURRENT { 800, 800, 800 }
  78. #endif
  79. //
  80. // Temperature Sensors
  81. //
  82. #define TEMP_0_PIN PC1 // TH1
  83. #define TEMP_BED_PIN PC0 // TB1
  84. //
  85. // Heaters / Fans
  86. //
  87. #define HEATER_0_PIN PC3
  88. #define HEATER_BED_PIN PA0
  89. #define FAN_PIN PB1 // FAN
  90. //
  91. // Misc. Functions
  92. //
  93. #define POWER_LOSS_PIN PA2 // PW_DET
  94. #define PS_ON_PIN PA3 // PW_OFF
  95. #define SERVO0_PIN PA8 // Enable BLTOUCH support on IO0 (WIFI connector)
  96. #define MT_DET_1_PIN PA4
  97. #define MT_DET_PIN_INVERTING false
  98. #define WIFI_IO0_PIN PC13
  99. //
  100. // SD Card
  101. //
  102. #ifndef SDCARD_CONNECTION
  103. #define SDCARD_CONNECTION ONBOARD
  104. #endif
  105. #define SDIO_SUPPORT
  106. #define SDIO_CLOCK 4500000 // 4.5 MHz
  107. #define SD_DETECT_PIN PD12
  108. #define ONBOARD_SD_CS_PIN PC11
  109. //
  110. // LCD / Controller
  111. //
  112. #define BEEPER_PIN PC5
  113. /**
  114. * Note: MKS Robin TFT screens use various TFT controllers.
  115. * If the screen stays white, disable 'LCD_RESET_PIN'
  116. * to let the bootloader init the screen.
  117. */
  118. #define XPT2046_X_CALIBRATION 12033
  119. #define XPT2046_Y_CALIBRATION -9047
  120. #define XPT2046_X_OFFSET -30
  121. #define XPT2046_Y_OFFSET 254
  122. #if ENABLED(FSMC_GRAPHICAL_TFT)
  123. #define FSMC_CS_PIN PD7 // NE4
  124. #define FSMC_RS_PIN PD11 // A0
  125. #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
  126. #define FSMC_DMA_DEV DMA2
  127. #define FSMC_DMA_CHANNEL DMA_CH5
  128. #define LCD_RESET_PIN PC6 // FSMC_RST
  129. #define LCD_BACKLIGHT_PIN PD13
  130. #if NEED_TOUCH_PINS
  131. #define TOUCH_CS_PIN PC2 // SPI2_NSS
  132. #define TOUCH_SCK_PIN PB13 // SPI2_SCK
  133. #define TOUCH_MISO_PIN PB14 // SPI2_MISO
  134. #define TOUCH_MOSI_PIN PB15 // SPI2_MOSI
  135. #endif
  136. #elif ENABLED(TFT_320x240) //TFT32/28
  137. #define TFT_RESET_PIN PC6
  138. #define TFT_BACKLIGHT_PIN PD13
  139. #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
  140. #define FSMC_CS_PIN PD7
  141. #define FSMC_RS_PIN PD11
  142. #define FSMC_DMA_DEV DMA2
  143. #define FSMC_DMA_CHANNEL DMA_CH5
  144. #define TOUCH_CS_PIN PC2 // SPI2_NSS
  145. #define TOUCH_SCK_PIN PB13 // SPI2_SCK
  146. #define TOUCH_MISO_PIN PB14 // SPI2_MISO
  147. #define TOUCH_MOSI_PIN PB15 // SPI2_MOSI
  148. #define TFT_DRIVER ILI9341
  149. #define TFT_BUFFER_SIZE 14400
  150. // YV for normal screen mounting
  151. #define ILI9341_ORIENTATION ILI9341_MADCTL_MY | ILI9341_MADCTL_MV
  152. // XV for 180° rotated screen mounting
  153. //#define ILI9341_ORIENTATION ILI9341_MADCTL_MX | ILI9341_MADCTL_MV
  154. #define ILI9341_COLOR_RGB
  155. #endif
  156. #define HAS_SPI_FLASH 1
  157. #define SPI_FLASH_SIZE 0x1000000 // 16MB
  158. #if HAS_SPI_FLASH
  159. #define W25QXX_CS_PIN PB12 // Flash chip-select
  160. #define W25QXX_MOSI_PIN PB15
  161. #define W25QXX_MISO_PIN PB14
  162. #define W25QXX_SCK_PIN PB13
  163. #endif