at91_wd.h 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. #ifndef _ARCH_ARM_AT91_WD_H_
  2. #define _ARCH_ARM_AT91_WD_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_wd.h
  36. * \brief AT91 peripherals.
  37. *
  38. * \verbatim
  39. *
  40. * $Log: at91_wd.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 xgNutArchArmAt91Wd
  49. */
  50. /*@{*/
  51. /*! \name Watch Dog Overflow Mode Register */
  52. /*@{*/
  53. #define WD_OMR (WD_BASE + 0x00) /*!< \brief Overflow mode register address. */
  54. #define WD_WDEN 0x00000001 /*!< \brief Watch Dog enable. */
  55. #define WD_RSTEN 0x00000002 /*!< \brief Internal reset enable. */
  56. #define WD_IRQEN 0x00000004 /*!< \brief Interrupt enable. */
  57. #define WD_EXTEN 0x00000008 /*!< \brief External signal enable. */
  58. #define WD_OKEY 0x00002340 /*!< \brief Overflow mode register access key. */
  59. /*@}*/
  60. /*! \name Watch Dog Clock Register */
  61. /*@{*/
  62. #define WD_CMR (WD_BASE + 0x04) /*!< \brief Clock mode register address. */
  63. #define WD_WDCLKS 0x00000003 /*!< \brief Clock selection mask. */
  64. #define WD_WDCLKS_MCK8 0x00000000 /*!< \brief Selects MCK/8. */
  65. #define WD_WDCLKS_MCK32 0x00000001 /*!< \brief Selects MCK/32. */
  66. #define WD_WDCLKS_MCK128 0x00000002 /*!< \brief Selects MCK/128. */
  67. #define WD_WDCLKS_MCK1024 0x00000003 /*!< \brief Selects MCK/1024. */
  68. #define WD_HPCV 0x0000003C /*!< \brief High preload counter value. */
  69. #define WD_CKEY (0x06E<<7) /*!< \brief Clock register access key. */
  70. /*@}*/
  71. /*! \name Watch Dog Control Register */
  72. /*@{*/
  73. #define WD_CR (WD_BASE + 0x08) /*!< \brief Control register address. */
  74. #define WD_RSTKEY 0x0000C071 /*!< \brief Watch Dog restart key. */
  75. /*@}*/
  76. /*! \name Watch Dog Status Register */
  77. /*@{*/
  78. #define WD_SR (WD_BASE + 0x0C) /*!< \brief Status register address. */
  79. #define WD_WDOVF 0x00000001 /*!< \brief Watch Dog overflow status. */
  80. /*@}*/
  81. /*@} xgNutArchArmAt91Wd */
  82. #endif /* _ARCH_ARM_AT91_WD_H_ */