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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2019 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 <http://www.gnu.org/licenses/>.
  17. *
  18. */
  19. #pragma once
  20. /**
  21. * Longer3D LK1/LK2 & Alfawise U20/U30 (STM32F103VET6) board pin assignments
  22. */
  23. #if !defined(__STM32F1__) && !defined(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_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. //
  44. // Filament Sensor
  45. //
  46. #ifndef FIL_RUNOUT_PIN
  47. #define FIL_RUNOUT_PIN PC0 // XMAX plug on PCB used as filament runout sensor on Alfawise boards (inverting true)
  48. #endif
  49. //
  50. // Steppers
  51. //
  52. #define X_ENABLE_PIN PB5 // pin 91
  53. #define X_STEP_PIN PB4 // pin 90
  54. #define X_DIR_PIN PB3 // pin 89
  55. #define Y_ENABLE_PIN PB8 // pin 95
  56. #define Y_STEP_PIN PB7 // pin 93
  57. #define Y_DIR_PIN PB6 // pin 92
  58. #define Z_ENABLE_PIN PE1 // pin 98
  59. #define Z_STEP_PIN PE0 // pin 97
  60. #define Z_DIR_PIN PB9 // pin 96
  61. #define E0_ENABLE_PIN PE4 // pin 3
  62. #define E0_STEP_PIN PE3 // pin 2
  63. #define E0_DIR_PIN PE2 // pin 1
  64. //
  65. // Temperature Sensors
  66. //
  67. #define TEMP_0_PIN PA0 // pin 23 (Nozzle 100K/3950 thermistor)
  68. #define TEMP_BED_PIN PA1 // pin 24 (Hot Bed 100K/3950 thermistor)
  69. //
  70. // Heaters / Fans
  71. //
  72. #define HEATER_0_PIN PD3 // pin 84 (Nozzle Heat Mosfet)
  73. #define HEATER_BED_PIN PA8 // pin 67 (Hot Bed Mosfet)
  74. #define FAN_PIN PA15 // pin 77 (4cm Fan)
  75. #define FAN_SOFT_PWM // Required to avoid issues with heating or STLink
  76. #define FAN_MIN_PWM 35 // Fan will not start in 1-30 range
  77. #define FAN_MAX_PWM 255
  78. //#define BEEPER_PIN PD13 // pin 60 (Servo PWM output 5V/GND on Board V0G+) made for BL-Touch sensor
  79. // Can drive a PC Buzzer, if connected between PWM and 5V pins
  80. #define LED_PIN PC2 // pin 17
  81. //
  82. // PWM
  83. //
  84. #define SERVO0_PIN PD13 // Open drain PWM pin on the V0G (GND or floating 5V)
  85. #define SERVO0_PWM_OD // Comment this if using PE5
  86. //#define SERVO0_PIN PE5 // Pulled up PWM pin on the V08 (3.3V or 0)
  87. /**
  88. * Note: Alfawise screens use various TFT controllers. Supported screens
  89. * are based on the ILI9341, ILI9328 and ST7798V. Define init sequences for
  90. * other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp
  91. *
  92. * If the screen stays white, disable 'LCD_RESET_PIN' to let the bootloader
  93. * init the screen.
  94. *
  95. * Setting an 'LCD_RESET_PIN' may cause a flicker when entering the LCD menu
  96. * because Marlin uses the reset as a failsafe to revive a glitchy LCD.
  97. */
  98. #define LCD_RESET_PIN PC4 // pin 33
  99. #define LCD_BACKLIGHT_PIN PD12 // pin 59
  100. #define FSMC_CS_PIN PD7 // pin 88 = FSMC_NE1
  101. #define FSMC_RS_PIN PD11 // pin 58 A16 Register. Only one address needed
  102. #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
  103. #define FSMC_DMA_DEV DMA2
  104. #define FSMC_DMA_CHANNEL DMA_CH5
  105. #define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals_post.h
  106. #define DOGLCD_SCK -1
  107. /**
  108. * Note: Alfawise U20/U30 boards DON'T use SPI2, as the hardware designer
  109. * mixed up MOSI and MISO pins. SPI is managed in SW, and needs pins
  110. * declared below.
  111. */
  112. #if ENABLED(TOUCH_BUTTONS)
  113. #define TOUCH_CS_PIN PB12 // pin 51 SPI2_NSS
  114. #define TOUCH_SCK_PIN PB13 // pin 52
  115. #define TOUCH_MOSI_PIN PB14 // pin 53
  116. #define TOUCH_MISO_PIN PB15 // pin 54
  117. #define TOUCH_INT_PIN PC6 // pin 63 (PenIRQ coming from ADS7843)
  118. #define BTN_ENC PB0 // pin 35 unconnected pin on Alfawise. (PC13 to try)
  119. #define BTN_EN1 -1 // Real pin is needed to enable encoder's push button
  120. #define BTN_EN2 -1 // functionality used by touch screen
  121. #endif
  122. //
  123. // SPI1 (EEPROM W25Q64 + DAC OUT)
  124. //
  125. #undef E2END
  126. #define E2END 0x7FF // EEPROM end address (reserve 2kB on sd/sram, real spi one is 8MB/64Mbits)
  127. /*
  128. #define SPI_EEPROM 1 // If commented this will create a file on the SD card as a replacement
  129. #define SPI_CHAN_EEPROM1 1
  130. #define SPI_EEPROM1_CS PC5 // pin 34
  131. //#define EEPROM_SCK BOARD_SPI1_SCK_PIN // PA5 pin 30
  132. //#define EEPROM_MISO BOARD_SPI1_MISO_PIN // PA6 pin 31
  133. //#define EEPROM_MOSI BOARD_SPI1_MOSI_PIN // PA7 pin 32
  134. */