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_LONGER3D_LK.h 7.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. *
  5. * This program is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  17. *
  18. */
  19. #pragma once
  20. /**
  21. * Longer3D LK1/LK2 & Alfawise U20/U30 (STM32F103VET6) board pin assignments
  22. */
  23. #if NOT_TARGET(__STM32F1__, STM32F1xx)
  24. #error "Oops! Select a STM32F1 board in 'Tools > Board.'"
  25. #elif HOTENDS > 1 || E_STEPPERS > 1
  26. #error "Longer3D board only supports 1 hotend / E-stepper. Comment out this line to continue."
  27. #endif
  28. #define BOARD_INFO_NAME "Longer3D"
  29. #define ALFAWISE_UX0 // Common to all Longer3D STM32F1 boards (used for Open drain mosfets)
  30. //#define DISABLE_DEBUG // We still want to debug with STLINK...
  31. #define DISABLE_JTAG // We free the jtag pins (PA15) but keep STLINK
  32. // Release PB4 (STEP_X_PIN) from JTAG NRST role.
  33. //
  34. // Limit Switches
  35. //
  36. #define X_MIN_PIN PC1 // pin 16
  37. #define X_MAX_PIN PC0 // pin 15 (Filament sensor on Alfawise setup)
  38. #define Y_MIN_PIN PC15 // pin 9
  39. #define Y_MAX_PIN PC14 // pin 8 (Unused in stock Alfawise setup)
  40. #define Z_MIN_PIN PE6 // pin 5 Standard Endstop or Z_Probe endstop function
  41. #define Z_MAX_PIN PE5 // pin 4 (Unused in stock Alfawise setup)
  42. // May be used for BLTouch Servo function on older variants (<= V08)
  43. #define ONBOARD_ENDSTOPPULLUPS
  44. //
  45. // Filament Sensor
  46. //
  47. #ifndef FIL_RUNOUT_PIN
  48. #define FIL_RUNOUT_PIN PC0 // XMAX plug on PCB used as filament runout sensor on Alfawise boards (inverting true)
  49. #endif
  50. //
  51. // Steppers
  52. //
  53. #define X_ENABLE_PIN PB5 // pin 91
  54. #define X_STEP_PIN PB4 // pin 90
  55. #define X_DIR_PIN PB3 // pin 89
  56. #define Y_ENABLE_PIN PB8 // pin 95
  57. #define Y_STEP_PIN PB7 // pin 93
  58. #define Y_DIR_PIN PB6 // pin 92
  59. #define Z_ENABLE_PIN PE1 // pin 98
  60. #define Z_STEP_PIN PE0 // pin 97
  61. #define Z_DIR_PIN PB9 // pin 96
  62. #define E0_ENABLE_PIN PE4 // pin 3
  63. #define E0_STEP_PIN PE3 // pin 2
  64. #define E0_DIR_PIN PE2 // pin 1
  65. //
  66. // Temperature Sensors
  67. //
  68. #define TEMP_0_PIN PA0 // pin 23 (Nozzle 100K/3950 thermistor)
  69. #define TEMP_BED_PIN PA1 // pin 24 (Hot Bed 100K/3950 thermistor)
  70. //
  71. // Heaters / Fans
  72. //
  73. #define HEATER_0_PIN PD3 // pin 84 (Nozzle Heat Mosfet)
  74. #define HEATER_BED_PIN PA8 // pin 67 (Hot Bed Mosfet)
  75. #define FAN_PIN PA15 // pin 77 (4cm Fan)
  76. #define FAN_SOFT_PWM // Required to avoid issues with heating or STLink
  77. #define FAN_MIN_PWM 35 // Fan will not start in 1-30 range
  78. #define FAN_MAX_PWM 255
  79. //#define BEEPER_PIN PD13 // pin 60 (Servo PWM output 5V/GND on Board V0G+) made for BL-Touch sensor
  80. // Can drive a PC Buzzer, if connected between PWM and 5V pins
  81. #define LED_PIN PC2 // pin 17
  82. //
  83. // PWM for a servo probe
  84. // Other servo devices are not supported on this board!
  85. //
  86. #if HAS_Z_SERVO_PROBE
  87. #define SERVO0_PIN PD13 // Open drain PWM pin on the V0G (GND or floating 5V)
  88. #define SERVO0_PWM_OD // Comment this if using PE5
  89. //#define SERVO0_PIN PE5 // Pulled up PWM pin on the V08 (3.3V or 0)
  90. //#undef Z_MAX_PIN // Uncomment if using ZMAX connector (PE5)
  91. #endif
  92. /**
  93. * Note: Alfawise screens use various TFT controllers. Supported screens
  94. * are based on the ILI9341, ILI9328 and ST7798V. Define init sequences for
  95. * other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp
  96. *
  97. * If the screen stays white, disable 'LCD_RESET_PIN' to let the bootloader
  98. * init the screen.
  99. *
  100. * Setting an 'LCD_RESET_PIN' may cause a flicker when entering the LCD menu
  101. * because Marlin uses the reset as a failsafe to revive a glitchy LCD.
  102. */
  103. #define TFT_RESET_PIN PC4 // pin 33
  104. #define TFT_BACKLIGHT_PIN PD12 // pin 59
  105. #define FSMC_CS_PIN PD7 // pin 88 = FSMC_NE1
  106. #define FSMC_RS_PIN PD11 // pin 58 A16 Register. Only one address needed
  107. #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
  108. #define FSMC_DMA_DEV DMA2
  109. #define FSMC_DMA_CHANNEL DMA_CH5
  110. #define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals_post.h
  111. #define DOGLCD_SCK -1
  112. // Longer/Alfawise TFT
  113. #define LONGER_LK_TFT28
  114. // Buffer for Color UI
  115. #define TFT_BUFFER_SIZE 3200
  116. /**
  117. * Note: Alfawise U20/U30 boards DON'T use SPI2, as the hardware designer
  118. * mixed up MOSI and MISO pins. SPI is managed in SW, and needs pins
  119. * declared below.
  120. */
  121. #if NEED_TOUCH_PINS
  122. #define TOUCH_CS_PIN PB12 // pin 51 SPI2_NSS
  123. #define TOUCH_SCK_PIN PB13 // pin 52
  124. #define TOUCH_MOSI_PIN PB14 // pin 53
  125. #define TOUCH_MISO_PIN PB15 // pin 54
  126. #define TOUCH_INT_PIN PC6 // pin 63 (PenIRQ coming from ADS7843)
  127. #endif
  128. //
  129. // Persistent Storage
  130. // If no option is selected below the SD Card will be used
  131. //
  132. #if NO_EEPROM_SELECTED
  133. //#define SPI_EEPROM
  134. #define FLASH_EEPROM_EMULATION
  135. #endif
  136. #if ENABLED(SPI_EEPROM)
  137. // SPI1 EEPROM Winbond W25Q64 (8MB/64Mbits)
  138. #define SPI_CHAN_EEPROM1 1
  139. #define SPI_EEPROM1_CS PC5 // pin 34
  140. #define EEPROM_SCK BOARD_SPI1_SCK_PIN // PA5 pin 30
  141. #define EEPROM_MISO BOARD_SPI1_MISO_PIN // PA6 pin 31
  142. #define EEPROM_MOSI BOARD_SPI1_MOSI_PIN // PA7 pin 32
  143. #define EEPROM_PAGE_SIZE 0x1000U // 4KB (from datasheet)
  144. #define MARLIN_EEPROM_SIZE 16UL * (EEPROM_PAGE_SIZE) // Limit to 64KB for now...
  145. #elif ENABLED(FLASH_EEPROM_EMULATION)
  146. // SoC Flash (framework-arduinoststm32-maple/STM32F1/libraries/EEPROM/EEPROM.h)
  147. #define EEPROM_PAGE_SIZE (0x800U) // 2KB
  148. #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL)
  149. #define MARLIN_EEPROM_SIZE (EEPROM_PAGE_SIZE)
  150. #else
  151. #define MARLIN_EEPROM_SIZE 0x800U // On SD, Limit to 2KB, require this amount of RAM
  152. #endif