uspi_reg.h 52 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677
  1. /**************************************************************************//**
  2. * @file uspi_reg.h
  3. * @version V1.00
  4. * @brief USPI register definition header file
  5. *
  6. * SPDX-License-Identifier: Apache-2.0
  7. * @copyright (C) 2017-2020 Nuvoton Technology Corp. All rights reserved.
  8. *****************************************************************************/
  9. #ifndef __USPI_REG_H__
  10. #define __USPI_REG_H__
  11. #if defined ( __CC_ARM )
  12. #pragma anon_unions
  13. #endif
  14. /**
  15. @addtogroup REGISTER Control Register
  16. @{
  17. */
  18. /**
  19. @addtogroup USPI SPI Mode of USCI Controller(USPI)
  20. Memory Mapped Structure for USPI Controller
  21. @{ */
  22. typedef struct
  23. {
  24. /**
  25. * @var USPI_T::CTL
  26. * Offset: 0x00 USCI Control Register
  27. * ---------------------------------------------------------------------------------------------------
  28. * |Bits |Field |Descriptions
  29. * | :----: | :----: | :---- |
  30. * |[2:0] |FUNMODE |Function Mode
  31. * | | |This bit field selects the protocol for this USCI controller
  32. * | | |Selecting a protocol that is not available or a reserved combination disables the USCI
  33. * | | |When switching between two protocols, the USCI has to be disabled before selecting a new protocol
  34. * | | |Simultaneously, the USCI will be reset when user write 000 to FUNMODE.
  35. * | | |000 = The USCI is disabled. All protocol related state machines are set to idle state.
  36. * | | |001 = The SPI protocol is selected.
  37. * | | |010 = The UART protocol is selected.
  38. * | | |100 = The I2C protocol is selected.
  39. * | | |Note: Other bit combinations are reserved.
  40. * @var USPI_T::INTEN
  41. * Offset: 0x04 USCI Interrupt Enable Register
  42. * ---------------------------------------------------------------------------------------------------
  43. * |Bits |Field |Descriptions
  44. * | :----: | :----: | :---- |
  45. * |[1] |TXSTIEN |Transmit Start Interrupt Enable Bit
  46. * | | |This bit enables the interrupt generation in case of a transmit start event.
  47. * | | |0 = The transmit start interrupt is disabled.
  48. * | | |1 = The transmit start interrupt is enabled.
  49. * |[2] |TXENDIEN |Transmit End Interrupt Enable Bit
  50. * | | |This bit enables the interrupt generation in case of a transmit finish event.
  51. * | | |0 = The transmit finish interrupt is disabled.
  52. * | | |1 = The transmit finish interrupt is enabled.
  53. * |[3] |RXSTIEN |Receive Start Interrupt Enable Bit
  54. * | | |This bit enables the interrupt generation in case of a receive start event.
  55. * | | |0 = The receive start interrupt is disabled.
  56. * | | |1 = The receive start interrupt is enabled.
  57. * |[4] |RXENDIEN |Receive End Interrupt Enable Bit
  58. * | | |This bit enables the interrupt generation in case of a receive finish event.
  59. * | | |0 = The receive end interrupt is disabled.
  60. * | | |1 = The receive end interrupt is enabled.
  61. * @var USPI_T::BRGEN
  62. * Offset: 0x08 USCI Baud Rate Generator Register
  63. * ---------------------------------------------------------------------------------------------------
  64. * |Bits |Field |Descriptions
  65. * | :----: | :----: | :---- |
  66. * |[0] |RCLKSEL |Reference Clock Source Selection
  67. * | | |This bit selects the source of reference clock (fREF_CLK).
  68. * | | |0 = Peripheral device clock fPCLK.
  69. * | | |1 = Reserved.
  70. * |[1] |PTCLKSEL |Protocol Clock Source Selection
  71. * | | |This bit selects the source of protocol clock (fPROT_CLK).
  72. * | | |0 = Reference clock fREF_CLK.
  73. * | | |1 = fREF_CLK2 (its frequency is half of fREF_CLK).
  74. * |[3:2] |SPCLKSEL |Sample Clock Source Selection
  75. * | | |This bit field used for the clock source selection of sample clock (fSAMP_CLK) for the protocol processor.
  76. * | | |00 = fDIV_CLK.
  77. * | | |01 = fPROT_CLK.
  78. * | | |10 = fSCLK.
  79. * | | |11 = fREF_CLK.
  80. * |[4] |TMCNTEN |Time Measurement Counter Enable Bit
  81. * | | |This bit enables the 10-bit timing measurement counter.
  82. * | | |0 = Time measurement counter is Disabled.
  83. * | | |1 = Time measurement counter is Enabled.
  84. * |[5] |TMCNTSRC |Time Measurement Counter Clock Source Selection
  85. * | | |0 = Time measurement counter with fPROT_CLK.
  86. * | | |1 = Time measurement counter with fDIV_CLK.
  87. * |[25:16] |CLKDIV |Clock Divider
  88. * | | |This bit field defines the ratio between the protocol clock frequency fPROT_CLK and the clock divider frequency fDIV_CLK (fDIV_CLK = fPROT_CLK / (CLKDIV+1) ).
  89. * | | |Note: In UART function, it can be updated by hardware in the 4th falling edge of the input data 0x55 when the auto baud rate function (ABREN(USPI_PROTCTL[6])) is enabled
  90. * | | |The revised value is the average bit time between bit 5 and bit 6
  91. * | | |The user can use revised CLKDIV and new BRDETITV (USPI_PROTCTL[24:16]) to calculate the precise baud rate.
  92. * @var USPI_T::DATIN0
  93. * Offset: 0x10 USCI Input Data Signal Configuration Register 0
  94. * ---------------------------------------------------------------------------------------------------
  95. * |Bits |Field |Descriptions
  96. * | :----: | :----: | :---- |
  97. * |[0] |SYNCSEL |Input Signal Synchronization Selection
  98. * | | |This bit selects if the un-synchronized input signal (with optionally inverted) or the synchronized (and optionally filtered) signal can be used as input for the data shift unit.
  99. * | | |0 = The un-synchronized signal can be taken as input for the data shift unit.
  100. * | | |1 = The synchronized signal can be taken as input for the data shift unit.
  101. * | | |Note: In SPI protocol, we suggest this bit should be set as 0.
  102. * |[2] |ININV |Input Signal Inverse Selection
  103. * | | |This bit defines the inverter enable of the input asynchronous signal.
  104. * | | |0 = The un-synchronized input signal will not be inverted.
  105. * | | |1 = The un-synchronized input signal will be inverted.
  106. * | | |Note: In SPI protocol, we suggest this bit should be set as 0.
  107. * @var USPI_T::CTLIN0
  108. * Offset: 0x20 USCI Input Control Signal Configuration Register 0
  109. * ---------------------------------------------------------------------------------------------------
  110. * |Bits |Field |Descriptions
  111. * | :----: | :----: | :---- |
  112. * |[0] |SYNCSEL |Input Synchronization Signal Selection
  113. * | | |This bit selects if the un-synchronized input signal (with optionally inverted) or the synchronized (and optionally filtered) signal can be used as input for the data shift unit.
  114. * | | |0 = The un-synchronized signal can be taken as input for the data shift unit.
  115. * | | |1 = The synchronized signal can be taken as input for the data shift unit.
  116. * | | |Note: In SPI protocol, we suggest this bit should be set as 0.
  117. * |[2] |ININV |Input Signal Inverse Selection
  118. * | | |This bit defines the inverter enable of the input asynchronous signal.
  119. * | | |0 = The un-synchronized input signal will not be inverted.
  120. * | | |1 = The un-synchronized input signal will be inverted.
  121. * @var USPI_T::CLKIN
  122. * Offset: 0x28 USCI Input Clock Signal Configuration Register
  123. * ---------------------------------------------------------------------------------------------------
  124. * |Bits |Field |Descriptions
  125. * | :----: | :----: | :---- |
  126. * |[0] |SYNCSEL |Input Synchronization Signal Selection
  127. * | | |This bit selects if the un-synchronized input signal or the synchronized (and optionally filtered) signal can be used as input for the data shift unit.
  128. * | | |0 = The un-synchronized signal can be taken as input for the data shift unit.
  129. * | | |1 = The synchronized signal can be taken as input for the data shift unit.
  130. * | | |Note: In SPI protocol, we suggest this bit should be set as 0.
  131. * @var USPI_T::LINECTL
  132. * Offset: 0x2C USCI Line Control Register
  133. * ---------------------------------------------------------------------------------------------------
  134. * |Bits |Field |Descriptions
  135. * | :----: | :----: | :---- |
  136. * |[0] |LSB |LSB First Transmission Selection
  137. * | | |0 = The MSB, which bit of transmit/receive data buffer depends on the setting of DWIDTH, is transmitted/received first.
  138. * | | |1 = The LSB, the bit 0 of data buffer, will be transmitted/received first.
  139. * |[5] |DATOINV |Data Output Inverse Selection
  140. * | | |This bit defines the relation between the internal shift data value and the output data signal of USCIx_DAT0/1 pin.
  141. * | | |0 = Data output level is not inverted.
  142. * | | |1 = Data output level is inverted.
  143. * |[7] |CTLOINV |Control Signal Output Inverse Selection
  144. * | | |This bit defines the relation between the internal control signal and the output control signal.
  145. * | | |0 = No effect.
  146. * | | |1 = The control signal will be inverted before its output.
  147. * | | |Note: The control signal has different definitions in different protocol
  148. * | | |In SPI protocol, the control signal means slave select signal
  149. * |[11:8] |DWIDTH |Word Length of Transmission
  150. * | | |This bit field defines the data word length (amount of bits) for reception and transmission
  151. * | | |The data word is always right-aligned in the data buffer
  152. * | | |USCI support word length from 4 to 16 bits.
  153. * | | |0x0: The data word contains 16 bits located at bit positions [15:0].
  154. * | | |0x1: Reserved.
  155. * | | |0x2: Reserved.
  156. * | | |0x3: Reserved.
  157. * | | |0x4: The data word contains 4 bits located at bit positions [3:0].
  158. * | | |0x5: The data word contains 5 bits located at bit positions [4:0].
  159. * | | |...
  160. * | | |0xF: The data word contains 15 bits located at bit positions [14:0].
  161. * @var USPI_T::TXDAT
  162. * Offset: 0x30 USCI Transmit Data Register
  163. * ---------------------------------------------------------------------------------------------------
  164. * |Bits |Field |Descriptions
  165. * | :----: | :----: | :---- |
  166. * |[15:0] |TXDAT |Transmit Data
  167. * | | |Software can use this bit field to write 16-bit transmit data for transmission
  168. * | | |In order to avoid overwriting the transmit data, user have to check TXEMPTY (USPI_BUFSTS[8]) status before writing transmit data into this bit field.
  169. * |[16] |PORTDIR |Port Direction Control
  170. * | | |This bit field is only available while USCI operates in SPI protocol (FUNMODE = 0x1) with half-duplex transfer
  171. * | | |It is used to define the direction of the data port pin
  172. * | | |When software writes USPI_TXDAT register, the transmit data and its port direction are settled simultaneously.
  173. * | | |0 = The data pin is configured as output mode.
  174. * | | |1 = The data pin is configured as input mode.
  175. * @var USPI_T::RXDAT
  176. * Offset: 0x34 USCI Receive Data Register
  177. * ---------------------------------------------------------------------------------------------------
  178. * |Bits |Field |Descriptions
  179. * | :----: | :----: | :---- |
  180. * |[15:0] |RXDAT |Received Data
  181. * | | |This bit field monitors the received data which stored in receive data buffer.
  182. * @var USPI_T::BUFCTL
  183. * Offset: 0x38 USCI Transmit/Receive Buffer Control Register
  184. * ---------------------------------------------------------------------------------------------------
  185. * |Bits |Field |Descriptions
  186. * | :----: | :----: | :---- |
  187. * |[6] |TXUDRIEN |Slave Transmit Under Run Interrupt Enable Bit
  188. * | | |0 = Transmit under-run interrupt Disabled.
  189. * | | |1 = Transmit under-run interrupt Enabled.
  190. * |[7] |TXCLR |Clear Transmit Buffer
  191. * | | |0 = No effect.
  192. * | | |1 = The transmit buffer is cleared
  193. * | | |Should only be used while the buffer is not taking part in data traffic.
  194. * | | |Note: It is cleared automatically after one PCLK cycle.
  195. * |[14] |RXOVIEN |Receive Buffer Overrun Interrupt Enable Bit
  196. * | | |0 = Receive overrun interrupt Disabled.
  197. * | | |1 = Receive overrun interrupt Enabled.
  198. * |[15] |RXCLR |Clear Receive Buffer
  199. * | | |0 = No effect.
  200. * | | |1 = The receive buffer is cleared
  201. * | | |Should only be used while the buffer is not taking part in data traffic.
  202. * | | |Note: It is cleared automatically after one PCLK cycle.
  203. * |[16] |TXRST |Transmit Reset
  204. * | | |0 = No effect.
  205. * | | |1 = Reset the transmit-related counters, state machine, and the content of transmit shift register and data buffer.
  206. * | | |Note: It is cleared automatically after one PCLK cycle.
  207. * |[17] |RXRST |Receive Reset
  208. * | | |0 = No effect.
  209. * | | |1 = Reset the receive-related counters, state machine, and the content of receive shift register and data buffer.
  210. * | | |Note: It is cleared automatically after one PCLK cycle.
  211. * @var USPI_T::BUFSTS
  212. * Offset: 0x3C USCI Transmit/Receive Buffer Status Register
  213. * ---------------------------------------------------------------------------------------------------
  214. * |Bits |Field |Descriptions
  215. * | :----: | :----: | :---- |
  216. * |[0] |RXEMPTY |Receive Buffer Empty Indicator
  217. * | | |0 = Receive buffer is not empty.
  218. * | | |1 = Receive buffer is empty.
  219. * |[1] |RXFULL |Receive Buffer Full Indicator
  220. * | | |0 = Receive buffer is not full.
  221. * | | |1 = Receive buffer is full.
  222. * |[3] |RXOVIF |Receive Buffer Over-run Interrupt Status
  223. * | | |This bit indicates that a receive buffer overrun event has been detected
  224. * | | |If RXOVIEN (USPI_BUFCTL[14]) is enabled, the corresponding interrupt request is activated
  225. * | | |It is cleared by software writes 1 to this bit.
  226. * | | |0 = A receive buffer overrun event has not been detected.
  227. * | | |1 = A receive buffer overrun event has been detected.
  228. * |[8] |TXEMPTY |Transmit Buffer Empty Indicator
  229. * | | |0 = Transmit buffer is not empty.
  230. * | | |1 = Transmit buffer is empty and available for the next transmission datum.
  231. * |[9] |TXFULL |Transmit Buffer Full Indicator
  232. * | | |0 = Transmit buffer is not full.
  233. * | | |1 = Transmit buffer is full.
  234. * |[11] |TXUDRIF |Transmit Buffer Under-run Interrupt Status
  235. * | | |This bit indicates that a transmit buffer under-run event has been detected
  236. * | | |If enabled by TXUDRIEN (USPI_BUFCTL[6]), the corresponding interrupt request is activated
  237. * | | |It is cleared by software writes 1 to this bit
  238. * | | |0 = A transmit buffer under-run event has not been detected.
  239. * | | |1 = A transmit buffer under-run event has been detected.
  240. * @var USPI_T::PDMACTL
  241. * Offset: 0x40 USCI PDMA Control Register
  242. * ---------------------------------------------------------------------------------------------------
  243. * |Bits |Field |Descriptions
  244. * | :----: | :----: | :---- |
  245. * |[0] |PDMARST |PDMA Reset
  246. * | | |0 = No effect.
  247. * | | |1 = Reset the USCI's PDMA control logic. This bit will be cleared to 0 automatically.
  248. * |[1] |TXPDMAEN |PDMA Transmit Channel Available
  249. * | | |0 = Transmit PDMA function Disabled.
  250. * | | |1 = Transmit PDMA function Enabled.
  251. * |[2] |RXPDMAEN |PDMA Receive Channel Available
  252. * | | |0 = Receive PDMA function Disabled.
  253. * | | |1 = Receive PDMA function Enabled.
  254. * |[3] |PDMAEN |PDMA Mode Enable Bit
  255. * | | |0 = PDMA function Disabled.
  256. * | | |1 = PDMA function Enabled.
  257. * | | |Notice: The I2C is not supporting PDMA function.
  258. * @var USPI_T::WKCTL
  259. * Offset: 0x54 USCI Wake-up Control Register
  260. * ---------------------------------------------------------------------------------------------------
  261. * |Bits |Field |Descriptions
  262. * | :----: | :----: | :---- |
  263. * |[0] |WKEN |Wake-up Enable Bit
  264. * | | |0 = Wake-up function Disabled.
  265. * | | |1 = Wake-up function Enabled.
  266. * |[1] |WKADDREN |Wake-up Address Match Enable Bit
  267. * | | |0 = The chip is woken up according data toggle.
  268. * | | |1 = The chip is woken up according address match.
  269. * |[2] |PDBOPT |Power Down Blocking Option
  270. * | | |0 = If user attempts to enter Power-down mode by executing WFI while the protocol is in transferring, MCU will stop the transfer and enter Power-down mode immediately.
  271. * | | |1 = If user attempts to enter Power-down mode by executing WFI while the protocol is in transferring, the on-going transfer will not be stopped and MCU will enter idle mode immediately.
  272. * @var USPI_T::WKSTS
  273. * Offset: 0x58 USCI Wake-up Status Register
  274. * ---------------------------------------------------------------------------------------------------
  275. * |Bits |Field |Descriptions
  276. * | :----: | :----: | :---- |
  277. * |[0] |WKF |Wake-up Flag
  278. * | | |When chip is woken up from Power-down mode, this bit is set to 1
  279. * | | |Software can write 1 to clear this bit.
  280. * @var USPI_T::PROTCTL
  281. * Offset: 0x5C USCI Protocol Control Register
  282. * ---------------------------------------------------------------------------------------------------
  283. * |Bits |Field |Descriptions
  284. * | :----: | :----: | :---- |
  285. * |[0] |SLAVE |Slave Mode Selection
  286. * | | |0 = Master mode.
  287. * | | |1 = Slave mode.
  288. * |[1] |SLV3WIRE |Slave 3-wire Mode Selection (Slave Only)
  289. * | | |The SPI protocol can work with 3-wire interface (without slave select signal) in Slave mode.
  290. * | | |0 = 4-wire bi-direction interface.
  291. * | | |1 = 3-wire bi-direction interface.
  292. * |[2] |SS |Slave Select Control (Master Only)
  293. * | | |If AUTOSS bit is cleared, setting this bit to 1 will set the slave select signal to active state, and setting this bit to 0 will set the slave select signal back to inactive state.
  294. * | | |If the AUTOSS function is enabled (AUTOSS = 1), the setting value of this bit will not affect the current state of slave select signal.
  295. * | | |Note: In SPI protocol, the internal slave select signal is active high.
  296. * |[3] |AUTOSS |Automatic Slave Select Function Enable (Master Only)
  297. * | | |0 = Slave select signal will be controlled by the setting value of SS (USPI_PROTCTL[2]) bit.
  298. * | | |1 = Slave select signal will be generated automatically
  299. * | | |The slave select signal will be asserted by the SPI controller when transmit/receive is started, and will be de-asserted after each transmit/receive is finished.
  300. * |[7:6] |SCLKMODE |Serial Bus Clock Mode
  301. * | | |This bit field defines the SCLK idle status, data transmit, and data receive edge.
  302. * | | |MODE0 = The idle state of SPI clock is low level
  303. * | | |Data is transmitted with falling edge and received with rising edge.
  304. * | | |MODE1 = The idle state of SPI clock is low level
  305. * | | |Data is transmitted with rising edge and received with falling edge.
  306. * | | |MODE2 = The idle state of SPI clock is high level
  307. * | | |Data is transmitted with rising edge and received with falling edge.
  308. * | | |MODE3 = The idle state of SPI clock is high level
  309. * | | |Data is transmitted with falling edge and received with rising edge.
  310. * |[11:8] |SUSPITV |Suspend Interval (Master Only)
  311. * | | |This bit field provides the configurable suspend interval between two successive transmit/receive transaction in a transfer
  312. * | | |The definition of the suspend interval is the interval between the last clock edge of the preceding transaction word and the first clock edge of the following transaction word
  313. * | | |The default value is 0x3
  314. * | | |The period of the suspend interval is obtained according to the following equation.
  315. * | | |(SUSPITV[3:0] + 0.5) * period of SPI_CLK clock cycle
  316. * | | |Example:
  317. * | | |SUSPITV = 0x0 ... 0.5 SPI_CLK clock cycle.
  318. * | | |SUSPITV = 0x1 ... 1.5 SPI_CLK clock cycle.
  319. * | | |.....
  320. * | | |SUSPITV = 0xE ... 14.5 SPI_CLK clock cycle.
  321. * | | |SUSPITV = 0xF ... 15.5 SPI_CLK clock cycle.
  322. * |[14:12] |TSMSEL |Transmit Data Mode Selection
  323. * | | |This bit field describes how receive and transmit data is shifted in and out.
  324. * | | |TSMSEL = 000b: Full-duplex SPI.
  325. * | | |TSMSEL = 100b: Half-duplex SPI.
  326. * | | |Other values are reserved.
  327. * | | |Note: Changing the value of this bit field will produce the TXRST and RXRST to clear the TX/RX data buffer automatically.
  328. * |[25:16] |SLVTOCNT |Slave Mode Time-out Period (Slave Only)
  329. * | | |In Slave mode, this bit field is used for Slave time-out period
  330. * | | |This bit field indicates how many clock periods (selected by TMCNTSRC, USPI_BRGEN[5]) between the two edges of input SCLK will assert the Slave time-out event
  331. * | | |Writing 0x0 into this bit field will disable the Slave time-out function.
  332. * | | |Example: Assume SLVTOCNT is 0x0A and TMCNTSRC (USPI_BRGEN[5]) is 1, it means the time-out event will occur if the state of SPI bus clock pin is not changed more than (10+1) periods of fDIV_CLK.
  333. * |[28] |TXUDRPOL |Transmit Under-run Data Polarity (for Slave)
  334. * | | |This bit defines the transmitting data level when no data is available for transferring.
  335. * | | |0 = The output data level is 0 if TX under run event occurs.
  336. * | | |1 = The output data level is 1 if TX under run event occurs.
  337. * |[31] |PROTEN |SPI Protocol Enable Bit
  338. * | | |0 = SPI Protocol Disabled.
  339. * | | |1 = SPI Protocol Enabled.
  340. * @var USPI_T::PROTIEN
  341. * Offset: 0x60 USCI Protocol Interrupt Enable Register
  342. * ---------------------------------------------------------------------------------------------------
  343. * |Bits |Field |Descriptions
  344. * | :----: | :----: | :---- |
  345. * |[0] |SSINAIEN |Slave Select Inactive Interrupt Enable Control
  346. * | | |This bit enables/disables the generation of a slave select interrupt if the slave select changes to inactive.
  347. * | | |0 = Slave select inactive interrupt generation Disabled.
  348. * | | |1 = Slave select inactive interrupt generation Enabled.
  349. * |[1] |SSACTIEN |Slave Select Active Interrupt Enable Control
  350. * | | |This bit enables/disables the generation of a slave select interrupt if the slave select changes to active.
  351. * | | |0 = Slave select active interrupt generation Disabled.
  352. * | | |1 = Slave select active interrupt generation Enabled.
  353. * |[2] |SLVTOIEN |Slave Time-out Interrupt Enable Control
  354. * | | |In SPI protocol, this bit enables the interrupt generation in case of a Slave time-out event.
  355. * | | |0 = The Slave time-out interrupt Disabled.
  356. * | | |1 = The Slave time-out interrupt Enabled.
  357. * |[3] |SLVBEIEN |Slave Mode Bit Count Error Interrupt Enable Control
  358. * | | |If data transfer is terminated by slave time-out or slave select inactive event in Slave mode, so that the transmit/receive data bit count does not match the setting of DWIDTH (USPI_LINECTL[11:8])
  359. * | | |Bit count error event occurs.
  360. * | | |0 = The Slave mode bit count error interrupt Disabled.
  361. * | | |1 = The Slave mode bit count error interrupt Enabled.
  362. * @var USPI_T::PROTSTS
  363. * Offset: 0x64 USCI Protocol Status Register
  364. * ---------------------------------------------------------------------------------------------------
  365. * |Bits |Field |Descriptions
  366. * | :----: | :----: | :---- |
  367. * |[1] |TXSTIF |Transmit Start Interrupt Flag
  368. * | | |0 = Transmit start event does not occur.
  369. * | | |1 = Transmit start event occurs.
  370. * | | |Note: It is cleared by software writes 1 to this bit
  371. * |[2] |TXENDIF |Transmit End Interrupt Flag
  372. * | | |0 = Transmit end event does not occur.
  373. * | | |1 = Transmit end event occurs.
  374. * | | |Note: It is cleared by software writes 1 to this bit
  375. * |[3] |RXSTIF |Receive Start Interrupt Flag
  376. * | | |0 = Receive start event does not occur.
  377. * | | |1 = Receive start event occurs.
  378. * | | |Note: It is cleared by software writes 1 to this bit
  379. * |[4] |RXENDIF |Receive End Interrupt Flag
  380. * | | |0 = Receive end event does not occur.
  381. * | | |1 = Receive end event occurs.
  382. * | | |Note: It is cleared by software writes 1 to this bit
  383. * |[5] |SLVTOIF |Slave Time-out Interrupt Flag (for Slave Only)
  384. * | | |0 = Slave time-out event does not occur.
  385. * | | |1 = Slave time-out event occurs.
  386. * | | |Note: It is cleared by software writes 1 to this bit
  387. * |[6] |SLVBEIF |Slave Bit Count Error Interrupt Flag (for Slave Only)
  388. * | | |0 = Slave bit count error event does not occur.
  389. * | | |1 = Slave bit count error event occurs.
  390. * | | |Note: It is cleared by software writes 1 to this bit.
  391. * |[8] |SSINAIF |Slave Select Inactive Interrupt Flag (for Slave Only)
  392. * | | |This bit indicates that the internal slave select signal has changed to inactive
  393. * | | |It is cleared by software writes 1 to this bit
  394. * | | |0 = The slave select signal has not changed to inactive.
  395. * | | |1 = The slave select signal has changed to inactive.
  396. * | | |Note: The internal slave select signal is active high.
  397. * |[9] |SSACTIF |Slave Select Active Interrupt Flag (for Slave Only)
  398. * | | |This bit indicates that the internal slave select signal has changed to active
  399. * | | |It is cleared by software writes one to this bit
  400. * | | |0 = The slave select signal has not changed to active.
  401. * | | |1 = The slave select signal has changed to active.
  402. * | | |Note: The internal slave select signal is active high.
  403. * |[16] |SSLINE |Slave Select Line Bus Status (Read Only)
  404. * | | |This bit is only available in Slave mode
  405. * | | |It used to monitor the current status of the input slave select signal on the bus.
  406. * | | |0 = The slave select line status is 0.
  407. * | | |1 = The slave select line status is 1.
  408. * |[17] |BUSY |Busy Status (Read Only)
  409. * | | |0 = SPI is in idle state.
  410. * | | |1 = SPI is in busy state.
  411. * | | |The following listing are the bus busy conditions:
  412. * | | |a. USPI_PROTCTL[31] = 1 and the TXEMPTY = 0.
  413. * | | |b. For SPI Master mode, the TXEMPTY = 1 but the current transaction is not finished yet.
  414. * | | |c. For SPI Slave mode, the USPI_PROTCTL[31] = 1 and there is serial clock input into the SPI core logic when slave select is active.
  415. * | | |d. For SPI Slave mode, the USPI_PROTCTL[31] = 1 and the transmit buffer or transmit shift register is not empty even if the slave select is inactive.
  416. * |[18] |SLVUDR |Slave Mode Transmit Under-run Status (Read Only)
  417. * | | |In Slave mode, if there is no available transmit data in buffer while transmit data shift out caused by input serial bus clock, this status flag will be set to 1
  418. * | | |This bit indicates whether the current shift-out data of word transmission is switched to TXUDRPOL (USPI_PROTCTL[28]) or not.
  419. * | | |0 = Slave transmit under-run event does not occur.
  420. * | | |1 = Slave transmit under-run event occurs.
  421. */
  422. __IO uint32_t CTL; /*!< [0x0000] USCI Control Register */
  423. __IO uint32_t INTEN; /*!< [0x0004] USCI Interrupt Enable Register */
  424. __IO uint32_t BRGEN; /*!< [0x0008] USCI Baud Rate Generator Register */
  425. /// @cond HIDDEN_SYMBOLS
  426. __I uint32_t RESERVE0[1];
  427. /// @endcond //HIDDEN_SYMBOLS
  428. __IO uint32_t DATIN0; /*!< [0x0010] USCI Input Data Signal Configuration Register 0 */
  429. /// @cond HIDDEN_SYMBOLS
  430. __I uint32_t RESERVE1[3];
  431. /// @endcond //HIDDEN_SYMBOLS
  432. __IO uint32_t CTLIN0; /*!< [0x0020] USCI Input Control Signal Configuration Register 0 */
  433. /// @cond HIDDEN_SYMBOLS
  434. __I uint32_t RESERVE2[1];
  435. /// @endcond //HIDDEN_SYMBOLS
  436. __IO uint32_t CLKIN; /*!< [0x0028] USCI Input Clock Signal Configuration Register */
  437. __IO uint32_t LINECTL; /*!< [0x002c] USCI Line Control Register */
  438. __O uint32_t TXDAT; /*!< [0x0030] USCI Transmit Data Register */
  439. __I uint32_t RXDAT; /*!< [0x0034] USCI Receive Data Register */
  440. __IO uint32_t BUFCTL; /*!< [0x0038] USCI Transmit/Receive Buffer Control Register */
  441. __IO uint32_t BUFSTS; /*!< [0x003c] USCI Transmit/Receive Buffer Status Register */
  442. __IO uint32_t PDMACTL; /*!< [0x0040] USCI PDMA Control Register */
  443. /// @cond HIDDEN_SYMBOLS
  444. __I uint32_t RESERVE3[4];
  445. /// @endcond //HIDDEN_SYMBOLS
  446. __IO uint32_t WKCTL; /*!< [0x0054] USCI Wake-up Control Register */
  447. __IO uint32_t WKSTS; /*!< [0x0058] USCI Wake-up Status Register */
  448. __IO uint32_t PROTCTL; /*!< [0x005c] USCI Protocol Control Register */
  449. __IO uint32_t PROTIEN; /*!< [0x0060] USCI Protocol Interrupt Enable Register */
  450. __IO uint32_t PROTSTS; /*!< [0x0064] USCI Protocol Status Register */
  451. } USPI_T;
  452. /**
  453. @addtogroup USPI_CONST USPI Bit Field Definition
  454. Constant Definitions for USPI Controller
  455. @{ */
  456. #define USPI_CTL_FUNMODE_Pos (0) /*!< USPI_T::CTL: FUNMODE Position */
  457. #define USPI_CTL_FUNMODE_Msk (0x7ul << USPI_CTL_FUNMODE_Pos) /*!< USPI_T::CTL: FUNMODE Mask */
  458. #define USPI_INTEN_TXSTIEN_Pos (1) /*!< USPI_T::INTEN: TXSTIEN Position */
  459. #define USPI_INTEN_TXSTIEN_Msk (0x1ul << USPI_INTEN_TXSTIEN_Pos) /*!< USPI_T::INTEN: TXSTIEN Mask */
  460. #define USPI_INTEN_TXENDIEN_Pos (2) /*!< USPI_T::INTEN: TXENDIEN Position */
  461. #define USPI_INTEN_TXENDIEN_Msk (0x1ul << USPI_INTEN_TXENDIEN_Pos) /*!< USPI_T::INTEN: TXENDIEN Mask */
  462. #define USPI_INTEN_RXSTIEN_Pos (3) /*!< USPI_T::INTEN: RXSTIEN Position */
  463. #define USPI_INTEN_RXSTIEN_Msk (0x1ul << USPI_INTEN_RXSTIEN_Pos) /*!< USPI_T::INTEN: RXSTIEN Mask */
  464. #define USPI_INTEN_RXENDIEN_Pos (4) /*!< USPI_T::INTEN: RXENDIEN Position */
  465. #define USPI_INTEN_RXENDIEN_Msk (0x1ul << USPI_INTEN_RXENDIEN_Pos) /*!< USPI_T::INTEN: RXENDIEN Mask */
  466. #define USPI_BRGEN_RCLKSEL_Pos (0) /*!< USPI_T::BRGEN: RCLKSEL Position */
  467. #define USPI_BRGEN_RCLKSEL_Msk (0x1ul << USPI_BRGEN_RCLKSEL_Pos) /*!< USPI_T::BRGEN: RCLKSEL Mask */
  468. #define USPI_BRGEN_PTCLKSEL_Pos (1) /*!< USPI_T::BRGEN: PTCLKSEL Position */
  469. #define USPI_BRGEN_PTCLKSEL_Msk (0x1ul << USPI_BRGEN_PTCLKSEL_Pos) /*!< USPI_T::BRGEN: PTCLKSEL Mask */
  470. #define USPI_BRGEN_SPCLKSEL_Pos (2) /*!< USPI_T::BRGEN: SPCLKSEL Position */
  471. #define USPI_BRGEN_SPCLKSEL_Msk (0x3ul << USPI_BRGEN_SPCLKSEL_Pos) /*!< USPI_T::BRGEN: SPCLKSEL Mask */
  472. #define USPI_BRGEN_TMCNTEN_Pos (4) /*!< USPI_T::BRGEN: TMCNTEN Position */
  473. #define USPI_BRGEN_TMCNTEN_Msk (0x1ul << USPI_BRGEN_TMCNTEN_Pos) /*!< USPI_T::BRGEN: TMCNTEN Mask */
  474. #define USPI_BRGEN_TMCNTSRC_Pos (5) /*!< USPI_T::BRGEN: TMCNTSRC Position */
  475. #define USPI_BRGEN_TMCNTSRC_Msk (0x1ul << USPI_BRGEN_TMCNTSRC_Pos) /*!< USPI_T::BRGEN: TMCNTSRC Mask */
  476. #define USPI_BRGEN_CLKDIV_Pos (16) /*!< USPI_T::BRGEN: CLKDIV Position */
  477. #define USPI_BRGEN_CLKDIV_Msk (0x3fful << USPI_BRGEN_CLKDIV_Pos) /*!< USPI_T::BRGEN: CLKDIV Mask */
  478. #define USPI_DATIN0_SYNCSEL_Pos (0) /*!< USPI_T::DATIN0: SYNCSEL Position */
  479. #define USPI_DATIN0_SYNCSEL_Msk (0x1ul << USPI_DATIN0_SYNCSEL_Pos) /*!< USPI_T::DATIN0: SYNCSEL Mask */
  480. #define USPI_DATIN0_ININV_Pos (2) /*!< USPI_T::DATIN0: ININV Position */
  481. #define USPI_DATIN0_ININV_Msk (0x1ul << USPI_DATIN0_ININV_Pos) /*!< USPI_T::DATIN0: ININV Mask */
  482. #define USPI_CTLIN0_SYNCSEL_Pos (0) /*!< USPI_T::CTLIN0: SYNCSEL Position */
  483. #define USPI_CTLIN0_SYNCSEL_Msk (0x1ul << USPI_CTLIN0_SYNCSEL_Pos) /*!< USPI_T::CTLIN0: SYNCSEL Mask */
  484. #define USPI_CTLIN0_ININV_Pos (2) /*!< USPI_T::CTLIN0: ININV Position */
  485. #define USPI_CTLIN0_ININV_Msk (0x1ul << USPI_CTLIN0_ININV_Pos) /*!< USPI_T::CTLIN0: ININV Mask */
  486. #define USPI_CLKIN_SYNCSEL_Pos (0) /*!< USPI_T::CLKIN: SYNCSEL Position */
  487. #define USPI_CLKIN_SYNCSEL_Msk (0x1ul << USPI_CLKIN_SYNCSEL_Pos) /*!< USPI_T::CLKIN: SYNCSEL Mask */
  488. #define USPI_LINECTL_LSB_Pos (0) /*!< USPI_T::LINECTL: LSB Position */
  489. #define USPI_LINECTL_LSB_Msk (0x1ul << USPI_LINECTL_LSB_Pos) /*!< USPI_T::LINECTL: LSB Mask */
  490. #define USPI_LINECTL_DATOINV_Pos (5) /*!< USPI_T::LINECTL: DATOINV Position */
  491. #define USPI_LINECTL_DATOINV_Msk (0x1ul << USPI_LINECTL_DATOINV_Pos) /*!< USPI_T::LINECTL: DATOINV Mask */
  492. #define USPI_LINECTL_CTLOINV_Pos (7) /*!< USPI_T::LINECTL: CTLOINV Position */
  493. #define USPI_LINECTL_CTLOINV_Msk (0x1ul << USPI_LINECTL_CTLOINV_Pos) /*!< USPI_T::LINECTL: CTLOINV Mask */
  494. #define USPI_LINECTL_DWIDTH_Pos (8) /*!< USPI_T::LINECTL: DWIDTH Position */
  495. #define USPI_LINECTL_DWIDTH_Msk (0xful << USPI_LINECTL_DWIDTH_Pos) /*!< USPI_T::LINECTL: DWIDTH Mask */
  496. #define USPI_TXDAT_TXDAT_Pos (0) /*!< USPI_T::TXDAT: TXDAT Position */
  497. #define USPI_TXDAT_TXDAT_Msk (0xfffful << USPI_TXDAT_TXDAT_Pos) /*!< USPI_T::TXDAT: TXDAT Mask */
  498. #define USPI_TXDAT_PORTDIR_Pos (16) /*!< USPI_T::TXDAT: PORTDIR Position */
  499. #define USPI_TXDAT_PORTDIR_Msk (0x1ul << USPI_TXDAT_PORTDIR_Pos) /*!< USPI_T::TXDAT: PORTDIR Mask */
  500. #define USPI_RXDAT_RXDAT_Pos (0) /*!< USPI_T::RXDAT: RXDAT Position */
  501. #define USPI_RXDAT_RXDAT_Msk (0xfffful << USPI_RXDAT_RXDAT_Pos) /*!< USPI_T::RXDAT: RXDAT Mask */
  502. #define USPI_BUFCTL_TXUDRIEN_Pos (6) /*!< USPI_T::BUFCTL: TXUDRIEN Position */
  503. #define USPI_BUFCTL_TXUDRIEN_Msk (0x1ul << USPI_BUFCTL_TXUDRIEN_Pos) /*!< USPI_T::BUFCTL: TXUDRIEN Mask */
  504. #define USPI_BUFCTL_TXCLR_Pos (7) /*!< USPI_T::BUFCTL: TXCLR Position */
  505. #define USPI_BUFCTL_TXCLR_Msk (0x1ul << USPI_BUFCTL_TXCLR_Pos) /*!< USPI_T::BUFCTL: TXCLR Mask */
  506. #define USPI_BUFCTL_RXOVIEN_Pos (14) /*!< USPI_T::BUFCTL: RXOVIEN Position */
  507. #define USPI_BUFCTL_RXOVIEN_Msk (0x1ul << USPI_BUFCTL_RXOVIEN_Pos) /*!< USPI_T::BUFCTL: RXOVIEN Mask */
  508. #define USPI_BUFCTL_RXCLR_Pos (15) /*!< USPI_T::BUFCTL: RXCLR Position */
  509. #define USPI_BUFCTL_RXCLR_Msk (0x1ul << USPI_BUFCTL_RXCLR_Pos) /*!< USPI_T::BUFCTL: RXCLR Mask */
  510. #define USPI_BUFCTL_TXRST_Pos (16) /*!< USPI_T::BUFCTL: TXRST Position */
  511. #define USPI_BUFCTL_TXRST_Msk (0x1ul << USPI_BUFCTL_TXRST_Pos) /*!< USPI_T::BUFCTL: TXRST Mask */
  512. #define USPI_BUFCTL_RXRST_Pos (17) /*!< USPI_T::BUFCTL: RXRST Position */
  513. #define USPI_BUFCTL_RXRST_Msk (0x1ul << USPI_BUFCTL_RXRST_Pos) /*!< USPI_T::BUFCTL: RXRST Mask */
  514. #define USPI_BUFSTS_RXEMPTY_Pos (0) /*!< USPI_T::BUFSTS: RXEMPTY Position */
  515. #define USPI_BUFSTS_RXEMPTY_Msk (0x1ul << USPI_BUFSTS_RXEMPTY_Pos) /*!< USPI_T::BUFSTS: RXEMPTY Mask */
  516. #define USPI_BUFSTS_RXFULL_Pos (1) /*!< USPI_T::BUFSTS: RXFULL Position */
  517. #define USPI_BUFSTS_RXFULL_Msk (0x1ul << USPI_BUFSTS_RXFULL_Pos) /*!< USPI_T::BUFSTS: RXFULL Mask */
  518. #define USPI_BUFSTS_RXOVIF_Pos (3) /*!< USPI_T::BUFSTS: RXOVIF Position */
  519. #define USPI_BUFSTS_RXOVIF_Msk (0x1ul << USPI_BUFSTS_RXOVIF_Pos) /*!< USPI_T::BUFSTS: RXOVIF Mask */
  520. #define USPI_BUFSTS_TXEMPTY_Pos (8) /*!< USPI_T::BUFSTS: TXEMPTY Position */
  521. #define USPI_BUFSTS_TXEMPTY_Msk (0x1ul << USPI_BUFSTS_TXEMPTY_Pos) /*!< USPI_T::BUFSTS: TXEMPTY Mask */
  522. #define USPI_BUFSTS_TXFULL_Pos (9) /*!< USPI_T::BUFSTS: TXFULL Position */
  523. #define USPI_BUFSTS_TXFULL_Msk (0x1ul << USPI_BUFSTS_TXFULL_Pos) /*!< USPI_T::BUFSTS: TXFULL Mask */
  524. #define USPI_BUFSTS_TXUDRIF_Pos (11) /*!< USPI_T::BUFSTS: TXUDRIF Position */
  525. #define USPI_BUFSTS_TXUDRIF_Msk (0x1ul << USPI_BUFSTS_TXUDRIF_Pos) /*!< USPI_T::BUFSTS: TXUDRIF Mask */
  526. #define USPI_PDMACTL_PDMARST_Pos (0) /*!< USPI_T::PDMACTL: PDMARST Position */
  527. #define USPI_PDMACTL_PDMARST_Msk (0x1ul << USPI_PDMACTL_PDMARST_Pos) /*!< USPI_T::PDMACTL: PDMARST Mask */
  528. #define USPI_PDMACTL_TXPDMAEN_Pos (1) /*!< USPI_T::PDMACTL: TXPDMAEN Position */
  529. #define USPI_PDMACTL_TXPDMAEN_Msk (0x1ul << USPI_PDMACTL_TXPDMAEN_Pos) /*!< USPI_T::PDMACTL: TXPDMAEN Mask */
  530. #define USPI_PDMACTL_RXPDMAEN_Pos (2) /*!< USPI_T::PDMACTL: RXPDMAEN Position */
  531. #define USPI_PDMACTL_RXPDMAEN_Msk (0x1ul << USPI_PDMACTL_RXPDMAEN_Pos) /*!< USPI_T::PDMACTL: RXPDMAEN Mask */
  532. #define USPI_PDMACTL_PDMAEN_Pos (3) /*!< USPI_T::PDMACTL: PDMAEN Position */
  533. #define USPI_PDMACTL_PDMAEN_Msk (0x1ul << USPI_PDMACTL_PDMAEN_Pos) /*!< USPI_T::PDMACTL: PDMAEN Mask */
  534. #define USPI_WKCTL_WKEN_Pos (0) /*!< USPI_T::WKCTL: WKEN Position */
  535. #define USPI_WKCTL_WKEN_Msk (0x1ul << USPI_WKCTL_WKEN_Pos) /*!< USPI_T::WKCTL: WKEN Mask */
  536. #define USPI_WKCTL_WKADDREN_Pos (1) /*!< USPI_T::WKCTL: WKADDREN Position */
  537. #define USPI_WKCTL_WKADDREN_Msk (0x1ul << USPI_WKCTL_WKADDREN_Pos) /*!< USPI_T::WKCTL: WKADDREN Mask */
  538. #define USPI_WKCTL_PDBOPT_Pos (2) /*!< USPI_T::WKCTL: PDBOPT Position */
  539. #define USPI_WKCTL_PDBOPT_Msk (0x1ul << USPI_WKCTL_PDBOPT_Pos) /*!< USPI_T::WKCTL: PDBOPT Mask */
  540. #define USPI_WKSTS_WKF_Pos (0) /*!< USPI_T::WKSTS: WKF Position */
  541. #define USPI_WKSTS_WKF_Msk (0x1ul << USPI_WKSTS_WKF_Pos) /*!< USPI_T::WKSTS: WKF Mask */
  542. #define USPI_PROTCTL_SLAVE_Pos (0) /*!< USPI_T::PROTCTL: SLAVE Position */
  543. #define USPI_PROTCTL_SLAVE_Msk (0x1ul << USPI_PROTCTL_SLAVE_Pos) /*!< USPI_T::PROTCTL: SLAVE Mask */
  544. #define USPI_PROTCTL_SLV3WIRE_Pos (1) /*!< USPI_T::PROTCTL: SLV3WIRE Position */
  545. #define USPI_PROTCTL_SLV3WIRE_Msk (0x1ul << USPI_PROTCTL_SLV3WIRE_Pos) /*!< USPI_T::PROTCTL: SLV3WIRE Mask */
  546. #define USPI_PROTCTL_SS_Pos (2) /*!< USPI_T::PROTCTL: SS Position */
  547. #define USPI_PROTCTL_SS_Msk (0x1ul << USPI_PROTCTL_SS_Pos) /*!< USPI_T::PROTCTL: SS Mask */
  548. #define USPI_PROTCTL_AUTOSS_Pos (3) /*!< USPI_T::PROTCTL: AUTOSS Position */
  549. #define USPI_PROTCTL_AUTOSS_Msk (0x1ul << USPI_PROTCTL_AUTOSS_Pos) /*!< USPI_T::PROTCTL: AUTOSS Mask */
  550. #define USPI_PROTCTL_SCLKMODE_Pos (6) /*!< USPI_T::PROTCTL: SCLKMODE Position */
  551. #define USPI_PROTCTL_SCLKMODE_Msk (0x3ul << USPI_PROTCTL_SCLKMODE_Pos) /*!< USPI_T::PROTCTL: SCLKMODE Mask */
  552. #define USPI_PROTCTL_SUSPITV_Pos (8) /*!< USPI_T::PROTCTL: SUSPITV Position */
  553. #define USPI_PROTCTL_SUSPITV_Msk (0xful << USPI_PROTCTL_SUSPITV_Pos) /*!< USPI_T::PROTCTL: SUSPITV Mask */
  554. #define USPI_PROTCTL_TSMSEL_Pos (12) /*!< USPI_T::PROTCTL: TSMSEL Position */
  555. #define USPI_PROTCTL_TSMSEL_Msk (0x7ul << USPI_PROTCTL_TSMSEL_Pos) /*!< USPI_T::PROTCTL: TSMSEL Mask */
  556. #define USPI_PROTCTL_SLVTOCNT_Pos (16) /*!< USPI_T::PROTCTL: SLVTOCNT Position */
  557. #define USPI_PROTCTL_SLVTOCNT_Msk (0x3fful << USPI_PROTCTL_SLVTOCNT_Pos) /*!< USPI_T::PROTCTL: SLVTOCNT Mask */
  558. #define USPI_PROTCTL_TXUDRPOL_Pos (28) /*!< USPI_T::PROTCTL: TXUDRPOL Position */
  559. #define USPI_PROTCTL_TXUDRPOL_Msk (0x1ul << USPI_PROTCTL_TXUDRPOL_Pos) /*!< USPI_T::PROTCTL: TXUDRPOL Mask */
  560. #define USPI_PROTCTL_PROTEN_Pos (31) /*!< USPI_T::PROTCTL: PROTEN Position */
  561. #define USPI_PROTCTL_PROTEN_Msk (0x1ul << USPI_PROTCTL_PROTEN_Pos) /*!< USPI_T::PROTCTL: PROTEN Mask */
  562. #define USPI_PROTIEN_SSINAIEN_Pos (0) /*!< USPI_T::PROTIEN: SSINAIEN Position */
  563. #define USPI_PROTIEN_SSINAIEN_Msk (0x1ul << USPI_PROTIEN_SSINAIEN_Pos) /*!< USPI_T::PROTIEN: SSINAIEN Mask */
  564. #define USPI_PROTIEN_SSACTIEN_Pos (1) /*!< USPI_T::PROTIEN: SSACTIEN Position */
  565. #define USPI_PROTIEN_SSACTIEN_Msk (0x1ul << USPI_PROTIEN_SSACTIEN_Pos) /*!< USPI_T::PROTIEN: SSACTIEN Mask */
  566. #define USPI_PROTIEN_SLVTOIEN_Pos (2) /*!< USPI_T::PROTIEN: SLVTOIEN Position */
  567. #define USPI_PROTIEN_SLVTOIEN_Msk (0x1ul << USPI_PROTIEN_SLVTOIEN_Pos) /*!< USPI_T::PROTIEN: SLVTOIEN Mask */
  568. #define USPI_PROTIEN_SLVBEIEN_Pos (3) /*!< USPI_T::PROTIEN: SLVBEIEN Position */
  569. #define USPI_PROTIEN_SLVBEIEN_Msk (0x1ul << USPI_PROTIEN_SLVBEIEN_Pos) /*!< USPI_T::PROTIEN: SLVBEIEN Mask */
  570. #define USPI_PROTSTS_TXSTIF_Pos (1) /*!< USPI_T::PROTSTS: TXSTIF Position */
  571. #define USPI_PROTSTS_TXSTIF_Msk (0x1ul << USPI_PROTSTS_TXSTIF_Pos) /*!< USPI_T::PROTSTS: TXSTIF Mask */
  572. #define USPI_PROTSTS_TXENDIF_Pos (2) /*!< USPI_T::PROTSTS: TXENDIF Position */
  573. #define USPI_PROTSTS_TXENDIF_Msk (0x1ul << USPI_PROTSTS_TXENDIF_Pos) /*!< USPI_T::PROTSTS: TXENDIF Mask */
  574. #define USPI_PROTSTS_RXSTIF_Pos (3) /*!< USPI_T::PROTSTS: RXSTIF Position */
  575. #define USPI_PROTSTS_RXSTIF_Msk (0x1ul << USPI_PROTSTS_RXSTIF_Pos) /*!< USPI_T::PROTSTS: RXSTIF Mask */
  576. #define USPI_PROTSTS_RXENDIF_Pos (4) /*!< USPI_T::PROTSTS: RXENDIF Position */
  577. #define USPI_PROTSTS_RXENDIF_Msk (0x1ul << USPI_PROTSTS_RXENDIF_Pos) /*!< USPI_T::PROTSTS: RXENDIF Mask */
  578. #define USPI_PROTSTS_SLVTOIF_Pos (5) /*!< USPI_T::PROTSTS: SLVTOIF Position */
  579. #define USPI_PROTSTS_SLVTOIF_Msk (0x1ul << USPI_PROTSTS_SLVTOIF_Pos) /*!< USPI_T::PROTSTS: SLVTOIF Mask */
  580. #define USPI_PROTSTS_SLVBEIF_Pos (6) /*!< USPI_T::PROTSTS: SLVBEIF Position */
  581. #define USPI_PROTSTS_SLVBEIF_Msk (0x1ul << USPI_PROTSTS_SLVBEIF_Pos) /*!< USPI_T::PROTSTS: SLVBEIF Mask */
  582. #define USPI_PROTSTS_SSINAIF_Pos (8) /*!< USPI_T::PROTSTS: SSINAIF Position */
  583. #define USPI_PROTSTS_SSINAIF_Msk (0x1ul << USPI_PROTSTS_SSINAIF_Pos) /*!< USPI_T::PROTSTS: SSINAIF Mask */
  584. #define USPI_PROTSTS_SSACTIF_Pos (9) /*!< USPI_T::PROTSTS: SSACTIF Position */
  585. #define USPI_PROTSTS_SSACTIF_Msk (0x1ul << USPI_PROTSTS_SSACTIF_Pos) /*!< USPI_T::PROTSTS: SSACTIF Mask */
  586. #define USPI_PROTSTS_SSLINE_Pos (16) /*!< USPI_T::PROTSTS: SSLINE Position */
  587. #define USPI_PROTSTS_SSLINE_Msk (0x1ul << USPI_PROTSTS_SSLINE_Pos) /*!< USPI_T::PROTSTS: SSLINE Mask */
  588. #define USPI_PROTSTS_BUSY_Pos (17) /*!< USPI_T::PROTSTS: BUSY Position */
  589. #define USPI_PROTSTS_BUSY_Msk (0x1ul << USPI_PROTSTS_BUSY_Pos) /*!< USPI_T::PROTSTS: BUSY Mask */
  590. #define USPI_PROTSTS_SLVUDR_Pos (18) /*!< USPI_T::PROTSTS: SLVUDR Position */
  591. #define USPI_PROTSTS_SLVUDR_Msk (0x1ul << USPI_PROTSTS_SLVUDR_Pos) /*!< USPI_T::PROTSTS: SLVUDR Mask */
  592. /**@}*/ /* USPI_CONST */
  593. /**@}*/ /* end of USPI register group */
  594. /**@}*/ /* end of REGISTER group */
  595. #if defined ( __CC_ARM )
  596. #pragma no_anon_unions
  597. #endif
  598. #endif /* __USPI_REG_H__ */