uspi_reg.h 51 KB

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