1
0

hw_ccm.h 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. //*****************************************************************************
  2. //
  3. // hw_ccm.h - Macros used when accessing the CCM hardware.
  4. //
  5. // Copyright (c) 2012-2014 Texas Instruments Incorporated. All rights reserved.
  6. // Software License Agreement
  7. //
  8. // Redistribution and use in source and binary forms, with or without
  9. // modification, are permitted provided that the following conditions
  10. // are met:
  11. //
  12. // Redistributions of source code must retain the above copyright
  13. // notice, this list of conditions and the following disclaimer.
  14. //
  15. // Redistributions in binary form must reproduce the above copyright
  16. // notice, this list of conditions and the following disclaimer in the
  17. // documentation and/or other materials provided with the
  18. // distribution.
  19. //
  20. // Neither the name of Texas Instruments Incorporated nor the names of
  21. // its contributors may be used to endorse or promote products derived
  22. // from this software without specific prior written permission.
  23. //
  24. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  25. // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  26. // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  27. // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  28. // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  29. // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  30. // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  31. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  32. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  33. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  34. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  35. //
  36. // This is part of revision 2.1.0.12573 of the Tiva Firmware Development Package.
  37. //
  38. //*****************************************************************************
  39. #ifndef __HW_CCM_H__
  40. #define __HW_CCM_H__
  41. //*****************************************************************************
  42. //
  43. // The following are defines for the EC register offsets.
  44. //
  45. //*****************************************************************************
  46. #define CCM_O_CRCCTRL 0x00000400 // CRC Control
  47. #define CCM_O_CRCSEED 0x00000410 // CRC SEED/Context
  48. #define CCM_O_CRCDIN 0x00000414 // CRC Data Input
  49. #define CCM_O_CRCRSLTPP 0x00000418 // CRC Post Processing Result
  50. //*****************************************************************************
  51. //
  52. // The following are defines for the bit fields in the CCM_O_CRCCTRL register.
  53. //
  54. //*****************************************************************************
  55. #define CCM_CRCCTRL_INIT_M 0x00006000 // CRC Initialization
  56. #define CCM_CRCCTRL_INIT_SEED 0x00000000 // Use the CRCSEED register context
  57. // as the starting value
  58. #define CCM_CRCCTRL_INIT_0 0x00004000 // Initialize to all '0s'
  59. #define CCM_CRCCTRL_INIT_1 0x00006000 // Initialize to all '1s'
  60. #define CCM_CRCCTRL_SIZE 0x00001000 // Input Data Size
  61. #define CCM_CRCCTRL_RESINV 0x00000200 // Result Inverse Enable
  62. #define CCM_CRCCTRL_OBR 0x00000100 // Output Reverse Enable
  63. #define CCM_CRCCTRL_BR 0x00000080 // Bit reverse enable
  64. #define CCM_CRCCTRL_ENDIAN_M 0x00000030 // Endian Control
  65. #define CCM_CRCCTRL_ENDIAN_SBHW 0x00000000 // Configuration unchanged. (B3,
  66. // B2, B1, B0)
  67. #define CCM_CRCCTRL_ENDIAN_SHW 0x00000010 // Bytes are swapped in half-words
  68. // but half-words are not swapped
  69. // (B2, B3, B0, B1)
  70. #define CCM_CRCCTRL_ENDIAN_SHWNB \
  71. 0x00000020 // Half-words are swapped but bytes
  72. // are not swapped in half-word.
  73. // (B1, B0, B3, B2)
  74. #define CCM_CRCCTRL_ENDIAN_SBSW 0x00000030 // Bytes are swapped in half-words
  75. // and half-words are swapped. (B0,
  76. // B1, B2, B3)
  77. #define CCM_CRCCTRL_TYPE_M 0x0000000F // Operation Type
  78. #define CCM_CRCCTRL_TYPE_P8055 0x00000000 // Polynomial 0x8005
  79. #define CCM_CRCCTRL_TYPE_P1021 0x00000001 // Polynomial 0x1021
  80. #define CCM_CRCCTRL_TYPE_P4C11DB7 \
  81. 0x00000002 // Polynomial 0x4C11DB7
  82. #define CCM_CRCCTRL_TYPE_P1EDC6F41 \
  83. 0x00000003 // Polynomial 0x1EDC6F41
  84. #define CCM_CRCCTRL_TYPE_TCPCHKSUM \
  85. 0x00000008 // TCP checksum
  86. //*****************************************************************************
  87. //
  88. // The following are defines for the bit fields in the CCM_O_CRCSEED register.
  89. //
  90. //*****************************************************************************
  91. #define CCM_CRCSEED_SEED_M 0xFFFFFFFF // SEED/Context Value
  92. #define CCM_CRCSEED_SEED_S 0
  93. //*****************************************************************************
  94. //
  95. // The following are defines for the bit fields in the CCM_O_CRCDIN register.
  96. //
  97. //*****************************************************************************
  98. #define CCM_CRCDIN_DATAIN_M 0xFFFFFFFF // Data Input
  99. #define CCM_CRCDIN_DATAIN_S 0
  100. //*****************************************************************************
  101. //
  102. // The following are defines for the bit fields in the CCM_O_CRCRSLTPP
  103. // register.
  104. //
  105. //*****************************************************************************
  106. #define CCM_CRCRSLTPP_RSLTPP_M 0xFFFFFFFF // Post Processing Result
  107. #define CCM_CRCRSLTPP_RSLTPP_S 0
  108. #endif // __HW_CCM_H__