at91_sf.h 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. #ifndef _ARCH_ARM_AT91_SF_H_
  2. #define _ARCH_ARM_AT91_SF_H_
  3. /*
  4. * Copyright (C) 2005-2006 by egnite Software GmbH. All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without
  7. * modification, are permitted provided that the following conditions
  8. * are met:
  9. *
  10. * 1. Redistributions of source code must retain the above copyright
  11. * notice, this list of conditions and the following disclaimer.
  12. * 2. Redistributions in binary form must reproduce the above copyright
  13. * notice, this list of conditions and the following disclaimer in the
  14. * documentation and/or other materials provided with the distribution.
  15. * 3. Neither the name of the copyright holders nor the names of
  16. * contributors may be used to endorse or promote products derived
  17. * from this software without specific prior written permission.
  18. *
  19. * THIS SOFTWARE IS PROVIDED BY EGNITE SOFTWARE GMBH AND CONTRIBUTORS
  20. * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  21. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  22. * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL EGNITE
  23. * SOFTWARE GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  24. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  25. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  26. * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  27. * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  28. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
  29. * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  30. * SUCH DAMAGE.
  31. *
  32. * For additional information see http://www.ethernut.de/
  33. */
  34. /*!
  35. * \file arch/arm/at91_sf.h
  36. * \brief AT91 peripherals.
  37. *
  38. * \verbatim
  39. *
  40. * $Log: at91_sf.h,v $
  41. * Revision 1.1 2006/07/05 07:45:28 haraldkipp
  42. * Split on-chip interface definitions.
  43. *
  44. *
  45. * \endverbatim
  46. */
  47. /*!
  48. * \addtogroup xgNutArchArmAt91Sf
  49. */
  50. /*@{*/
  51. /*! \name Chip Identification Registers */
  52. /*@{*/
  53. #define SF_CIDR (SF_BASE + 0x00) /*!< \brief Chip ID register address. */
  54. #define SF_EXID (SF_BASE + 0x04) /*!< \brief Chip ID extension register address. */
  55. #define SF_VERSION 0x0000001F /*!< \brief Version number mask. */
  56. #define SF_NVPSIZ 0x00000F00 /*!< \brief Masks non-volatile program memory size. */
  57. #define SF_NVPSIZ_NONE 0x00000000 /*!< \brief No NV program memory. */
  58. #define SF_NVPSIZ_32K 0x00000300 /*!< \brief 32 kBytes NV program memory. */
  59. #define SF_NVPSIZ_64K 0x00000500 /*!< \brief 64 kBytes NV program memory. */
  60. #define SF_NVPSIZ_128K 0x00000700 /*!< \brief 128 kBytes NV program memory. */
  61. #define SF_NVPSIZ_256K 0x00000900 /*!< \brief 256 kBytes NV program memory. */
  62. #define SF_NVDSIZ 0x0000F000 /*!< \brief Masks non-volatile data memory size. */
  63. #define SF_NVDSIZ_NONE 0x00000000 /*!< \brief No NV data memory. */
  64. #define SF_VDSIZ 0x000F0000 /*!< \brief Masks volatile data memory size. */
  65. #define SF_VDSIZ_NONE 0x00000000 /*!< \brief No volatile data memory. */
  66. #define SF_VDSIZ_1K 0x00010000 /*!< \brief 1 kBytes volatile data memory. */
  67. #define SF_VDSIZ_2K 0x00020000 /*!< \brief 2 kBytes volatile data memory. */
  68. #define SF_VDSIZ_4K 0x00040000 /*!< \brief 4 kBytes volatile data memory. */
  69. #define SF_VDSIZ_8K 0x00080000 /*!< \brief 8 kBytes volatile data memory. */
  70. #define SF_ARCH 0x0FF00000 /*!< \brief Architecture code mask. */
  71. #define SF_ARCH_AT91x40 0x04000000 /*!< \brief AT91x40 architecture. */
  72. #define SF_ARCH_AT91x55 0x05500000 /*!< \brief AT91x55 architecture. */
  73. #define SF_ARCH_AT91x63 0x06300000 /*!< \brief AT91x63 architecture. */
  74. #define SF_NVPTYP 0x70000000 /*!< \brief Masks non-volatile program memory type. */
  75. #define SF_NVPTYP_M 0x01000000 /*!< \brief M or F series. */
  76. #define SF_NVPTYP_C 0x02000000 /*!< \brief C series. */
  77. #define SF_NVPTYP_S 0x03000000 /*!< \brief S series. */
  78. #define SF_NVPTYP_R 0x04000000 /*!< \brief R series. */
  79. #define SF_EXT 0x80000000 /*!< \brief Extension flag. */
  80. /*@}*/
  81. /*! \name Reset Status Flag Register */
  82. /*@{*/
  83. #define SF_RSR (SF_BASE + 0x08) /*!< \brief Reset status register address. */
  84. #define SF_EXT_RESET 0x0000006C /*!< \brief Reset caused by external pin. */
  85. #define SF_WD_RESET 0x00000053 /*!< \brief Reset caused by internal watch dog. */
  86. /*@}*/
  87. /*! \name Memory Mode Register */
  88. /*@{*/
  89. #define SF_MMR (SF_BASE + 0x0C) /*!< \brief Memory mode register address. */
  90. #define SF_RAMWU 0x00000001 /*!< \brief Internal extended RAM write allowed. */
  91. /*@}*/
  92. /*! \name Protect Mode Register */
  93. /*@{*/
  94. #define SF_PMR (SF_BASE + 0x18) /*!< \brief Protect mode register address. */
  95. #define SF_AIC 0x00000020 /*!< \brief AIC runs in protect mode. */
  96. /*@}*/
  97. /*@} xgNutArchArmAt91Sf */
  98. #endif /* _ARCH_ARM_AT91_SF_H_ */