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.

board.h 6.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. /******************************************************************************
  2. * The MIT License
  3. *
  4. * Copyright (c) 2011 LeafLabs, LLC.
  5. *
  6. * Permission is hereby granted, free of charge, to any person
  7. * obtaining a copy of this software and associated documentation
  8. * files (the "Software"), to deal in the Software without
  9. * restriction, including without limitation the rights to use, copy,
  10. * modify, merge, publish, distribute, sublicense, and/or sell copies
  11. * of the Software, and to permit persons to whom the Software is
  12. * furnished to do so, subject to the following conditions:
  13. *
  14. * The above copyright notice and this permission notice shall be
  15. * included in all copies or substantial portions of the Software.
  16. *
  17. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  18. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  19. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  20. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  21. * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  22. * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  23. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  24. * SOFTWARE.
  25. *****************************************************************************/
  26. /**
  27. * @file maple_RET6.h
  28. * @author Marti Bolivar <mbolivar@leaflabs.com>
  29. * @brief Private include file for Maple RET6 Edition in boards.h
  30. *
  31. * See maple.h for more information on these definitions.
  32. */
  33. #ifndef _BOARDS_GENERIC_STM32F103Z_H_
  34. #define _BOARDS_GENERIC_STM32F103Z_H_
  35. /* A few of these values will seem strange given that it's a
  36. * high-density board. */
  37. #define CYCLES_PER_MICROSECOND 72
  38. #define SYSTICK_RELOAD_VAL (F_CPU/1000) - 1 /* takes a cycle to reload */
  39. // USARTS
  40. #define BOARD_NR_USARTS 5
  41. #define BOARD_USART1_TX_PIN PA9
  42. #define BOARD_USART1_RX_PIN PA10
  43. #define BOARD_USART2_TX_PIN PA2
  44. #define BOARD_USART2_RX_PIN PA3
  45. #define BOARD_USART3_TX_PIN PB10
  46. #define BOARD_USART3_RX_PIN PB11
  47. #define BOARD_USART4_TX_PIN PC10
  48. #define BOARD_USART4_RX_PIN PC11
  49. #define BOARD_USART5_TX_PIN PC12
  50. #define BOARD_USART5_RX_PIN PD2
  51. /* Note:
  52. *
  53. * SPI3 is unusable due to pin 43 (PB4) and NRST tie-together :(, but
  54. * leave the definitions so as not to clutter things up. This is only
  55. * OK since RET6 Ed. is specifically advertised as a beta board. */
  56. #define BOARD_NR_SPI 3
  57. #define BOARD_SPI1_NSS_PIN PA4
  58. #define BOARD_SPI1_SCK_PIN PA5
  59. #define BOARD_SPI1_MISO_PIN PA6
  60. #define BOARD_SPI1_MOSI_PIN PA7
  61. #define BOARD_SPI2_NSS_PIN PB12
  62. #define BOARD_SPI2_SCK_PIN PB13
  63. #define BOARD_SPI2_MISO_PIN PB14
  64. #define BOARD_SPI2_MOSI_PIN PB15
  65. #define BOARD_SPI3_NSS_PIN PA15
  66. #define BOARD_SPI3_SCK_PIN PB3
  67. #define BOARD_SPI3_MISO_PIN PB4
  68. #define BOARD_SPI3_MOSI_PIN PB5
  69. /* GPIO A to E = 5 * 16 - BOOT1 not used = 79*/
  70. #define BOARD_NR_GPIO_PINS 112
  71. /* Note: NOT 19. The missing one is D38 a.k.a. BOARD_BUTTON_PIN, which
  72. * isn't broken out to a header and is thus unusable for PWM. */
  73. #define BOARD_NR_PWM_PINS 19
  74. #define BOARD_NR_ADC_PINS 16
  75. #define BOARD_NR_USED_PINS 7
  76. #define BOARD_JTMS_SWDIO_PIN 39
  77. #define BOARD_JTCK_SWCLK_PIN 40
  78. #define BOARD_JTDI_PIN 41
  79. #define BOARD_JTDO_PIN 42
  80. #define BOARD_NJTRST_PIN 43
  81. /* USB configuration. BOARD_USB_DISC_DEV is the GPIO port containing
  82. * the USB_DISC pin, and BOARD_USB_DISC_BIT is that pin's bit. */
  83. #define BOARD_USB_DISC_DEV GPIOC
  84. #define BOARD_USB_DISC_BIT 12
  85. /*
  86. * SDIO Pins
  87. */
  88. #define BOARD_SDIO_D0 PC8
  89. #define BOARD_SDIO_D1 PC9
  90. #define BOARD_SDIO_D2 PC10
  91. #define BOARD_SDIO_D3 PC11
  92. #define BOARD_SDIO_CLK PC12
  93. #define BOARD_SDIO_CMD PD2
  94. /* Pin aliases: these give the GPIO port/bit for each pin as an
  95. * enum. These are optional, but recommended. They make it easier to
  96. * write code using low-level GPIO functionality. */
  97. enum {
  98. PA0,PA1,PA2,PA3,PA4,PA5,PA6,PA7,PA8,PA9,PA10,PA11,PA12,PA13,PA14,PA15,
  99. PB0,PB1,PB2,PB3,PB4,PB5,PB6,PB7,PB8,PB9,PB10,PB11,PB12,PB13,PB14,PB15,
  100. PC0,PC1,PC2,PC3,PC4,PC5,PC6,PC7,PC8,PC9,PC10,PC11,PC12,PC13,PC14,PC15,
  101. PD0,PD1,PD2,PD3,PD4,PD5,PD6,PD7,PD8,PD9,PD10,PD11,PD12,PD13,PD14,PD15,
  102. PE0,PE1,PE2,PE3,PE4,PE5,PE6,PE7,PE8,PE9,PE10,PE11,PE12,PE13,PE14,PE15,
  103. PF0,PF1,PF2,PF3,PF4,PF5,PF6,PF7,PF8,PF9,PF10,PF11,PF12,PF13,PF14,PF15,
  104. PG0,PG1,PG2,PG3,PG4,PG5,PG6,PG7,PG8,PG9,PG10,PG11,PG12,PG13,PG14,PG15
  105. };/* Note PB2 is skipped as this is Boot1 and is not going to be much use as its likely to be pulled permanently low */
  106. /*
  107. #define PA0 0
  108. #define PA1 1
  109. #define PA2 2
  110. #define PA3 3
  111. #define PA4 4
  112. #define PA5 5
  113. #define PA6 6
  114. #define PA7 7
  115. #define PA8 8
  116. #define PA9 9
  117. #define PA10 10
  118. #define PA11 11
  119. #define PA12 12
  120. #define PA13 13
  121. #define PA14 14
  122. #define PA15 15
  123. #define PB0 16
  124. #define PB1 17
  125. #define PB2 18
  126. #define PB3 19
  127. #define PB4 20
  128. #define PB5 21
  129. #define PB6 22
  130. #define PB7 23
  131. #define PB8 24
  132. #define PB9 25
  133. #define PB10 26
  134. #define PB11 27
  135. #define PB12 28
  136. #define PB13 29
  137. #define PB14 30
  138. #define PB15 31
  139. #define PC0 32
  140. #define PC1 33
  141. #define PC2 34
  142. #define PC3 35
  143. #define PC4 36
  144. #define PC5 37
  145. #define PC6 38
  146. #define PC7 39
  147. #define PC8 40
  148. #define PC9 41
  149. #define PC10 42
  150. #define PC11 43
  151. #define PC12 44
  152. #define PC13 45
  153. #define PC14 46
  154. #define PC15 47
  155. #define PD0 48
  156. #define PD1 49
  157. #define PD2 50
  158. #define PD3 51
  159. #define PD4 52
  160. #define PD5 53
  161. #define PD6 54
  162. #define PD7 55
  163. #define PD8 56
  164. #define PD9 57
  165. #define PD10 58
  166. #define PD11 59
  167. #define PD12 60
  168. #define PD13 61
  169. #define PD14 62
  170. #define PD15 63
  171. #define PE0 64
  172. #define PE1 65
  173. #define PE2 66
  174. #define PE3 67
  175. #define PE4 68
  176. #define PE5 69
  177. #define PE6 70
  178. #define PE7 71
  179. #define PE8 72
  180. #define PE9 73
  181. #define PE10 74
  182. #define PE11 75
  183. #define PE12 76
  184. #define PE13 77
  185. #define PE14 78
  186. #define PE15 79
  187. #define PF0 80
  188. #define PF1 81
  189. #define PF2 82
  190. #define PF3 83
  191. #define PF4 84
  192. #define PF5 85
  193. #define PF6 86
  194. #define PF7 87
  195. #define PF8 88
  196. #define PF9 89
  197. #define PF10 90
  198. #define PF11 91
  199. #define PF12 92
  200. #define PF13 93
  201. #define PF14 94
  202. #define PF15 95
  203. #define PG0 96
  204. #define PG1 97
  205. #define PG2 98
  206. #define PG3 99
  207. #define PG4 100
  208. #define PG5 101
  209. #define PG6 102
  210. #define PG7 103
  211. #define PG8 104
  212. #define PG9 105
  213. #define PG10 106
  214. #define PG11 107
  215. #define PG12 108
  216. #define PG13 109
  217. #define PG14 110
  218. #define PG15 111 */
  219. #endif