armparams.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /*
  2. ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. /**
  14. * @file SAMA5D2/armparams.h
  15. * @brief ARM parameters for the SAMA5D2x.
  16. *
  17. * @defgroup ARM_SAMA5D2x Specific Parameters
  18. * @ingroup ARM_SPECIFIC
  19. * @details This file contains the ARM specific parameters for the
  20. * SAMA5D2x platform.
  21. * @{
  22. */
  23. #ifndef ARMPARAMS_H
  24. #define ARMPARAMS_H
  25. /**
  26. * @brief ARM core model.
  27. */
  28. #define ARM_CORE ARM_CORE_CORTEX_A5
  29. /**
  30. * @brief Cortex core model.
  31. */
  32. #define CORTEX_MODEL 5
  33. /**
  34. * @brief Thumb-capable.
  35. */
  36. #define ARM_SUPPORTS_THUMB 1
  37. /**
  38. * @brief Thumb2-capable.
  39. */
  40. #define ARM_SUPPORTS_THUMB2 1
  41. /**
  42. * @brief VFPv4-D16 FPU.
  43. */
  44. #define TARGET_FEATURE_EXTENSION_REGISTER_COUNT 16
  45. /**
  46. * @brief Implementation of the wait-for-interrupt state enter.
  47. */
  48. #define ARM_WFI_IMPL asm volatile ("wfi")
  49. #if !defined(_FROM_ASM_) || defined(__DOXYGEN__)
  50. /* If the device type is not externally defined, for example from the Makefile,
  51. then a file named board.h is included. This file must contain a device
  52. definition compatible with the vendor include file.*/
  53. #if !defined (SAMA5D21) && !defined (SAMA5D22) && !defined (SAMA5D23) && \
  54. !defined (SAMA5D24) && !defined (SAMA5D25) && !defined (SAMA5D26) && \
  55. !defined (SAMA5D27) && !defined (SAMA5D28)
  56. #include "board.h"
  57. #endif
  58. /* Including the device CMSIS header. Note, we are not using the definitions
  59. from this header because we need this file to be usable also from
  60. assembler source files. We verify that the info matches instead.*/
  61. #include "sama5d2x.h"
  62. /*lint -save -e9029 [10.4] Signedness comes from external files, it is
  63. unpredictable but gives no problems.*/
  64. #if CORTEX_MODEL != __CORTEX_A
  65. #error "CMSIS __CORTEX_A mismatch"
  66. #endif
  67. /**
  68. * @brief Address of the IRQ vector register in the interrupt controller.
  69. */
  70. #define ARM_IRQ_VECTOR_REG 0xFC020010U
  71. #else
  72. #define ARM_IRQ_VECTOR_REG 0xFC020010
  73. #endif
  74. #define ARM_ENABLE_WFI_IDLE FALSE
  75. #define ARM_SUPPORTS_L2CC 1
  76. #endif /* ARMPARAMS_H */
  77. /** @} */