You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

205 lines
6.2 KiB

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
  3. *
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions
  7. * are met:
  8. *
  9. * * Redistributions of source code must retain the above copyright
  10. * notice, this list of conditions and the following disclaimer.
  11. *
  12. * * 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
  15. * distribution.
  16. *
  17. * * Neither the name of Texas Instruments Incorporated nor the names of
  18. * its contributors may be used to endorse or promote products derived
  19. * from this software without specific prior written permission.
  20. *
  21. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  22. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  23. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  24. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  25. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  26. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  27. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  28. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  29. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  30. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  31. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  32. */
  33. #ifndef _SYS_MAILBOX_H_
  34. #define _SYS_MAILBOX_H_
  35. /* SYS_MAILBOX register set */
  36. typedef struct {
  37. /* SYS_MAILBOX_REVISION register bit field */
  38. union {
  39. volatile uint32_t REVISION;
  40. volatile struct {
  41. unsigned MINOR : 6; //5:0
  42. unsigned CUSTOM : 2; //7:6
  43. unsigned MAJOR : 3; //10:8
  44. unsigned RTL : 5; //15:11
  45. unsigned FUNC : 12; //27:16
  46. unsigned rsvd28 : 2; //29:28
  47. unsigned SCHEME : 2; //31:30
  48. } REVISION_bit;
  49. }; // 0x0
  50. uint32_t rsvd4[3]; // 0x4 - 0xC
  51. /* SYS_MAILBOX_SYSCONFIG register bit field */
  52. union {
  53. volatile uint32_t SYSCONFIG;
  54. volatile struct {
  55. unsigned SOFTRESET : 1; //0
  56. unsigned rsvd : 1; //1
  57. unsigned SLIDLEMODE : 2; //3:2
  58. unsigned rsvd1 : 28; //31:4
  59. } SYSCONFIG_bit;
  60. }; // 0x10
  61. uint32_t rsvd14[11]; // 0x14 - 0x3C
  62. /* SYS_MAILBOX_MESSAGE register bit fields */
  63. union {
  64. volatile uint32_t MESSAGE[8];
  65. volatile struct {
  66. unsigned MESSAGE : 32; //31:0
  67. } MESSAGE_bit[8];
  68. }; // 0x40-0x5C
  69. uint32_t rsvd60[8]; // 0x60 - 0x7C
  70. /* SYS_MAILBOX_FIFOSTATUS register bit fields */
  71. union {
  72. volatile uint32_t FIFOSTATUS[8];
  73. volatile struct {
  74. unsigned FIFOFULL : 1; //0
  75. unsigned rsvd : 31; //31:1
  76. } FIFOSTATUS_bit[8];
  77. }; // 0x80-0x9C
  78. uint32_t rsvdA0[8]; // 0xA0 - 0xBC
  79. /* SYS_MAILBOX_MSGSTATUS register bit fields */
  80. union {
  81. volatile uint32_t MSGSTATUS[8];
  82. volatile struct {
  83. unsigned NBOFMSG : 3; //2:0
  84. unsigned rsvd : 29; //31:3
  85. } MSGSTATUS_bit[8];
  86. }; // 0xC0-DC
  87. uint32_t rsvdE0[8]; // 0xE0 - 0xFC
  88. volatile struct {
  89. union {
  90. volatile uint32_t STATUS_RAW;
  91. volatile struct {
  92. unsigned NEWMSGSTATUSMB0 : 1; //0
  93. unsigned NOTFULLSTATUSMB0 : 1; //1
  94. unsigned NEWMSGSTATUSMB1 : 1; //2
  95. unsigned NOTFULLSTATUSMB1 : 1; //3
  96. unsigned NEWMSGSTATUSMB2 : 1; //4
  97. unsigned NOTFULLSTATUSMB2 : 1; //5
  98. unsigned NEWMSGSTATUSMB3 : 1; //6
  99. unsigned NOTFULLSTATUSMB3 : 1; //7
  100. unsigned NEWMSGSTATUSMB4 : 1; //8
  101. unsigned NOTFULLSTATUSMB4 : 1; //9
  102. unsigned NEWMSGSTATUSMB5 : 1; //10
  103. unsigned NOTFULLSTATUSMB5 : 1; //11
  104. unsigned NEWMSGSTATUSMB6 : 1; //12
  105. unsigned NOTFULLSTATUSMB6 : 1; //13
  106. unsigned NEWMSGSTATUSMB7 : 1; //14
  107. unsigned NOTFULLSTATUSMB7 : 1; //15
  108. unsigned rsvd : 16; //31:16
  109. } STATUS_RAW_bit;
  110. };
  111. union {
  112. volatile uint32_t STATUS_CLR;
  113. volatile struct {
  114. unsigned NEWMSGSTATUSMB0 : 1; //0
  115. unsigned NOTFULLSTATUSMB0 : 1; //1
  116. unsigned NEWMSGSTATUSMB1 : 1; //2
  117. unsigned NOTFULLSTATUSMB1 : 1; //3
  118. unsigned NEWMSGSTATUSMB2 : 1; //4
  119. unsigned NOTFULLSTATUSMB2 : 1; //5
  120. unsigned NEWMSGSTATUSMB3 : 1; //6
  121. unsigned NOTFULLSTATUSMB3 : 1; //7
  122. unsigned NEWMSGSTATUSMB4 : 1; //8
  123. unsigned NOTFULLSTATUSMB4 : 1; //9
  124. unsigned NEWMSGSTATUSMB5 : 1; //10
  125. unsigned NOTFULLSTATUSMB5 : 1; //11
  126. unsigned NEWMSGSTATUSMB6 : 1; //12
  127. unsigned NOTFULLSTATUSMB6 : 1; //13
  128. unsigned NEWMSGSTATUSMB7 : 1; //14
  129. unsigned NOTFULLSTATUSMB7 : 1; //15
  130. unsigned rsvd : 16; //31:16
  131. } STATUS_CLR_bit;
  132. };
  133. union {
  134. volatile uint32_t ENABLE_SET;
  135. volatile struct {
  136. unsigned NEWMSGSTATUSMB0 : 1; //0
  137. unsigned NOTFULLSTATUSMB0 : 1; //1
  138. unsigned NEWMSGSTATUSMB1 : 1; //2
  139. unsigned NOTFULLSTATUSMB1 : 1; //3
  140. unsigned NEWMSGSTATUSMB2 : 1; //4
  141. unsigned NOTFULLSTATUSMB2 : 1; //5
  142. unsigned NEWMSGSTATUSMB3 : 1; //6
  143. unsigned NOTFULLSTATUSMB3 : 1; //7
  144. unsigned NEWMSGSTATUSMB4 : 1; //8
  145. unsigned NOTFULLSTATUSMB4 : 1; //9
  146. unsigned NEWMSGSTATUSMB5 : 1; //10
  147. unsigned NOTFULLSTATUSMB5 : 1; //11
  148. unsigned NEWMSGSTATUSMB6 : 1; //12
  149. unsigned NOTFULLSTATUSMB6 : 1; //13
  150. unsigned NEWMSGSTATUSMB7 : 1; //14
  151. unsigned NOTFULLSTATUSMB7 : 1; //15
  152. unsigned rsvd : 16; //31:16
  153. } ENABLE_SET_bit;
  154. };
  155. union {
  156. volatile uint32_t ENABLE_CLR;
  157. volatile struct {
  158. unsigned NEWMSGSTATUSMB0 : 1; //0
  159. unsigned NOTFULLSTATUSMB0 : 1; //1
  160. unsigned NEWMSGSTATUSMB1 : 1; //2
  161. unsigned NOTFULLSTATUSMB1 : 1; //3
  162. unsigned NEWMSGSTATUSMB2 : 1; //4
  163. unsigned NOTFULLSTATUSMB2 : 1; //5
  164. unsigned NEWMSGSTATUSMB3 : 1; //6
  165. unsigned NOTFULLSTATUSMB3 : 1; //7
  166. unsigned NEWMSGSTATUSMB4 : 1; //8
  167. unsigned NOTFULLSTATUSMB4 : 1; //9
  168. unsigned NEWMSGSTATUSMB5 : 1; //10
  169. unsigned NOTFULLSTATUSMB5 : 1; //11
  170. unsigned NEWMSGSTATUSMB6 : 1; //12
  171. unsigned NOTFULLSTATUSMB6 : 1; //13
  172. unsigned NEWMSGSTATUSMB7 : 1; //14
  173. unsigned NOTFULLSTATUSMB7 : 1; //15
  174. unsigned rsvd : 16; //31:16
  175. } ENABLE_CLR_bit;
  176. };
  177. } IRQ[4];
  178. } sysMailbox;
  179. volatile __far sysMailbox CT_MBX __attribute__((cregister("MBX0", far), peripheral));
  180. #endif /* _SYS_MAILBOX_H_ */