F2837xD_Can_defines.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. //#############################################################################
  2. //
  3. // FILE: F2837xD_Can_defines.h
  4. //
  5. // TITLE: Common defines used in CAN Test Cases
  6. //
  7. //#############################################################################
  8. // $TI Release: F2837xD Support Library v3.05.00.00 $
  9. // $Release Date: Tue Jun 26 03:15:23 CDT 2018 $
  10. // $Copyright:
  11. // Copyright (C) 2013-2018 Texas Instruments Incorporated - http://www.ti.com/
  12. //
  13. // Redistribution and use in source and binary forms, with or without
  14. // modification, are permitted provided that the following conditions
  15. // are met:
  16. //
  17. // Redistributions of source code must retain the above copyright
  18. // notice, this list of conditions and the following disclaimer.
  19. //
  20. // Redistributions in binary form must reproduce the above copyright
  21. // notice, this list of conditions and the following disclaimer in the
  22. // documentation and/or other materials provided with the
  23. // distribution.
  24. //
  25. // Neither the name of Texas Instruments Incorporated nor the names of
  26. // its contributors may be used to endorse or promote products derived
  27. // from this software without specific prior written permission.
  28. //
  29. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  30. // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  31. // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  32. // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  33. // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  34. // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  35. // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  36. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  37. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  38. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  39. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  40. // $
  41. //#############################################################################
  42. #ifndef F2837xD_CAN_DEFINES_H
  43. #define F2837xD_CAN_DEFINES_H
  44. #ifdef __cplusplus
  45. extern "C" {
  46. #endif
  47. //
  48. // Defines
  49. //
  50. //
  51. // Reset Values
  52. //
  53. #define CAN_RESET_VALUE_ZERO 0x00000000
  54. #define CAN_CTL_RESET_VALUE 0x00001401
  55. #define CAN_ES_RESET_VALUE 0x00000007
  56. #define CAN_BTR_RESET_VALUE 0x00002301
  57. #define CAN_REL_RESET_VALUE 0xA3170504
  58. #define CAN_RAM_INIT_RESET_VALUE 0x00000005
  59. #define CAN_IF_CMD_RESET_VALUE 0x00000001
  60. #define CAN_IF_MASK_RESET_VALUE 0xFFFFFFFF
  61. //
  62. // Register value when Peripheral Clock is Disabled
  63. //
  64. #define CAN_MODULE_CLK_DISABLE_VALUE 0x00000000
  65. //
  66. // Bit field definition of CAN_CTL register.
  67. //
  68. #define CAN_CTL_INIT 0x00000001 // Initialization
  69. #define CAN_CTL_IE0 0x00000002 // Interrupt Enable 0
  70. #define CAN_CTL_SIE 0x00000004 // Status Interrupt Enable
  71. #define CAN_CTL_EIE 0x00000008 // Error Interrupt Enable
  72. #define CAN_CTL_DAR 0x00000020 // Disable Automatic-Retransmission
  73. #define CAN_CTL_CCE 0x00000040 // Configuration Change Enable
  74. #define CAN_CTL_TEST 0x00000080 // Test Mode Enable
  75. #define CAN_CTL_IDS 0x00000100 // Interruption Debug Support Enable
  76. #define CAN_CTL_ABO 0x00000200 // Auto-Bus On Enable
  77. #define CAN_CTL_PMD_S 10
  78. #define CAN_CTL_PMD_M 0x00003C00 // Parity/SECDED Enable
  79. #define CAN_CTL_SWR 0x00008000 // Software Reset Enable
  80. #define CAN_CTL_INITDBG 0x00010000 // Debug Mode Status
  81. #define CAN_CTL_IE1 0x00020000 // Interrupt Enable 1
  82. #define CAN_CTL_PDR 0x01000000 // Power Down Mode Request
  83. #define CAN_CTL_WUBA 0x02000000 // Wake Up on Bus Activity
  84. //
  85. // Bit field definition of CAN_IF1_CMD register.
  86. //
  87. #define CAN_IF1_CMD_MESSNUM_S 0
  88. #define CAN_IF1_CMD_MESSNUM_M 0x000000FF // Message Number
  89. #define CAN_IF1_CMD_BUSY 0x00008000 // Busy Flag
  90. #define CAN_IF1_CMD_DATAB 0x00010000 // Access Data B
  91. #define CAN_IF1_CMD_DATAA 0x00020000 // Access Data A
  92. #define CAN_IF1_CMD_TXRQSTNDAT 0x00040000 // Transmission Request Bit
  93. #define CAN_IF1_CMD_CLRINTPND 0x00080000 // Clear Interrupt Pending Bit
  94. #define CAN_IF1_CMD_CONTROL 0x00100000 // Access Control Bits
  95. #define CAN_IF1_CMD_ARB 0x00200000 // Access Arbitration Bits
  96. #define CAN_IF1_CMD_MASK 0x00400000 // Access Mask Bits
  97. #define CAN_IF1_CMD_WR_RD 0x00800000 // Write and Read
  98. //
  99. // Bit field definition of CAN_IF2_CMD register.
  100. //
  101. #define CAN_IF2_CMD_MESSNUM_S 0
  102. #define CAN_IF2_CMD_MESSNUM_M 0x000000FF // Message Number
  103. #define CAN_IF2_CMD_BUSY 0x00008000 // Busy Flag
  104. #define CAN_IF2_CMD_DATAB 0x00010000 // Access Data B
  105. #define CAN_IF2_CMD_DATAA 0x00020000 // Access Data A
  106. #define CAN_IF2_CMD_TXRQSTNDAT 0x00040000 // Transmission Request Bit
  107. #define CAN_IF2_CMD_CLRINTPND 0x00080000 // Clear Interrupt Pending Bit
  108. #define CAN_IF2_CMD_CONTROL 0x00100000 // Access Control Bits
  109. #define CAN_IF2_CMD_ARB 0x00200000 // Access Arbitration Bits
  110. #define CAN_IF2_CMD_MASK 0x00400000 // Access Mask Bits
  111. #define CAN_IF2_CMD_WR_RD 0x00800000 // Write and Read
  112. #ifdef __cplusplus
  113. }
  114. #endif /* extern "C" */
  115. #endif // - end of F2837xD_CAN_DEFINES_H
  116. //
  117. // End of file
  118. //