hw_wdt.h 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. //*****************************************************************************
  2. //
  3. // Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
  4. //
  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. // Redistributions of source code must retain the above copyright
  11. // notice, this list of conditions and the following disclaimer.
  12. //
  13. // Redistributions in binary form must reproduce the above copyright
  14. // notice, this list of conditions and the following disclaimer in the
  15. // documentation and/or other materials provided with the
  16. // distribution.
  17. //
  18. // Neither the name of Texas Instruments Incorporated nor the names of
  19. // its contributors may be used to endorse or promote products derived
  20. // from this software without specific prior written permission.
  21. //
  22. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  23. // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  24. // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  25. // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  26. // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  27. // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  28. // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  29. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  30. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  31. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  32. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  33. //
  34. //*****************************************************************************
  35. #ifndef __HW_WDT_H__
  36. #define __HW_WDT_H__
  37. //*****************************************************************************
  38. //
  39. // The following are defines for the WDT register offsets.
  40. //
  41. //*****************************************************************************
  42. #define WDT_O_LOAD 0x00000000
  43. #define WDT_O_VALUE 0x00000004
  44. #define WDT_O_CTL 0x00000008
  45. #define WDT_O_ICR 0x0000000C
  46. #define WDT_O_RIS 0x00000010
  47. #define WDT_O_MIS 0x00000014
  48. #define WDT_O_TEST 0x00000418
  49. #define WDT_O_LOCK 0x00000C00
  50. //******************************************************************************
  51. //
  52. // The following are defines for the bit fields in the WDT_O_LOAD register.
  53. //
  54. //******************************************************************************
  55. #define WDT_LOAD_M 0xFFFFFFFF // Watchdog Load Value
  56. #define WDT_LOAD_S 0
  57. //******************************************************************************
  58. //
  59. // The following are defines for the bit fields in the WDT_O_VALUE register.
  60. //
  61. //******************************************************************************
  62. #define WDT_VALUE_M 0xFFFFFFFF // Watchdog Value
  63. #define WDT_VALUE_S 0
  64. //******************************************************************************
  65. //
  66. // The following are defines for the bit fields in the WDT_O_CTL register.
  67. //
  68. //******************************************************************************
  69. #define WDT_CTL_WRC 0x80000000 // Write Complete
  70. #define WDT_CTL_INTTYPE 0x00000004 // Watchdog Interrupt Type
  71. #define WDT_CTL_RESEN 0x00000002 // Watchdog Reset Enable. This bit
  72. // is not used in cc3xx, WDOG shall
  73. // always generate RESET to system
  74. // irrespective of this bit setting.
  75. #define WDT_CTL_INTEN 0x00000001 // Watchdog Interrupt Enable
  76. //******************************************************************************
  77. //
  78. // The following are defines for the bit fields in the WDT_O_ICR register.
  79. //
  80. //******************************************************************************
  81. #define WDT_ICR_M 0xFFFFFFFF // Watchdog Interrupt Clear
  82. #define WDT_ICR_S 0
  83. //******************************************************************************
  84. //
  85. // The following are defines for the bit fields in the WDT_O_RIS register.
  86. //
  87. //******************************************************************************
  88. #define WDT_RIS_WDTRIS 0x00000001 // Watchdog Raw Interrupt Status
  89. //******************************************************************************
  90. //
  91. // The following are defines for the bit fields in the WDT_O_MIS register.
  92. //
  93. //******************************************************************************
  94. #define WDT_MIS_WDTMIS 0x00000001 // Watchdog Masked Interrupt Status
  95. //******************************************************************************
  96. //
  97. // The following are defines for the bit fields in the WDT_O_TEST register.
  98. //
  99. //******************************************************************************
  100. #define WDT_TEST_STALL_EN_M 0x00000C00 // Watchdog stall enable
  101. #define WDT_TEST_STALL_EN_S 10
  102. #define WDT_TEST_STALL 0x00000100 // Watchdog Stall Enable
  103. //******************************************************************************
  104. //
  105. // The following are defines for the bit fields in the WDT_O_LOCK register.
  106. //
  107. //******************************************************************************
  108. #define WDT_LOCK_M 0xFFFFFFFF // Watchdog Lock
  109. #define WDT_LOCK_S 0
  110. #define WDT_LOCK_UNLOCKED 0x00000000 // Unlocked
  111. #define WDT_LOCK_LOCKED 0x00000001 // Locked
  112. #define WDT_LOCK_UNLOCK 0x1ACCE551 // Unlocks the watchdog timer
  113. //*****************************************************************************
  114. //
  115. // The following are defines for the bit fields in the WDT_ISR, WDT_RIS, and
  116. // WDT_MIS registers.
  117. //
  118. //*****************************************************************************
  119. #define WDT_INT_TIMEOUT 0x00000001 // Watchdog timer expired
  120. #endif // __HW_WDT_H__