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 4.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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_STM32F103R_H_
  34. #define _BOARDS_GENERIC_STM32F103R_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 51
  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
  102. };/* Note PB2 is skipped as this is Boot1 and is not going to be much use as its likely to be pulled permanently low */
  103. #endif