pins_BLACKPILL_CUSTOM.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2023 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. #include "env_validate.h"
  24. #ifndef BOARD_INFO_NAME
  25. #define BOARD_INFO_NAME "Custom Blackpill"
  26. #endif
  27. #ifndef DEFAULT_MACHINE_NAME
  28. #define DEFAULT_MACHINE_NAME "SLA Printer"
  29. #endif
  30. #define DISABLE_DEBUG false // DISABLE_(DEBUG|JTAG) is not supported for STM32F4.
  31. #define ALLOW_STM32F4
  32. #define BOARD_NO_NATIVE_USB
  33. //
  34. // EEPROM
  35. //
  36. #if NO_EEPROM_SELECTED
  37. #define IIC_BL24CXX_EEPROM // EEPROM on I2C-0
  38. //#define SDCARD_EEPROM_EMULATION
  39. #endif
  40. //
  41. // Servos
  42. //
  43. #if !defined(SERVO0_PIN) && !defined(HAS_PIN_27_BOARD)
  44. #define SERVO0_PIN PC13 // BLTouch OUT
  45. #endif
  46. #define LED_PIN PC13
  47. //
  48. // Limit Switches
  49. //
  50. #define Z_STOP_PIN PA15
  51. #define X_STOP_PIN PA11
  52. #define Y_STOP_PIN PA12
  53. //
  54. // Filament Runout Sensor
  55. //
  56. #define FIL_RUNOUT_PIN PB15 // "Pulled-high"
  57. //
  58. // Steppers
  59. //
  60. #define X_STEP_PIN PB0
  61. #define X_DIR_PIN PB1
  62. #define X_ENABLE_PIN PB2 // Shared
  63. #define Y_STEP_PIN PB3
  64. #define Y_DIR_PIN PB4
  65. #define Y_ENABLE_PIN X_ENABLE_PIN
  66. #define Z_STEP_PIN PB8
  67. #define Z_DIR_PIN PB5
  68. #define Z_ENABLE_PIN X_ENABLE_PIN
  69. #define E0_STEP_PIN PB9
  70. #define E0_DIR_PIN PB10
  71. #define E0_ENABLE_PIN X_ENABLE_PIN
  72. //
  73. // Temperature Sensors
  74. //
  75. #define TEMP_0_PIN PA0 // TH1
  76. #define TEMP_BED_PIN PA1 // TB1
  77. //
  78. // Heaters / Fans
  79. //
  80. #define HEATER_BED_PIN PA2 // HOT BED
  81. #define FAN1_PIN PA8 // extruder fan
  82. #define HEATER_0_PIN PA3 // HEATER1
  83. //
  84. // Encoder pins
  85. //
  86. #if ENABLED(OLED_PANEL_TINYBOY2)
  87. #define BTN_EN1 PB12
  88. #define BTN_EN2 PB13
  89. #define BTN_ENC PB14
  90. #define BEEPER_PIN PC15
  91. #endif
  92. //
  93. // SD Card
  94. //
  95. #define ONBOARD_SPI_DEVICE 1
  96. // #define ONBOARD_SD_CS_PIN PA4 // SDSS
  97. #define SD_DETECT_PIN -1
  98. #define SDCARD_CONNECTION ONBOARD
  99. //#define ONBOARD_SDIO
  100. #define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer
  101. #if SD_CONNECTION_IS(ONBOARD)
  102. #define SDSS PA4
  103. #define SD_SCK_PIN PA5
  104. #define SD_MISO_PIN PA6
  105. #define SD_MOSI_PIN PA7
  106. #endif
  107. // Pins for documentation and sanity checks only.
  108. // Changing these will not change the pin they are on.
  109. // Hardware UART pins
  110. #define UART1_TX_PIN PA9 // default uses CH340 RX
  111. #define UART1_RX_PIN PA10 // default uses CH340 TX
  112. #define UART2_TX_PIN PA2 // default uses HEATER_BED_PIN
  113. #define UART2_RX_PIN PA3 // not connected
  114. #define UART3_TX_PIN PB10 // default uses LCD connector
  115. #define UART3_RX_PIN PB11 // default uses LCD connector
  116. #define UART4_TX_PIN PC10 // default uses sdcard SDIO_D2
  117. #define UART4_RX_PIN PC11 // default uses sdcard SDIO_D3
  118. #define UART5_TX_PIN PC12 // default uses sdcard SDIO_CK
  119. #define UART5_RX_PIN PD2 // default uses sdcard SDIO_CMD