My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  1. /*
  2. *******************************************************************************
  3. * Copyright (c) 2017, STMicroelectronics
  4. * All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without
  7. * modification, are permitted provided that the following conditions are met:
  8. *
  9. * 1. Redistributions of source code must retain the above copyright notice,
  10. * this list of conditions and the following disclaimer.
  11. * 2. Redistributions in binary form must reproduce the above copyright notice,
  12. * this list of conditions and the following disclaimer in the documentation
  13. * and/or other materials provided with the distribution.
  14. * 3. Neither the name of STMicroelectronics nor the names of its contributors
  15. * may be used to endorse or promote products derived from this software
  16. * without specific prior written permission.
  17. *
  18. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  19. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  20. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  21. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  22. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  23. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  24. * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  25. * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  26. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  27. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  28. *******************************************************************************
  29. */
  30. #ifndef _VARIANT_ARDUINO_STM32_
  31. #define _VARIANT_ARDUINO_STM32_
  32. /*----------------------------------------------------------------------------
  33. * Headers
  34. *----------------------------------------------------------------------------*/
  35. #ifdef __cplusplus
  36. extern "C" {
  37. #endif // __cplusplus
  38. /*----------------------------------------------------------------------------
  39. * Pins
  40. *----------------------------------------------------------------------------*/
  41. #if defined(ARDUINO_STEVAL)
  42. /*----------------------------------------------------------------------------
  43. * Pins
  44. *----------------------------------------------------------------------------*/
  45. // USART1_MAIN
  46. #define PA9 0 //TX
  47. #define PA10 1 //RX
  48. // WIFI
  49. #define PD3 2 // CTS
  50. #define PD4 3 // RTS
  51. #define PD5 4 // TX
  52. #define PD6 5 // RX
  53. #define PB5 6 // WIFI_WAKEUP
  54. #define PE11 7 // WIFI_RESET
  55. #define PE12 8 // WIFI_BOOT
  56. // STATUS_LED
  57. #define PE1 9 // STATUS_LED
  58. // SPI USER
  59. #define PB12 10 // SPI_CS
  60. #define PB15 11 // SPI_MOSI
  61. #define PB14 12 // SPI_MISO
  62. #define PB13 13 // SPI_SCK
  63. // I2C USER
  64. #define PB7 14 // SDA
  65. #define PB6 15 // SCL
  66. // SPI
  67. #define PA4 16 // SPI_CS
  68. #define PA5 17 // SPI_SCK
  69. #define PA6 18 // SPI_MISO
  70. #define PA7 19 // SPI_MOSI
  71. // JTAG
  72. #define PA13 20 // JTAG_TMS/SWDIO
  73. #define PA14 21 // JTAG_TCK/SWCLK
  74. #define PB3 22 // JTAG_TDO/SWO
  75. // SDCARD
  76. #define PC8 23 // SDIO_D0
  77. #define PC9 24 // SDIO_D1
  78. #define PA15 25 // SD_CARD_DETECT
  79. #define PC10 26 // SDIO_D2
  80. #define PC11 27 // SDIO_D3
  81. #define PC12 28 // SDIO_CK
  82. #define PD2 29 // SDIO_CMD
  83. // OTG
  84. #define PA11 30 //OTG_DM
  85. #define PA12 31 //OTG_DP
  86. // IR/PROBE
  87. #define PD1 32 //IR_OUT
  88. #define PC1 33 //IR_ON
  89. // USER_PINS
  90. #define PD7 34 // USER3
  91. #define PB9 35 // USER1
  92. #define PE0 36 // USER2
  93. #define PB4 37 // USER4
  94. // USERKET
  95. #define PE7 38 // USER_BUTTON
  96. // ENDSTOPS
  97. #define PD8 39 // X_STOP
  98. #define PD9 40 // Y_STOP
  99. #define PD10 41 // Z_STOP
  100. #define PD11 42 // U_STOP
  101. #define PA8 43 // V_STOP
  102. #define PD0 44 // W_STOP
  103. // HEATERS
  104. #define PD13 45 // BED_HEAT_2
  105. #define PD14 46 // BED_HEAT_1
  106. #define PD15 47 // BED_HEAT_3
  107. #define PC7 48 // E1_HEAT_PWM
  108. #define PB0 49 // E2_HEAT_PWM
  109. #define PB1 50 // E3_HEAT_PWM
  110. // THERMISTOR
  111. #define PC2 51 // BED_THERMISTOR_1
  112. #define PC3 52 // BED_THERMISTOR_2
  113. #define PA3 53 // BED_THERMISTOR_3
  114. #define PA0 54 // E1_THERMISTOR
  115. #define PA1 55 // E2_THERMISTOR
  116. #define PA2 56 // E3_THERMISTOR
  117. // FANS
  118. #define PC4 57 // E1_FAN
  119. #define PC5 58 // E2_FAN
  120. #define PE8 59 // E3_FAN
  121. // X_MOTOR
  122. #define PE13 60 // X_RESET
  123. #define PE14 61 // X_PWM
  124. #define PE15 62 // X_DIR
  125. // Y_MOTOR
  126. #define PE10 63 // Y_RESET
  127. #define PB10 64 // Y_PWM
  128. #define PE9 65 // Y_DIR
  129. // Z_MOTOR
  130. #define PC15 66 // Z_RESET
  131. #define PC6 67 // Z_PWM
  132. #define PC0 68 // Z_DIR
  133. // E1_MOTOR
  134. #define PC14 69 // E1_RESET
  135. #define PC13 70 // E1_DIR
  136. #define PD12 71 // E1_PWM
  137. // E2_MOTOR
  138. #define PE4 72 // E2_RESET
  139. #define PE5 73 // E2_PWM
  140. #define PE6 74 // E2_DIR
  141. // E3_MOTOR
  142. #define PE3 75 // E3_RESET
  143. #define PE2 76 // E3_DIR
  144. #define PB8 77 // E3_PWM
  145. // This must be a literal
  146. #define NUM_DIGITAL_PINS 78
  147. // This must be a literal with a value less than or equal to to MAX_ANALOG_INPUTS
  148. #define NUM_ANALOG_INPUTS 6
  149. #define NUM_ANALOG_FIRST 51
  150. // On-board LED pin number
  151. #define LED_BUILTIN PE1
  152. #define LED_GREEN LED_BUILTIN
  153. // On-board user button
  154. #define USER_BTN PE7
  155. // UART Definitions
  156. #define SERIAL_UART_INSTANCE 1 //Connected to ST-Link
  157. // Default pin used for 'Serial' instance (ex: ST-Link)
  158. // Mandatory for Firmata
  159. #define PIN_SERIAL_RX PA10
  160. #define PIN_SERIAL_TX PA9
  161. /* SD detect signal */
  162. /*
  163. * By default, R67 is not provided, so SD card detect is not used.
  164. * Note: SD CD (pin 16 of expansion connector J23) can be connected
  165. * to GND in order to be able to use SD_DETECT_PIN
  166. */
  167. /*#define SD_DETECT_PIN PA15*/
  168. /* HAL configuration */
  169. #define HSE_VALUE 25000000U
  170. /* Extra HAL modules */
  171. #define HAL_SD_MODULE_ENABLED
  172. #endif
  173. #ifdef __cplusplus
  174. } // extern "C"
  175. #endif
  176. /*----------------------------------------------------------------------------
  177. * Arduino objects - C++ only
  178. *----------------------------------------------------------------------------*/
  179. #ifdef __cplusplus
  180. // These serial port names are intended to allow libraries and architecture-neutral
  181. // sketches to automatically default to the correct port name for a particular type
  182. // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
  183. // the first hardware serial port whose RX/TX pins are not dedicated to another use.
  184. //
  185. // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
  186. //
  187. // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
  188. //
  189. // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
  190. //
  191. // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
  192. //
  193. // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
  194. // pins are NOT connected to anything by default.
  195. #define SERIAL_PORT_MONITOR Serial
  196. #define SERIAL_PORT_HARDWARE Serial1
  197. #endif
  198. #endif // _VARIANT_ARDUINO_STM32_
  199. // PA0 54 // E1_THERMISTOR
  200. // PA1 55 // E2_THERMISTOR
  201. // PA2 56 // E3_THERMISTOR
  202. // PA3 53 // BED_THERMISTOR_3
  203. // PA4 16 // SPI_CS
  204. // PA5 17 // SPI_SCK
  205. // PA6 18 // SPI_MISO
  206. // PA7 19 // SPI_MOSI
  207. // PA8 43 // V_STOP
  208. // PA9 0 //TX
  209. // PA10 1 //RX
  210. // PA11 30 //OTG_DM
  211. // PA12 31 //OTG_DP
  212. // PA13 20 // JTAG_TMS/SWDIO
  213. // PA14 21 // JTAG_TCK/SWCLK
  214. // PA15 25 // SD_CARD_DETECT
  215. // PB0 49 // E2_HEAT_PWM
  216. // PB1 50 // E3_HEAT_PWM
  217. // PB3 22 // JTAG_TDO/SWO
  218. // PB4 37 // USER4
  219. // PB5 6 // WIFI_WAKEUP
  220. // PB6 15 // SCL
  221. // PB7 14 // SDA
  222. // PB8 77 // E3_PWM
  223. // PB9 35 // USER1
  224. // PB10 64 // Y_PWM
  225. // PB12 10 // SPI_CS
  226. // PB13 13 // SPI_SCK
  227. // PB14 12 // SPI_MISO
  228. // PB15 11 // SPI_MOSI
  229. // PC0 68 // Z_DIR
  230. // PC1 33 //IR_ON
  231. // PC2 51 // BED_THERMISTOR_1
  232. // PC3 52 // BED_THERMISTOR_2
  233. // PC4 57 // E1_FAN
  234. // PC5 58 // E2_FAN
  235. // PC6 67 // Z_PWM
  236. // PC7 48 // E1_HEAT_PWM
  237. // PC8 23 // SDIO_D0
  238. // PC9 24 // SDIO_D1
  239. // PC10 26 // SDIO_D2
  240. // PC11 27 // SDIO_D3
  241. // PC12 28 // SDIO_CK
  242. // PC13 70 // E1_DIR
  243. // PC14 69 // E1_RESET
  244. // PC15 66 // Z_RESET
  245. // PD0 44 // W_STOP
  246. // PD1 32 //IR_OUT
  247. // PD2 29 // SDIO_CMD
  248. // PD3 2 // CTS
  249. // PD4 3 // RTS
  250. // PD5 4 // TX
  251. // PD6 5 // RX
  252. // PD7 34 // USER3
  253. // PD8 39 // X_STOP
  254. // PD9 40 // Y_STOP
  255. // PD10 41 // Z_STOP
  256. // PD11 42 // U_STOP
  257. // PD12 71 // E1_PWM
  258. // PD13 45 // BED_HEAT_2
  259. // PD14 46 // BED_HEAT_1
  260. // PD15 47 // BED_HEAT_3
  261. // PE0 36 // USER2
  262. // PE1 9 // STATUS_LED
  263. // PE2 76 // E3_DIR
  264. // PE3 75 // E3_RESET
  265. // PE4 72 // E2_RESET
  266. // PE5 73 // E2_PWM
  267. // PE6 74 // E2_DIR
  268. // PE7 38 // USER_BUTTON
  269. // PE8 59 // E3_FAN
  270. // PE9 65 // Y_DIR
  271. // PE10 63 // Y_RESET
  272. // PE11 7 // WIFI_RESET
  273. // PE12 8 // WIFI_BOOT
  274. // PE13 60 // X_RESET
  275. // PE14 61 // X_PWM
  276. // PE15 62 // X_DIR