SHARE
TWEET

pins_BTT_SKR_PRO_V1_1

a guest Jan 22nd, 2020 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * Marlin 3D Printer Firmware
  3.  * Copyright (c) 2019 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. #pragma once
  23.  
  24. #ifndef TARGET_STM32F4
  25.   #error "Oops! Select an STM32F4 board in 'Tools > Board.'"
  26. #elif HOTENDS > 3 || E_STEPPERS > 3
  27.   #error "BIGTREE SKR Pro V1.1 supports up to 3 hotends / E-steppers."
  28. #endif
  29.  
  30. #define BOARD_INFO_NAME "BIGTREE SKR Pro 1.1" // redefined?
  31.  
  32. // Use one of these or SDCard-based Emulation will be used
  33. //#define SRAM_EEPROM_EMULATION   // Use BackSRAM-based EEPROM emulation
  34. #define FLASH_EEPROM_EMULATION  // Use Flash-based EEPROM emulation
  35.  
  36. //
  37. // Servos
  38. //
  39. #define SERVO0_PIN         PA1
  40.  
  41. //
  42. // Limit Switches
  43. //
  44. #define X_MIN_PIN          PG5
  45. //#define X_MAX_PIN          
  46. #define Y_MIN_PIN          PE12
  47. //#define Y_MAX_PIN          
  48. #define Z_MIN_PIN          PG8
  49. //#define Z_MAX_PIN          PG5
  50.  
  51. //
  52. // Z Probe must be this pins
  53. //
  54. #ifndef Z_MIN_PROBE_PIN
  55.   #define Z_MIN_PROBE_PIN  PA2
  56. #endif
  57.  
  58. //
  59. // Steppers
  60. //
  61. #define X_STEP_PIN         PE9
  62. #define X_DIR_PIN          PF1
  63. #define X_ENABLE_PIN       PF2
  64. #ifndef X_CS_PIN
  65.   #define X_CS_PIN         PA15
  66. #endif
  67.  
  68. #define Y_STEP_PIN         PE11
  69. #define Y_DIR_PIN          PE8
  70. #define Y_ENABLE_PIN       PD7
  71.  #ifndef Y_CS_PIN
  72.   #define Y_CS_PIN         PB8
  73. #endif
  74.  
  75. #define Z_STEP_PIN         PE13
  76. #define Z_DIR_PIN          PC2
  77. #define Z_ENABLE_PIN       PC0
  78. #ifndef Z_CS_PIN
  79.   #define Z_CS_PIN         PB9
  80. #endif
  81.  
  82. #define E0_STEP_PIN        PE14
  83. #define E0_DIR_PIN         PA0
  84. #define E0_ENABLE_PIN      PC3
  85. #ifndef E0_CS_PIN
  86.   #define E0_CS_PIN        PB3
  87. #endif
  88.  
  89. #define E1_STEP_PIN        PD15
  90. #define E1_DIR_PIN         PE7
  91. #define E1_ENABLE_PIN      PA3
  92. #ifndef E1_CS_PIN
  93.   #define E1_CS_PIN        PG15
  94. #endif
  95.  
  96. #define E2_STEP_PIN        PD13
  97. #define E2_DIR_PIN         PG9
  98. #define E2_ENABLE_PIN      PF0
  99. #ifndef E2_CS_PIN
  100.   #define E2_CS_PIN        PG12
  101. #endif
  102.  
  103. //
  104. // Software SPI pins for TMC2130 stepper drivers
  105. //
  106. #if ENABLED(TMC_USE_SW_SPI)
  107.   #ifndef TMC_SW_MOSI
  108.     #define TMC_SW_MOSI    PC12
  109.   #endif
  110.   #ifndef TMC_SW_MISO
  111.     #define TMC_SW_MISO    PC11
  112.   #endif
  113.   #ifndef TMC_SW_SCK
  114.     #define TMC_SW_SCK     PC10
  115.   #endif
  116. #endif
  117.  
  118. #if HAS_TMC220x
  119.   /**
  120.    * TMC2208/TMC2209 stepper drivers
  121.    *
  122.    * Hardware serial communication ports.
  123.    * If undefined software serial is used according to the pins below
  124.    */
  125.   //#define X_HARDWARE_SERIAL  Serial
  126.   //#define X2_HARDWARE_SERIAL Serial1
  127.   //#define Y_HARDWARE_SERIAL  Serial1
  128.   //#define Y2_HARDWARE_SERIAL Serial1
  129.   //#define Z_HARDWARE_SERIAL  Serial1
  130.   //#define Z2_HARDWARE_SERIAL Serial1
  131.   //#define E0_HARDWARE_SERIAL Serial1
  132.   //#define E1_HARDWARE_SERIAL Serial1
  133.   //#define E2_HARDWARE_SERIAL Serial1
  134.   //#define E3_HARDWARE_SERIAL Serial1
  135.   //#define E4_HARDWARE_SERIAL Serial1
  136.  
  137.   //
  138.   // Software serial
  139.   //
  140.   #define X_SERIAL_TX_PIN  PC13
  141.   #define X_SERIAL_RX_PIN  PC13
  142.  
  143.   #define Y_SERIAL_TX_PIN  PE3
  144.   #define Y_SERIAL_RX_PIN  PE3
  145.  
  146.   #define Z_SERIAL_TX_PIN  PE1
  147.   #define Z_SERIAL_RX_PIN  PE1
  148.  
  149.   #define E0_SERIAL_TX_PIN PD4
  150.   #define E0_SERIAL_RX_PIN PD4
  151.  
  152.   #define E1_SERIAL_TX_PIN PD1
  153.   #define E1_SERIAL_RX_PIN PD1
  154.  
  155.   #define E2_SERIAL_TX_PIN PD6
  156.   #define E2_SERIAL_RX_PIN PD6
  157.  
  158.   // Reduce baud rate to improve software serial reliability
  159.   #define TMC_BAUD_RATE 19200
  160. #endif
  161.  
  162. //
  163. // Temperature Sensors
  164. //
  165. #define TEMP_0_PIN         PF4  // T1 <-> E0
  166. #define TEMP_1_PIN         PF5  // T2 <-> E1
  167. #define TEMP_2_PIN         PF6  // T3 <-> E2
  168. #define TEMP_BED_PIN       PF3  // T0 <-> Bed
  169.  
  170. //
  171. // Heaters / Fans
  172. //
  173. #define HEATER_0_PIN       PB1  // Heater0
  174. #define HEATER_1_PIN       PD14 // Heater1
  175. #define HEATER_2_PIN       PB0  // Heater1
  176. #define HEATER_BED_PIN     PD12 // Hotbed
  177. #define FAN_PIN            PC8  // Fan0
  178. #define FAN1_PIN           PE5  // Fan1
  179. #define FAN2_PIN           PE6  // Fan2
  180.  
  181. //
  182. // Misc. Functions
  183. //
  184. #define SDSS               PB12
  185.  
  186. /**
  187.  *               _____                                             _____
  188.  *           NC | · · | GND                                    5V | · · | GND
  189.  *        RESET | · · | PF12(SD_DETECT)             (LCD_D7)  PG7 | · · | PG6  (LCD_D6)
  190.  *   (MOSI)PB15 | · · | PF11(BTN_EN2)               (LCD_D5)  PG3 | · · | PG2  (LCD_D4)
  191.  *  (SD_SS)PB12 | · · | PG10(BTN_EN1)               (LCD_RS) PD10 | · · | PD11 (LCD_EN)
  192.  *    (SCK)PB13 | · · | PB14(MISO)                 (BTN_ENC)  PA8 | · · | PG4  (BEEPER)
  193.  *                ̄ ̄                                                ̄ ̄
  194.  *               EXP2                                              EXP1
  195.  */
  196.  
  197. //
  198. // LCDs and Controllers
  199. //
  200. #if HAS_SPI_LCD
  201.   #define BEEPER_PIN       PG4
  202.   #define BTN_ENC          PA8
  203.  
  204.   #if ENABLED(CR10_STOCKDISPLAY)
  205.     #define LCD_PINS_RS    PG6
  206.  
  207.     #define BTN_EN1        PD11
  208.     #define BTN_EN2        PG2
  209.  
  210.     #define LCD_PINS_ENABLE PG7
  211.     #define LCD_PINS_D4    PG3
  212.  
  213.     // CR10_Stock Display needs a different delay setting on SKR PRO v1.1, so undef it here.
  214.     // It will be defined again at the #HAS_GRAPHICAL_LCD section below.
  215.     #undef ST7920_DELAY_1
  216.     #undef ST7920_DELAY_2
  217.     #undef ST7920_DELAY_3
  218.  
  219.  
  220.   #else
  221.  
  222.     #define LCD_PINS_RS    PD10
  223.  
  224.     #define BTN_EN1        PG10
  225.     #define BTN_EN2        PF11
  226.     #define SD_DETECT_PIN  PF12
  227.  
  228.     #define LCD_SDSS       PB12
  229.  
  230.     #define LCD_PINS_ENABLE PD11
  231.     #define LCD_PINS_D4    PG2
  232.  
  233.     #if ENABLED(FYSETC_MINI_12864)
  234.       #define DOGLCD_CS    PD11
  235.       #define DOGLCD_A0    PD10
  236.       //#define LCD_BACKLIGHT_PIN -1
  237.       #define LCD_RESET_PIN PG2   // Must be high or open for LCD to operate normally.
  238.       #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
  239.         #ifndef RGB_LED_R_PIN
  240.           #define RGB_LED_R_PIN PG3
  241.         #endif
  242.         #ifndef RGB_LED_G_PIN
  243.           #define RGB_LED_G_PIN PG6
  244.         #endif
  245.         #ifndef RGB_LED_B_PIN
  246.           #define RGB_LED_B_PIN PG7
  247.         #endif
  248.       #elif ENABLED(FYSETC_MINI_12864_2_1)
  249.         #define NEOPIXEL_PIN    PG3
  250.       #endif
  251.     #endif // !FYSETC_MINI_12864
  252.  
  253.     #if ENABLED(ULTIPANEL)
  254.       #define LCD_PINS_D5  PG3
  255.       #define LCD_PINS_D6  PG6
  256.       #define LCD_PINS_D7  PG7
  257.     #endif
  258.  
  259.   #endif
  260.  
  261.   // Alter timing for graphical display
  262.   #if HAS_GRAPHICAL_LCD
  263.     #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
  264.     #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
  265.     #define BOARD_ST7920_DELAY_3 DELAY_NS(600)
  266.   #endif
  267.  
  268. #endif // HAS_SPI_LCD
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top