stm32xxxx.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. /*
  2. * Copyright (C) 2012-2013 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. */
  33. /*!
  34. * \file arch/cm3/stm/atm32xxxx.h
  35. * \brief Wrapper for the device dependant stm32XZxx.h files.
  36. * $Id: stm32_flash.h 3220 2010-11-12 13:04:17Z astralix $
  37. * \verbatim
  38. */
  39. #include <cfg/arch.h>
  40. #if defined(MCU_STM32F0)
  41. #include <arch/cm3/stm/vendor/stm32f0xx.h>
  42. #elif defined(MCU_STM32F1)
  43. #include <arch/cm3/stm/vendor/stm32f10x.h>
  44. #elif defined(MCU_STM32L1)
  45. #include <arch/cm3/stm/vendor/stm32l1xx.h>
  46. #elif defined(MCU_STM32F2)
  47. /**
  48. * @brief CMSIS Device version number V2.0.1
  49. */
  50. #define __STM32F2xx_CMSIS_DEVICE_VERSION_MAIN (0x02) /*!< [31:24] main version */
  51. #define __STM32F2xx_CMSIS_DEVICE_VERSION_SUB1 (0x00) /*!< [23:16] sub1 version */
  52. #define __STM32F2xx_CMSIS_DEVICE_VERSION_SUB2 (0x00) /*!< [15:8] sub2 version */
  53. #define __STM32F2xx_CMSIS_DEVICE_VERSION_RC (0x00) /*!< [7:0] release candidate */
  54. #define __STM32F2xx_CMSIS_DEVICE_VERSION ((__CMSIS_DEVICE_VERSION_MAIN << 24)\
  55. |(__CMSIS_DEVICE_HAL_VERSION_SUB1 << 16)\
  56. |(__CMSIS_DEVICE_HAL_VERSION_SUB2 << 8 )\
  57. |(__CMSIS_DEVICE_HAL_VERSION_RC))
  58. #if defined(STM32F205xx)
  59. #include <arch/cm3/stm/vendor/stm32f205xx.h>
  60. #elif defined(STM32F215xx)
  61. #include <arch/cm3/stm/vendor/stm32f215xx.h>
  62. #elif defined(STM32F207xx)
  63. #include <arch/cm3/stm/vendor/stm32f207xx.h>
  64. #elif defined(STM32F217xx)
  65. #include <arch/cm3/stm/vendor/stm32f217xx.h>
  66. #else
  67. #warning "Unknown STM32F2 family"
  68. #endif
  69. #elif defined(STM32F30X)
  70. #include <arch/cm3/stm/vendor/stm32f30x.h>
  71. #elif defined(STM32F37X)
  72. #include <arch/cm3/stm/vendor/stm32f37x.h>
  73. #elif defined(MCU_STM32F4)
  74. #define __STM32F4xx_CMSIS_DEVICE_VERSION_MAIN (0x02) /*!< [31:24] main version */
  75. #define __STM32F4xx_CMSIS_DEVICE_VERSION_SUB1 (0x00) /*!< [23:16] sub1 version */
  76. #define __STM32F4xx_CMSIS_DEVICE_VERSION_SUB2 (0x00) /*!< [15:8] sub2 version */
  77. #define __STM32F4xx_CMSIS_DEVICE_VERSION_RC (0x00) /*!< [7:0] release candidate */
  78. #define __STM32F4xx_CMSIS_DEVICE_VERSION ((__CMSIS_DEVICE_VERSION_MAIN << 24)\
  79. |(__CMSIS_DEVICE_HAL_VERSION_SUB1 << 16)\
  80. |(__CMSIS_DEVICE_HAL_VERSION_SUB2 << 8 )\
  81. |(__CMSIS_DEVICE_HAL_VERSION_RC))
  82. #if defined(MCU_STM32F401)
  83. #include <arch/cm3/stm/vendor/stm32f401xe.h>
  84. #elif defined(MCU_STM32F405)
  85. #include <arch/cm3/stm/vendor/stm32f405xx.h>
  86. #elif defined(MCU_STM32F407)
  87. #include <arch/cm3/stm/vendor/stm32f407xx.h>
  88. #elif defined(MCU_STM32F415)
  89. #include <arch/cm3/stm/vendor/stm32f415xx.h>
  90. #elif defined(MCU_STM32F417)
  91. #include <arch/cm3/stm/vendor/stm32f417xx.h>
  92. #elif defined(MCU_STM32F427)
  93. #include <arch/cm3/stm/vendor/stm32f427xx.h>
  94. #elif defined(MCU_STM32F429)
  95. #include <arch/cm3/stm/vendor/stm32f429xx.h>
  96. #elif defined(MCU_STM32F437)
  97. #include <arch/cm3/stm/vendor/stm32f437xx.h>
  98. #elif defined(MCU_STM32F439)
  99. #include <arch/cm3/stm/vendor/stm32f439xx.h>
  100. #else
  101. #warning "Unknown STM32F4 family"
  102. #endif
  103. #else
  104. #warning "Unknown STM32 family"
  105. #endif