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_NUCLEO_F767ZI.h 7.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  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. #ifndef STM32F767xx
  24. #error "Oops! Select an STM32F767 environment"
  25. #endif
  26. #define BOARD_INFO_NAME "NUCLEO-F767ZI"
  27. #define DEFAULT_MACHINE_NAME "Prototype Board"
  28. #if NO_EEPROM_SELECTED
  29. #define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation
  30. #endif
  31. #if ENABLED(FLASH_EEPROM_EMULATION)
  32. // Decrease delays and flash wear by spreading writes across the
  33. // 128 kB sector allocated for EEPROM emulation.
  34. // Not yet supported on F7 hardware
  35. // #define FLASH_EEPROM_LEVELING
  36. #endif
  37. /**
  38. * Timer assignments
  39. *
  40. * TIM1 -
  41. * TIM2 - Hardware PWM (Fan/Heater Pins)
  42. * TIM3 - Hardware PWM (Servo Pins)
  43. * TIM4 - STEP_TIMER (Marlin)
  44. * TIM5 -
  45. * TIM6 - TIMER_TONE (variant.h)
  46. * TIM7 - TIMER_SERVO (variant.h)
  47. * TIM9 - TIMER_SERIAL (platformio.ini)
  48. * TIM10 - For some reason trips Watchdog when used for SW Serial
  49. * TIM11 -
  50. * TIM12 -
  51. * TIM13 -
  52. * TIM14 - TEMP_TIMER (Marlin)
  53. *
  54. */
  55. #define STEP_TIMER 4
  56. #define TEMP_TIMER 14
  57. /**
  58. * These pin assignments are arbitrary and intending for testing purposes.
  59. * Assignments may not be ideal, and not every assignment has been tested.
  60. * Proceed at your own risk.
  61. * _CN7_
  62. * (X_STEP) PC6 | · · | PB8 (X_EN)
  63. * (X_DIR) PB15 | · · | PB9 (X_CS)
  64. * (LCD_D4) PB13 | · · | AVDD
  65. * _CN8_ PB12 | · · | GND
  66. * NC | · · | PC8 (HEATER_0) PA15 | · · | PA5 (SCLK)
  67. * IOREF | · · | PC9 (BEEPER) PC7 | · · | PA6 (MISO)
  68. * RESET | · · | PC10 (SERVO1_PIN) PB5 | · · | PA7 (MOSI)
  69. * +3.3V | · · | PC11 (HEATER_BED) PB3 | · · | PD14 (SD_DETECT)
  70. * +5V | · · | PC12 (SDSS) PA4 | · · | PD15 (LCD_ENABLE)
  71. * GND | · · | PD2 (SERVO0_PIN) PB4 | · · | PF12 (LCD_RS)
  72. * GND | · · | PG2  ̄ ̄ ̄
  73. * VIN | · · | PG3
  74. _*  ̄ ̄ ̄ _CN10
  75. * AVDD | · · | PF13 (BTN_EN1)
  76. * _CN9_ AGND | · · | PE9 (BTN_EN2)
  77. * (TEMP_0) PA3 | · · | PD7 GND | · · | PE11 (BTN_ENC)
  78. * (TEMP_BED) PC0 | · · | PD6 PB1 | · · | PF14
  79. * PC3 | · · | PD5 PC2 | · · | PE13
  80. * PF3 | · · | PD4 PF4 | · · | PF15
  81. * PF5 | · · | PD3 (E_STEP) PB6 | · · | PG14 (E_EN)
  82. * PF10 | · · | GND (E_DIR) PB2 | · · | PG9 (E_CS)
  83. * NC | · · | PE2 GND | · · | PE8
  84. * PA7 | · · | PE4 PD13 | · · | PE7
  85. * PF2 | · · | PE5 PD12 | · · | GND
  86. * (Y_STEP) PF1 | · · | PE6 (Y_EN) (Z_STEP) PD11 | · · | PE10 (Z_EN)
  87. * (Y_DIR) PF0 | · · | PE3 (Y_CS) (Z_DIR) PE2 | · · | PE12 (Z_CS)
  88. * GND | · · | PF8 GND | · · | PE14
  89. * (Z_MAX) PD0 | · · | PF7 (X_MIN) PA0 | · · | PE15
  90. * (Z_MIN) PD1 | · · | PF9 (X_MAX) PB0 | · · | PB10 (FAN)
  91. * (Y_MAX) PG0 | · · | PG1 (Y_MIN) PE0 | · · | PB11 (FAN1)
  92. *  ̄ ̄ ̄  ̄ ̄ ̄ ̄
  93. */
  94. #define X_MIN_PIN PF7
  95. #define X_MAX_PIN PF9
  96. #define Y_MIN_PIN PG1
  97. #define Y_MAX_PIN PG0
  98. #define Z_MIN_PIN PD1
  99. #define Z_MAX_PIN PD0
  100. //
  101. // Steppers
  102. //
  103. #define X_STEP_PIN PC6
  104. #define X_DIR_PIN PB15
  105. #define X_ENABLE_PIN PB8
  106. #define X_CS_PIN PB9
  107. #define Y_STEP_PIN PF1
  108. #define Y_DIR_PIN PF0
  109. #define Y_ENABLE_PIN PE6
  110. #define Y_CS_PIN PE3
  111. #define Z_STEP_PIN PD11
  112. #define Z_DIR_PIN PE2
  113. #define Z_ENABLE_PIN PE10
  114. #define Z_CS_PIN PE12
  115. #define E0_STEP_PIN PB6
  116. #define E0_DIR_PIN PB2
  117. #define E0_ENABLE_PIN PG14
  118. #define E0_CS_PIN PG9
  119. #if HAS_TMC_UART
  120. #define X_SERIAL_TX_PIN PB9
  121. #define X_SERIAL_RX_PIN PB9
  122. #define Y_SERIAL_TX_PIN PE3
  123. #define Y_SERIAL_RX_PIN PE3
  124. #define Z_SERIAL_TX_PIN PE12
  125. #define Z_SERIAL_RX_PIN PE12
  126. #define E_SERIAL_TX_PIN PG9
  127. #define E_SERIAL_RX_PIN PG9
  128. #endif
  129. //
  130. // Temperature Sensors
  131. //
  132. #define TEMP_0_PIN PA3
  133. #define TEMP_BED_PIN PC0
  134. //
  135. // Heaters / Fans
  136. //
  137. #define HEATER_0_PIN PA15 // PWM Capable, TIM2_CH1
  138. #define HEATER_BED_PIN PB3 // PWM Capable, TIM2_CH2
  139. #ifndef FAN_PIN
  140. #define FAN_PIN PB10 // PWM Capable, TIM2_CH3
  141. #endif
  142. #define FAN1_PIN PB11 // PWM Capable, TIM2_CH4
  143. #ifndef E0_AUTO_FAN_PIN
  144. #define E0_AUTO_FAN_PIN FAN1_PIN
  145. #endif
  146. //
  147. // Servos
  148. //
  149. #define SERVO0_PIN PB4 // PWM Capable, TIM3_CH1
  150. #define SERVO1_PIN PB5 // PWM Capable, TIM3_CH2
  151. // SPI for external SD Card (Not entirely sure this will work)
  152. #define SCK_PIN PA5
  153. #define MISO_PIN PA6
  154. #define MOSI_PIN PA7
  155. #define SS_PIN PA4
  156. #define SDSS PA4
  157. #define LED_PIN LED_BLUE
  158. //
  159. // LCD / Controller
  160. //
  161. #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
  162. #define BEEPER_PIN PC7 // LCD_BEEPER
  163. #define BTN_ENC PE11 // BTN_ENC
  164. #define SD_DETECT_PIN PD14
  165. #define LCD_PINS_RS PF12 // LCD_RS
  166. #define LCD_PINS_ENABLE PD15 // LCD_EN
  167. #define LCD_PINS_D4 PB13 // LCD_D4
  168. // #define LCD_PINS_D5
  169. // #define LCD_PINS_D6
  170. // #define LCD_PINS_D7
  171. #define BTN_EN1 PF13 // BTN_EN1
  172. #define BTN_EN2 PE9 // BTN_EN2
  173. #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
  174. #define BOARD_ST7920_DELAY_2 DELAY_NS(63)
  175. #define BOARD_ST7920_DELAY_3 DELAY_NS(780)
  176. #endif