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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (C) 2016 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. #if !defined(STM32F4)
  23. #error "Oops! Make sure you have an STM32F4 board selected from the 'Tools -> Boards' menu."
  24. #endif
  25. #define DEFAULT_MACHINE_NAME "STM32F407VET6"
  26. #define BOARD_NAME "STM32F4 Board"
  27. // #define I2C_EEPROM
  28. #define E2END 0xFFF // EEPROM end address (4kB)
  29. // Ignore temp readings during develpment.
  30. // #define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
  31. #if E_STEPPERS > 2 || HOTENDS > 2
  32. #error "STM32F4 supports up to 2 hotends / E-steppers."
  33. #endif
  34. //
  35. // Limit Switches
  36. //
  37. #define X_MIN_PIN PE0
  38. #define X_MAX_PIN -1
  39. #define Y_MIN_PIN PE1
  40. #define Y_MAX_PIN -1
  41. #define Z_MIN_PIN PE14
  42. #define Z_MAX_PIN -1
  43. //
  44. // Z Probe (when not Z_MIN_PIN)
  45. //
  46. // #ifndef Z_MIN_PROBE_PIN
  47. // #define Z_MIN_PROBE_PIN PA4
  48. // #endif
  49. //
  50. // Steppers
  51. //
  52. #define X_STEP_PIN PD3
  53. #define X_DIR_PIN PD2
  54. #define X_ENABLE_PIN PD0
  55. // #ifndef X_CS_PIN
  56. // #define X_CS_PIN PD1
  57. // #endif
  58. #define Y_STEP_PIN PE11
  59. #define Y_DIR_PIN PE10
  60. #define Y_ENABLE_PIN PE13
  61. // #ifndef Y_CS_PIN
  62. // #define Y_CS_PIN PE12
  63. // #endif
  64. #define Z_STEP_PIN PD6
  65. #define Z_DIR_PIN PD7
  66. #define Z_ENABLE_PIN PD4
  67. // #ifndef Z_CS_PIN
  68. // #define Z_CS_PIN PD5
  69. // #endif
  70. #define E0_STEP_PIN PB5
  71. #define E0_DIR_PIN PB6
  72. #define E0_ENABLE_PIN PB3
  73. // #ifndef E0_CS_PIN
  74. // #define E0_CS_PIN PB4
  75. // #endif
  76. #define E1_STEP_PIN PE4
  77. #define E1_DIR_PIN PE2
  78. #define E1_ENABLE_PIN PE3
  79. // #ifndef E1_CS_PIN
  80. // #define E1_CS_PIN PE5
  81. // #endif
  82. #define SCK_PIN PA5
  83. #define MISO_PIN PA6
  84. #define MOSI_PIN PA7
  85. //
  86. // Temperature Sensors
  87. //
  88. #define TEMP_0_PIN PC0 // Analog Input
  89. #define TEMP_1_PIN PC1 // Analog Input
  90. #define TEMP_BED_PIN PC2 // Analog Input
  91. //
  92. // Heaters / Fans
  93. //
  94. #define HEATER_0_PIN PA1
  95. #define HEATER_1_PIN PA2
  96. #define HEATER_BED_PIN PA0
  97. #define FAN_PIN PC6
  98. #define FAN1_PIN PC7
  99. #define FAN2_PIN PC8
  100. #define ORIG_E0_AUTO_FAN_PIN FAN1_PIN // Use this by NOT overriding E0_AUTO_FAN_PIN
  101. //
  102. // Misc. Functions
  103. //
  104. //#define CASE_LIGHT_PIN_CI PF13
  105. //#define CASE_LIGHT_PIN_DO PF14
  106. //#define NEOPIXEL_PIN PF13
  107. //
  108. // Prusa i3 MK2 Multi Material Multiplexer Support
  109. //
  110. // #define E_MUX0_PIN PG3
  111. // #define E_MUX1_PIN PG4
  112. //
  113. // Servos
  114. //
  115. // #define SERVO0_PIN PE13
  116. // #define SERVO1_PIN PE14
  117. #define SDSS PE7
  118. #define SS_PIN PE7
  119. #define LED_PIN PB7 //Alive
  120. #define PS_ON_PIN PA10
  121. #define KILL_PIN PA8
  122. #define PWR_LOSS PA4 //Power loss / nAC_FAULT
  123. //
  124. // LCD / Controller
  125. //
  126. #define SD_DETECT_PIN PA15
  127. #define BEEPER_PIN PC9
  128. #define LCD_PINS_RS PE9
  129. #define LCD_PINS_ENABLE PE8
  130. #define LCD_PINS_D4 PB12
  131. #define LCD_PINS_D5 PB13
  132. #define LCD_PINS_D6 PB14
  133. #define LCD_PINS_D7 PB15
  134. #define BTN_EN1 PC4
  135. #define BTN_EN2 PC5
  136. #define BTN_ENC PC3
  137. //
  138. // Filament runout
  139. //
  140. #define FIL_RUNOUT_PIN PA3
  141. //
  142. // ST7920 Delays
  143. //
  144. #define STM_NOP __asm__("nop\n\t")
  145. #define STM_DELAY_SHORT { STM_NOP; STM_NOP; STM_NOP; STM_NOP; }
  146. #define STM_DELAY_LONG { STM_DELAY_SHORT; STM_DELAY_SHORT; STM_NOP; STM_NOP; }
  147. #ifndef ST7920_DELAY_1
  148. #define ST7920_DELAY_1 { STM_DELAY_SHORT; STM_DELAY_SHORT; }
  149. #endif
  150. #ifndef ST7920_DELAY_2
  151. #define ST7920_DELAY_2 { STM_DELAY_SHORT; }
  152. #endif
  153. #ifndef ST7920_DELAY_3
  154. #define ST7920_DELAY_3 { STM_DELAY_LONG; STM_DELAY_LONG; STM_DELAY_LONG; STM_DELAY_LONG; STM_DELAY_LONG; STM_DELAY_LONG; }
  155. #endif