stm32l1.nut 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  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. stm32_memory_l1xx = { "32" , "64" , "128" , "256" , "384" , "512"}
  37. stm32l1_device_class = {
  38. "STM32L1XX_MD" ,"STM32L1XX_MDP",
  39. "STM32L1XX_HD", "STM32L1XX_XL" }
  40. -- *****************************************************************************
  41. -- STM32L1 Family
  42. -- *****************************************************************************
  43. --
  44. nutarch_cm3_stm32l1 =
  45. {
  46. --
  47. -- MCU Family
  48. --
  49. {
  50. name = "nutarch_cm3_stm32L1_family",
  51. brief = "MCU L1 Family",
  52. requires = { "HW_MCU_STM32L1XX" },
  53. sources = { "cm3/dev/stm/stm32l1_clk.c" },
  54. options =
  55. {
  56. {
  57. macro = "MCU_STM32L1",
  58. brief = "STM32L1",
  59. type = "integer",
  60. default = 1,
  61. requires = { "HW_MCU_CM3" },
  62. provides =
  63. {
  64. "HW_RCC_STM32",
  65. "HW_FLASH_STM32L1",
  66. "HW_EEPROM_STM32L1",
  67. "HW_GPIO_STM32V2",
  68. "HW_CRC32_STM32",
  69. "DEV_IRQ_STM32",
  70. "HW_DMA1_STM32F1",
  71. "HW_EXTI04_STM32",
  72. "HW_EXTI95_STM32",
  73. "HW_EXTI1510_STM32",
  74. "HW_I2C1_STM32",
  75. "HW_I2C2_STM32",
  76. "HW_SPI1_STM32",
  77. "HW_SPI2_STM32",
  78. "HW_USART1_STM32",
  79. "HW_USART2_STM32",
  80. "HW_USART3_STM32",
  81. "HW_TIM2_STM32",
  82. "HW_TIM3_STM32",
  83. "HW_TIM4_STM32",
  84. "HW_TIM6_STM32",
  85. "HW_TIM7_STM32",
  86. "HW_TIM9_STM32",
  87. "HW_STM32_TIM10",
  88. "HW_STM32_TIM11",
  89. -- "HW_USB_STM32",
  90. },
  91. file = "include/cfg/arch.h"
  92. }
  93. }
  94. },
  95. --
  96. -- STM32L1 MCU Classes
  97. --
  98. {
  99. name = "nutarch_cm3_stm32l1_class",
  100. brief = "STM32L1 Device Classes",
  101. requires = { "HW_MCU_STM32L1XX" },
  102. options =
  103. {
  104. {
  105. macro = "STM32L1XX_MD",
  106. brief = "STM32L1 MD Series",
  107. description = "STM32L1 Medium Density devices.",
  108. type = "integer",
  109. default = 1,
  110. requires = { "STM32L1XX_MD" },
  111. file = "include/cfg/arch.h"
  112. },
  113. {
  114. macro = "STM32L1XX_MDP",
  115. brief = "STM32L1 MDP Series",
  116. description = "STM32L1 Medium Density devices.",
  117. type = "integer",
  118. default = 1,
  119. requires = { "STM32L1XX_MDP" },
  120. provides =
  121. {
  122. "HW_TIM5_STM32",
  123. "HW_SPI3_STM32",
  124. "HW_OPAMP1_STM32",
  125. "HW_OPAMP2_STM32",
  126. },
  127. file = "include/cfg/arch.h"
  128. },
  129. {
  130. macro = "STM32L1XX_HD",
  131. brief = "STM32L1 HD Series",
  132. description = "STM32L1 Medium Density devices.",
  133. type = "integer",
  134. default = 1,
  135. requires = { "STM32L1XX_HD" },
  136. provides =
  137. {
  138. "HW_UART4_STM32",
  139. "HW_UART5_STM32",
  140. "HW_SPI3_STM32",
  141. "HW_SDIO_STM32",
  142. "HW_TIM5_STM32",
  143. "HW_TIM7_STM32",
  144. "HW_OPAMP1_STM32",
  145. "HW_OPAMP2_STM32",
  146. "HW_OPAMP3_STM32",
  147. "HW_FSMC_STM32",
  148. },
  149. file = "include/cfg/arch.h"
  150. },
  151. {
  152. macro = "STM32L1XX_XL",
  153. brief = "STM32L1 XL Series",
  154. description = "STM32L1 XL-Density devices.",
  155. type = "integer",
  156. default = 1,
  157. requires = { "STM32L1XX_XL" },
  158. provides =
  159. {
  160. "HW_UART4_STM32",
  161. "HW_UART5_STM32",
  162. "HW_SPI3_STM32",
  163. "HW_TIM5_STM32",
  164. "HW_TIM7_STM32",
  165. "HW_OPAMP1_STM32",
  166. "HW_OPAMP2_STM32",
  167. "HW_OPAMP3_STM32",
  168. },
  169. file = "include/cfg/arch.h"
  170. },
  171. {
  172. macro = "STM32L152",
  173. brief = "STM32L152 Series",
  174. description = "STM32L152 LCD devices.",
  175. requires = { "HW_MCU_STM32L152" },
  176. flavor = "booldata",
  177. provides =
  178. {
  179. "HW_LCD_STM32",
  180. },
  181. file = "include/cfg/arch.h"
  182. },
  183. {
  184. macro = "STM32L162",
  185. brief = "STM32L152 Series",
  186. description = "STM32L162 LCD with Crypto devices.",
  187. requires = { "HW_MCU_STM32L152" },
  188. flavor = "booldata",
  189. provides =
  190. {
  191. "HW_LCD_STM32",
  192. },
  193. file = "include/cfg/arch.h"
  194. },
  195. }
  196. },
  197. {
  198. name = "nutarch_cm3_stm32l1_memory",
  199. brief = "STM32L1 Device Memory",
  200. requires = { "HW_MCU_STM32" },
  201. options =
  202. {
  203. {
  204. macro = "MCU_STM32L15X",
  205. brief = "STM32L1xx memory",
  206. description = "Select your devices memory by the marked alphanumeric code on the chip:\n"..
  207. "STM32L1xx>Y<zz where Y is one of the list below.\n\n"..
  208. "6 = 32 kbytes Flash\n"..
  209. "8 = 64 kbytes Flash\n"..
  210. "B = 128 kbytes Flash\n",
  211. "C = 256 kbytes Flash\n",
  212. "D = 384 kbytes Flash\n",
  213. requires = { "HW_MCU_STM32L1XX" },
  214. type = "enumerated",
  215. choices = stm32_memory_l1xx,
  216. file = "include/cfg/arch.h"
  217. },
  218. }
  219. },
  220. }