stm32f2.nut 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. --
  2. -- * Copyright (C) 2011 by Uwe Bonnes (bon@elektron.ikp.physik.tu-darmstadt.de)
  3. --
  4. -- Redistribution and use in source and binary forms, with or without
  5. -- modification, are permitted provided that the following conditions
  6. -- are met:
  7. --
  8. -- 1. Redistributions of source code must retain the above copyright
  9. -- notice, this list of conditions and the following disclaimer.
  10. -- 2. Redistributions in binary form must reproduce the above copyright
  11. -- notice, this list of conditions and the following disclaimer in the
  12. -- documentation and/or other materials provided with the distribution.
  13. -- 3. Neither the name of the copyright holders nor the names of
  14. -- contributors may be used to endorse or promote products derived
  15. -- from this software without specific prior written permission.
  16. --
  17. -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  18. -- ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  19. -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  20. -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  21. -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  22. -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  23. -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  24. -- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  25. -- AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  26. -- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
  27. -- THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  28. -- SUCH DAMAGE.
  29. --
  30. -- For additional information see http://www.ethernut.de/
  31. --
  32. -- ARM CortexM3 Architecture
  33. -- STMicroelectronics STM32L Family Devices
  34. --
  35. --
  36. -- *****************************************************************************
  37. -- STM32F2 Family
  38. -- *****************************************************************************
  39. --
  40. nutarch_cm3_stm32f2 =
  41. {
  42. --
  43. -- MCU Family
  44. --
  45. {
  46. name = "nutarch_cm3_stm32f2_family",
  47. brief = "MCU F2 Family",
  48. requires = { "HW_MCU_STM32F2XX" },
  49. sources = { "cm3/dev/stm/stm32f4_clk.c" },
  50. options =
  51. {
  52. {
  53. macro = "MCU_STM32F2",
  54. brief = "STM32F2",
  55. type = "integer",
  56. default = 1,
  57. provides =
  58. {
  59. "HW_RCC_STM32",
  60. "HW_FLASH_STM32F2_4",
  61. "HW_GPIO_STM32V2",
  62. "HW_CRC32_STM32",
  63. "DEV_IRQ_STM32",
  64. "HW_EXTI04_STM32",
  65. "HW_EXTI95_STM32",
  66. "HW_EXTI1510_STM32",
  67. "HW_DMA1_STM32F2",
  68. "HW_DMA2_STM32F2",
  69. "HW_OTG_FS_STM32",
  70. "HW_OTG_HS_STM32",
  71. "HW_I2C1_STM32",
  72. "HW_I2C2_STM32",
  73. "HW_I2C3_STM32",
  74. "HW_RNG_STM32",
  75. "HW_SDIO_STM32",
  76. "HW_SPI1_STM32",
  77. "HW_SPI2_STM32",
  78. "HW_SPI3_STM32",
  79. "HW_USART1_STM32",
  80. "HW_USART2_STM32",
  81. "HW_USART3_STM32",
  82. "HW_UART4_STM32",
  83. "HW_UART5_STM32",
  84. "HW_USART6_STM32",
  85. "HW_CAN1_STM32",
  86. "HW_CAN2_STM32",
  87. "HW_RTC_STM32_V2",
  88. "HW_TIM1_TIM9_TIM10_TIM11_STM32",
  89. "HW_TIM2_32BIT_STM32",
  90. "HW_TIM3_STM32",
  91. "HW_TIM4_STM32",
  92. "HW_TIM5_32BITT_STM32",
  93. "HW_TIM6_DAC_STM32",
  94. "HW_TIM7_STM32",
  95. "HW_TIM8_TIM12_TIM13_TIM14_STM32",
  96. },
  97. file = "include/cfg/arch.h"
  98. }
  99. }
  100. },
  101. --
  102. -- STM32F2 MCU Classes
  103. --
  104. {
  105. name = "nutarch_cm3_stm32F2_class",
  106. brief = "STM32F2 Device Classes",
  107. requires = { "HW_MCU_STM32F2XX" },
  108. options =
  109. {
  110. {
  111. macro = "STM32F205xx",
  112. brief = "STM32F205",
  113. description = "STM32F207 w/o ETH/DCMI and Crypto.",
  114. requires = { "HW_MCU_STM32F205" },
  115. type = "integer",
  116. default = 1,
  117. file = "include/cfg/arch.h"
  118. },
  119. {
  120. macro = "STM32F207xx",
  121. brief = "STM32F207",
  122. description = "STM32F207 with ETH/DCMI w/o Crypto.",
  123. requires = { "HW_MCU_STM32F207" },
  124. type = "integer",
  125. default = 1,
  126. provides =
  127. {
  128. "HW_EMAC_STM32",
  129. "HW_DCMI_STM32",
  130. },
  131. file = "include/cfg/arch.h"
  132. },
  133. {
  134. macro = "STM32F215xx",
  135. brief = "STM32F215",
  136. description = "STM32F215 w/o Ethernet, with Crypto.",
  137. requires = { "HW_MCU_STM32F215" },
  138. type = "integer",
  139. default = 1,
  140. provides =
  141. {
  142. "HW_HASH_RNG_STM32",
  143. "HW_CRYP_STM32",
  144. },
  145. file = "include/cfg/arch.h"
  146. },
  147. {
  148. macro = "STM32F217xx",
  149. brief = "STM32F217",
  150. description = "STM32F217 with Ethernet/DCMI and Crypto.",
  151. requires = { "HW_MCU_STM32F217" },
  152. type = "integer",
  153. default = 1,
  154. provides =
  155. {
  156. "HW_EMAC_STM32",
  157. "HW_DCMI_STM32",
  158. "HW_HASH_RNG_STM32",
  159. "HW_CRYP_STM32",
  160. },
  161. file = "include/cfg/arch.h"
  162. },
  163. }
  164. },
  165. {
  166. name = "nutarch_cm3_stm32F2_memory",
  167. brief = "STM32F2 Device Memory",
  168. requires = { "HW_MCU_STM32" },
  169. options =
  170. {
  171. {
  172. macro = "MCU_STM32F2XX",
  173. brief = "STM32F2xx memory",
  174. description = "Select your devices memory by the marked alphanumeric code on the chip:\n"..
  175. "STM32F2xx>Y<zz where Y is one of the list below.\n\n"..
  176. "B = 128 kbytes Flash\n"..
  177. "C = 256 kbytes Flash\n"..
  178. "E = 512 kbytes Flash\n"..
  179. "F = 768 kbytes Flash\n"..
  180. "G = 1024 kbytes Flash\n",
  181. requires = { "HW_MCU_STM32F2XX" },
  182. type = "enumerated",
  183. -- choices = stm32_memory_f2xx,
  184. file = "include/cfg/arch.h"
  185. },
  186. }
  187. },
  188. }