sc_reg.h 79 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019
  1. /**************************************************************************//**
  2. * @file sc_reg.h
  3. * @version V1.00
  4. * @brief SC 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 __SC_REG_H__
  10. #define __SC_REG_H__
  11. #if defined ( __CC_ARM )
  12. #pragma anon_unions
  13. #endif
  14. /**
  15. @addtogroup REGISTER Control Register
  16. @{
  17. */
  18. /**
  19. @addtogroup SC Smart Card Host Interface Controller(SC)
  20. Memory Mapped Structure for SC Controller
  21. @{ */
  22. typedef struct
  23. {
  24. /**
  25. * @var SC_T::DAT
  26. * Offset: 0x00 SC Receive/Transmit Holding Buffer Register
  27. * ---------------------------------------------------------------------------------------------------
  28. * |Bits |Field |Descriptions
  29. * | :----: | :----: | :---- |
  30. * |[7:0] |DAT |Receive/Transmit Holding Buffer
  31. * | | |Write Operation:
  32. * | | |By writing data to DAT, the SC will send out an 8-bit data.
  33. * | | |Note: If SCEN (SCn_CTL[0]) is not enabled, DAT cannot be programmed.
  34. * | | |Read Operation:
  35. * | | |By reading DAT, the SC will return an 8-bit received data.
  36. * @var SC_T::CTL
  37. * Offset: 0x04 SC Control Register
  38. * ---------------------------------------------------------------------------------------------------
  39. * |Bits |Field |Descriptions
  40. * | :----: | :----: | :---- |
  41. * |[0] |SCEN |SC Controller Enable Bit
  42. * | | |Set this bit to 1 to enable SC operation. If this bit is cleared,
  43. * | | |0 = SC will force all transition to IDLE state.
  44. * | | |1 = SC controller is enabled and all function can work correctly.
  45. * | | |Note1: SCEN must be set to 1 before filling in other SC registers, or smart card will not work properly.
  46. * |[1] |RXOFF |RX Transition Disable Control Bit
  47. * | | |This bit is used for disable Rx transition function.
  48. * | | |0 = The receiver Enabled.
  49. * | | |1 = The receiver Disabled.
  50. * | | |Note1: If AUTOCEN (SCn_CTL[3]) is enabled, this field is ignored.
  51. * |[2] |TXOFF |TX Transition Disable Control Bit
  52. * | | |This bit is used for disable Tx transition function.
  53. * | | |0 = The transceiver Enabled.
  54. * | | |1 = The transceiver Disabled.
  55. * |[3] |AUTOCEN |Auto Convention Enable Bit
  56. * | | |This bit is used for enable auto convention function.
  57. * | | |0 = Auto-convention Disabled.
  58. * | | |1 = Auto-convention Enabled.
  59. * | | |If user enables auto convention function, the setting step must be done before Answer to Reset (ATR)
  60. * | | |state and the first data must be 0x3B or 0x3F.
  61. * | | |After hardware received first data and stored it at buffer, hardware will decided the convention and
  62. * | | |change the CONSEL (SCn_CTL[5:4]) bits automatically when received first data is 0x3B or 0x3F.
  63. * | | |If received first byte is 0x3B, TS is direct convention, CONSEL (SCn_CTL[5:4]) will be set to 00
  64. * | | |automatically, otherwise the TS is inverse convention, and CONSEL (SCn_CTL[5:4]) will be set to 11.
  65. * | | |If the first data is not 0x3B or 0x3F, hardware will set ACERRIF (SCn_INTSTS[10]) and generate an
  66. * | | |interrupt to CPU when ACERRIEN (SCn_INTEN[10]) is enabled.
  67. * |[5:4] |CONSEL |Convention Selection
  68. * | | |00 = Direct convention.
  69. * | | |01 = Reserved.
  70. * | | |10 = Reserved.
  71. * | | |11 = Inverse convention.
  72. * | | |Note: If AUTOCEN (SCn_CTL[3]) is enabled, this field is ignored.
  73. * |[7:6] |RXTRGLV |Rx Buffer Trigger Level
  74. * | | |When the number of bytes in the receiving buffer equals the RXTRGLV, the RDAIF will be set
  75. * | | |If RDAIEN (SCn_INTEN[0]) is enabled, an interrupt will be generated to CPU.
  76. * | | |00 = Rx Buffer Trigger Level with 01 bytes.
  77. * | | |01 = Rx Buffer Trigger Level with 02 bytes.
  78. * | | |10 = Rx Buffer Trigger Level with 03 bytes.
  79. * | | |11 = Reserved.
  80. * |[12:8] |BGT |Block Guard Time (BGT)
  81. * | | |Block guard time means the minimum interval between the leading edges of two consecutive characters
  82. * | | |between different transfer directions
  83. * | | |This field indicates the counter for the bit length of block guard time
  84. * | | |According to ISO 7816-3, in T = 0 mode, user must fill 15 (real block guard time = 16.5) to this
  85. * | | |field; in T = 1 mode, user must fill 21 (real block guard time = 22.5) to it.
  86. * | | |Note: The real block guard time is BGT + 1.
  87. * |[14:13] |TMRSEL |Timer Channel Selection
  88. * | | |00 = All internal timer function Disabled.
  89. * | | |11 = Internal 24 bit timer and two 8 bit timers Enabled
  90. * | | |User can configure them by setting SCn_TMRCTL0[23:0], SCn_TMRCTL1[7:0] and SCn_TMRCTL2[7:0].
  91. * | | |Other configurations are reserved
  92. * |[15] |NSB |Stop Bit Length
  93. * | | |This field indicates the length of stop bit.
  94. * | | |0 = The stop bit length is 2 ETU.
  95. * | | |1= The stop bit length is 1 ETU.
  96. * | | |Note1: The default stop bit length is 2. SC and UART adopts NSB to program the stop bit length.
  97. * | | |Note2: In UART mode, RX can receive the data sequence in 1 stop bit or 2 stop bits with NSB is set to 0.
  98. * |[18:16] |RXRTY |RX Error Retry Count Number
  99. * | | |This field indicates the maximum number of receiver retries that are allowed when parity error has occurred.
  100. * | | |Note1: The real retry number is RXRTY + 1, so 8 is the maximum retry number.
  101. * | | |Note2: This field cannot be changed when RXRTYEN enabled
  102. * | | |The change flow is to disable RXRTYEN first and then fill in new retry value.
  103. * |[19] |RXRTYEN |RX Error Retry Enable Bit
  104. * | | |This bit enables receiver retry function when parity error has occurred.
  105. * | | |0 = RX error retry function Disabled.
  106. * | | |1 = RX error retry function Enabled.
  107. * | | |Note: User must fill in the RXRTY value before enabling this bit.
  108. * |[22:20] |TXRTY |TX Error Retry Count Number
  109. * | | |This field indicates the maximum number of transmitter retries that are allowed when parity
  110. * | | |error has occurred.
  111. * | | |Note1: The real retry number is TXRTY + 1, so 8 is the maximum retry number.
  112. * | | |Note2: This field cannot be changed when TXRTYEN enabled
  113. * | | |The change flow is to disable TXRTYEN first and then fill in new retry value.
  114. * |[23] |TXRTYEN |TX Error Retry Enable Bit
  115. * | | |This bit enables transmitter retry function when parity error has occurred.
  116. * | | |0 = TX error retry function Disabled.
  117. * | | |1 = TX error retry function Enabled.
  118. * |[25:24] |CDDBSEL |Card Detect De-bounce Selection
  119. * | | |This field indicates the card detect de-bounce selection.
  120. * | | |00 = De-bounce sample card insert once per 384 (128 * 3) SC module clocks and de-bounce
  121. * | | |sample card removal once per 128 SC module clocks.
  122. * | | |Other configurations are reserved.
  123. * |[26] |CDLV |Card Detect Level Selection
  124. * | | |0 = When hardware detects the card detect pin (SCn_CD) from high to low, it indicates a card is detected.
  125. * | | |1 = When hardware detects the card detect pin (SCn_CD) from low to high, it indicates a card is detected.
  126. * | | |Note: User must select card detect level before Smart Card controller enabled.
  127. * |[30] |SYNC |SYNC Flag Indicator (Read Only)
  128. * | | |Due to synchronization, user should check this bit before writing a new value to RXRTY and TXRTY fields.
  129. * | | |0 = Synchronizing is completion, user can write new data to RXRTY and TXRTY.
  130. * | | |1 = Last value is synchronizing.
  131. * @var SC_T::ALTCTL
  132. * Offset: 0x08 SC Alternate Control Register
  133. * ---------------------------------------------------------------------------------------------------
  134. * |Bits |Field |Descriptions
  135. * | :----: | :----: | :---- |
  136. * |[0] |TXRST |TX Software Reset
  137. * | | |When TXRST is set, all the bytes in the transmit buffer and TX internal state machine will be cleared.
  138. * | | |0 = No effect.
  139. * | | |1 = Reset the TX internal state machine and pointers.
  140. * | | |Note: This bit will be auto cleared after reset is complete.
  141. * |[1] |RXRST |Rx Software Reset
  142. * | | |When RXRST is set, all the bytes in the receive buffer and Rx internal state machine will be cleared.
  143. * | | |0 = No effect.
  144. * | | |1 = Reset the Rx internal state machine and pointers.
  145. * | | |Note: This bit will be auto cleared after reset is complete.
  146. * |[2] |DACTEN |Deactivation Sequence Generator Enable Bit
  147. * | | |This bit enables SC controller to initiate the card by deactivation sequence.
  148. * | | |0 = No effect.
  149. * | | |1 = Deactivation sequence generator Enabled.
  150. * | | |Note1: When the deactivation sequence completed, this bit will be cleared automatically and
  151. * | | |the INITIF (SCn_INTSTS[8]) will be set to 1.
  152. * | | |Note2: This field will be cleared by TXRST (SCn_ALTCTL[0]) and RXRST (SCn_ALTCTL[1])
  153. * | | |Thus, do not fill in this bit DACTEN, TXRST and RXRST at the same time.
  154. * | | |Note3: If SCEN (SCn_CTL[0]) is not enabled, this filed cannot be programmed.
  155. * |[3] |ACTEN |Activation Sequence Generator Enable Bit
  156. * | | |This bit enables SC controller to initiate the card by activation sequence.
  157. * | | |0 = No effect.
  158. * | | |1 = Activation sequence generator Enabled.
  159. * | | |Note1: When the activation sequence completed, this bit will be cleared automatically and the
  160. * | | |INITIF (SCn_INTSTS[8]) will be set to 1.
  161. * | | |Note2: This field will be cleared by TXRST (SCn_ALTCTL[0]) and RXRST (SCn_ALTCTL[1])
  162. * | | |Thus, do not fill in this bit ACTEN, TXRST and RXRST at the same time.
  163. * | | |Note3: If SCEN (SCn_CTL[0]) is not enabled, this filed cannot be programmed.
  164. * | | |Note4: During the activation sequence, RX is disabled automatically and can not receive data
  165. * | | |After the activation sequence completion, RXOFF (SCn_CTL[1]) keeps the state before hardware activation.
  166. * |[4] |WARSTEN |Warm Reset Sequence Generator Enable Bit
  167. * | | |This bit enables SC controller to initiate the card by warm reset sequence.
  168. * | | |0 = No effect.
  169. * | | |1 = Warm reset sequence generator Enabled.
  170. * | | |Note1: When the warm reset sequence completed, this bit will be cleared automatically and the
  171. * | | |INITIF (SCn_INTSTS[8]) will be set to 1.
  172. * | | |Note2: This field will be cleared by TXRST (SCn_ALTCTL[0]) and RXRST (SCn_ALTCTL[1])
  173. * | | |Thus, do not fill in this bit WARSTEN, TXRST and RXRST at the same time.
  174. * | | |Note3: If SCEN (SCn_CTL[0]) is not enabled, this filed cannot be programmed.
  175. * | | |Note4: During the warm reset sequence, RX is disabled automatically and can not receive data
  176. * | | |After the warm reset sequence completion, RXOFF (SCn_CTL[1]) keeps the state before perform
  177. * | | |warm reset sequence.
  178. * |[5] |CNTEN0 |Internal Timer0 Start Enable Bit
  179. * | | |This bit enables Timer 0 to start counting
  180. * | | |User can fill 0 to stop it and set 1 to reload and count
  181. * | | |The counter unit is ETU base.
  182. * | | |0 = Stops counting.
  183. * | | |1 = Start counting.
  184. * | | |Note1: This field is used for internal 24 bit timer when TMRSEL (SCn_CTL[14:13]) is 11 only.
  185. * | | |Note2: If the operation mode is not in auto-reload mode (SCn_TMRCTL0[26] = 0), this bit will
  186. * | | |be auto-cleared by hardware.
  187. * | | |Note3: If SCEN (SCn_CTL[0]) is not enabled, this filed cannot be programmed.
  188. * |[6] |CNTEN1 |Internal Timer1 Start Enable Bit
  189. * | | |This bit enables Timer 1 to start counting
  190. * | | |User can fill 0 to stop it and set 1 to reload and count
  191. * | | |The counter unit is ETU base.
  192. * | | |0 = Stops counting.
  193. * | | |1 = Start counting.
  194. * | | |Note1: This field is used for internal 8 bit timer when TMRSEL(SCn_CTL[14:13]) is 11 only
  195. * | | |Do not fill CNTEN1 when TMRSEL (SCn_CTL[14:13]) is not equal to 11.
  196. * | | |Note2: If the operation mode is not in auto-reload mode (SCn_TMRCTL1[26] = 0), this bit will
  197. * | | |be auto-cleared by hardware.
  198. * | | |Note3: If SCEN (SCn_CTL[0]) is not enabled, this filed cannot be programmed.
  199. * |[7] |CNTEN2 |Internal Timer2 Start Enable Bit
  200. * | | |This bit enables Timer 2 to start counting
  201. * | | |User can fill 0 to stop it and set 1 to reload and count
  202. * | | |The counter unit is ETU base.
  203. * | | |0 = Stops counting.
  204. * | | |1 = Start counting.
  205. * | | |Note1: This field is used for internal 8 bit timer when TMRSEL (SCn_CTL[14:13]) is 11 only
  206. * | | |Do not fill in CNTEN2 when TMRSEL (SCn_CTL[14:13]) is not equal to 11.
  207. * | | |Note2: If the operation mode is not in auto-reload mode (SCn_TMRCTL2[26] = 0), this bit will
  208. * | | |be auto-cleared by hardware.
  209. * | | |Note3: If SCEN (SCn_CTL[0]) is not enabled, this filed cannot be programmed.
  210. * |[9:8] |INITSEL |Initial Timing Selection
  211. * | | |This fields indicates the initial timing of hardware activation, warm-reset or deactivation.
  212. * | | |The unit of initial timing is SC module clock.
  213. * | | |Activation: refer to SC Activation Sequence in Figure 7.17-54.
  214. * | | |Warm-reset: refer to Warm-Reset Sequence in Figure 7.17-5.
  215. * | | |Deactivation: refer to Deactivation Sequence in Figure 7.17-56.
  216. * | | |Note: When set activation and warm reset in Timer0 operation mode 0011, it may have deviation
  217. * | | |at most 128 SC module clock cycles.
  218. * |[11] |ADACEN |Auto Deactivation When Card Removal
  219. * | | |This bit is used for enable hardware auto deactivation when smart card is removed.
  220. * | | |0 = Auto deactivation Disabled.
  221. * | | |1 = Auto deactivation Enabled.
  222. * | | |Note: When the card is removed, hardware will stop any process and then do deactivation sequence
  223. * | | |if this bit is set
  224. * | | |If auto deactivation process completes, hardware will set INITIF (SCn_INTSTS[8]) also.
  225. * |[12] |RXBGTEN |Receiver Block Guard Time Function Enable Bit
  226. * | | |This bit enables the receiver block guard time function.
  227. * | | |0 = Receiver block guard time function Disabled.
  228. * | | |1 = Receiver block guard time function Enabled.
  229. * |[13] |ACTSTS0 |Internal Timer0 Active Status (Read Only)
  230. * | | |This bit indicates the timer counter status of timer0.
  231. * | | |0 = Timer0 is not active.
  232. * | | |1 = Timer0 is active.
  233. * | | |Note: Timer0 is active does not always mean timer0 is counting the CNT (SCn_TMRCTL0[23:0]).
  234. * |[14] |ACTSTS1 |Internal Timer1 Active Status (Read Only)
  235. * | | |This bit indicates the timer counter status of timer1.
  236. * | | |0 = Timer1 is not active.
  237. * | | |1 = Timer1 is active.
  238. * | | |Note: Timer1 is active does not always mean timer1 is counting the CNT (SCn_TMRCTL1[7:0]).
  239. * |[15] |ACTSTS2 |Internal Timer2 Active Status (Read Only)
  240. * | | |This bit indicates the timer counter status of timer2.
  241. * | | |0 = Timer2 is not active.
  242. * | | |1 = Timer2 is active.
  243. * | | |Note: Timer2 is active does not always mean timer2 is counting the CNT (SCn_TMRCTL2[7:0]).
  244. * |[31] |SYNC |SYNC Flag Indicator (Read Only)
  245. * | | |Due to synchronization, user should check this bit when writing a new value to SCn_ALTCTL register.
  246. * | | |0 = Synchronizing is completion, user can write new data to SCn_ALTCTL register.
  247. * | | |1 = Last value is synchronizing.
  248. * @var SC_T::EGT
  249. * Offset: 0x0C SC Extra Guard Time Register
  250. * ---------------------------------------------------------------------------------------------------
  251. * |Bits |Field |Descriptions
  252. * | :----: | :----: | :---- |
  253. * |[7:0] |EGT |Extra Guard Time
  254. * | | |This field indicates the extra guard time value.
  255. * | | |Note: The extra guard time unit is ETU base.
  256. * @var SC_T::RXTOUT
  257. * Offset: 0x10 SC Receive Buffer Time-out Counter Register
  258. * ---------------------------------------------------------------------------------------------------
  259. * |Bits |Field |Descriptions
  260. * | :----: | :----: | :---- |
  261. * |[8:0] |RFTM |SC Receiver FIFO Time-out Counter
  262. * | | |The time-out down counter resets and starts counting whenever the RX buffer received a new data
  263. * | | |Once the counter decrease to 1 and no new data is received or CPU does not read data by
  264. * | | |reading SCn_DAT, a receiver time-out flag RBTOIF (SCn_INTSTS[9]) will be set, and hardware will
  265. * | | |generate an interrupt to CPU when RBTOIEN (SCn_INTEN[9]) is enabled.
  266. * | | |Note1: The counter unit is ETU based and the interval of time-out is RFTM + 0.5.
  267. * | | |Note2: Filling in all 0 to this field indicates to disable this function.
  268. * @var SC_T::ETUCTL
  269. * Offset: 0x14 SC Element Time Unit Control Register
  270. * ---------------------------------------------------------------------------------------------------
  271. * |Bits |Field |Descriptions
  272. * | :----: | :----: | :---- |
  273. * |[11:0] |ETURDIV |ETU Rate Divider
  274. * | | |The field is used for ETU clock rate divider.
  275. * | | |The real ETU is ETURDIV + 1.
  276. * | | |Note: User can configure this field, but this field must be greater than 0x04.
  277. * @var SC_T::INTEN
  278. * Offset: 0x18 SC Interrupt Enable Control Register
  279. * ---------------------------------------------------------------------------------------------------
  280. * |Bits |Field |Descriptions
  281. * | :----: | :----: | :---- |
  282. * |[0] |RDAIEN |Receive Data Reach Interrupt Enable Bit
  283. * | | |This field is used to enable received data reaching trigger level RXTRGLV (SCn_CTL[7:6]) interrupt.
  284. * | | |0 = Receive data reach trigger level interrupt Disabled.
  285. * | | |1 = Receive data reach trigger level interrupt Enabled.
  286. * |[1] |TBEIEN |Transmit Buffer Empty Interrupt Enable Bit
  287. * | | |This field is used to enable transmit buffer empty interrupt.
  288. * | | |0 = Transmit buffer empty interrupt Disabled.
  289. * | | |1 = Transmit buffer empty interrupt Enabled.
  290. * |[2] |TERRIEN |Transfer Error Interrupt Enable Bit
  291. * | | |This field is used to enable transfer error interrupt
  292. * | | |The transfer error states is at SCn_STATUS register which includes receiver break error
  293. * | | |BEF (SCn_STATUS[6]), frame error FEF (SCn_STATUS[5]), parity error PEF (SCn_STATUS[4]), receive
  294. * | | |buffer overflow error RXOV (SCn_STATUS[0]), transmit buffer overflow error TXOV (SCn_STATUS[8]),
  295. * | | |receiver retry over limit error RXOVERR (SCn_STATUS[22]) and transmitter retry over limit error
  296. * | | |TXOVERR (SCn_STATUS[30]).
  297. * | | |0 = Transfer error interrupt Disabled.
  298. * | | |1 = Transfer error interrupt Enabled.
  299. * |[3] |TMR0IEN |Timer0 Interrupt Enable Bit
  300. * | | |This field is used to enable Timer0 interrupt function.
  301. * | | |0 = Timer0 interrupt Disabled.
  302. * | | |1 = Timer0 interrupt Enabled.
  303. * |[4] |TMR1IEN |Timer1 Interrupt Enable Bit
  304. * | | |This field is used to enable the Timer1 interrupt function.
  305. * | | |0 = Timer1 interrupt Disabled.
  306. * | | |1 = Timer1 interrupt Enabled.
  307. * |[5] |TMR2IEN |Timer2 Interrupt Enable Bit
  308. * | | |This field is used to enable Timer2 interrupt function.
  309. * | | |0 = Timer2 interrupt Disabled.
  310. * | | |1 = Timer2 interrupt Enabled.
  311. * |[6] |BGTIEN |Block Guard Time Interrupt Enable Bit
  312. * | | |This field is used to enable block guard time interrupt in receive direction.
  313. * | | |0 = Block guard time interrupt Disabled.
  314. * | | |1 = Block guard time interrupt Enabled.
  315. * | | |Note: This bit is valid only for receive direction block guard time.
  316. * |[7] |CDIEN |Card Detect Interrupt Enable Bit
  317. * | | |This field is used to enable card detect interrupt
  318. * | | |The card detect status is CDPINSTS (SCn_STATUS[13]).
  319. * | | |0 = Card detect interrupt Disabled.
  320. * | | |1 = Card detect interrupt Enabled.
  321. * |[8] |INITIEN |Initial End Interrupt Enable Bit
  322. * | | |This field is used to enable activation (ACTEN (SCn_ALTCTL[3] = 1)), deactivation
  323. * | | |(DACTEN (SCn_ALTCTL[2] = 1)) and warm reset (WARSTEN (SCn_ALTCTL [4])) sequence complete interrupt.
  324. * | | |0 = Initial end interrupt Disabled.
  325. * | | |1 = Initial end interrupt Enabled.
  326. * |[9] |RXTOIEN |Receiver Buffer Time-out Interrupt Enable Bit
  327. * | | |This field is used to enable receiver buffer time-out interrupt.
  328. * | | |0 = Receiver buffer time-out interrupt Disabled.
  329. * | | |1 = Receiver buffer time-out interrupt Enabled.
  330. * |[10] |ACERRIEN |Auto Convention Error Interrupt Enable Bit
  331. * | | |This field is used to enable auto-convention error interrupt.
  332. * | | |0 = Auto-convention error interrupt Disabled.
  333. * | | |1 = Auto-convention error interrupt Enabled.
  334. * @var SC_T::INTSTS
  335. * Offset: 0x1C SC Interrupt Status Register
  336. * ---------------------------------------------------------------------------------------------------
  337. * |Bits |Field |Descriptions
  338. * | :----: | :----: | :---- |
  339. * |[0] |RDAIF |Receive Data Reach Interrupt Status Flag (Read Only)
  340. * | | |This field is used for received data reaching trigger level RXTRGLV (SCn_CTL[7:6]) interrupt status flag.
  341. * | | |0 = Number of receive buffer is less than RXTRGLV setting.
  342. * | | |1 = Number of receive buffer data equals the RXTRGLV setting.
  343. * | | |Note: This bit is read only
  344. * | | |If user reads data from SCn_DAT and receiver buffer data byte number is less than RXTRGLV,
  345. * | | |this bit will be cleared automatically.
  346. * |[1] |TBEIF |Transmit Buffer Empty Interrupt Status Flag (Read Only)
  347. * | | |This field is used for transmit buffer empty interrupt status flag.
  348. * | | |0 = Transmit buffer is not empty.
  349. * | | |1 = Transmit buffer is empty.
  350. * | | |Note: This bit is read only
  351. * | | |If user wants to clear this bit, user must write data to DAT (SCn_DAT[7:0]) and then this bit
  352. * | | |will be cleared automatically.
  353. * |[2] |TERRIF |Transfer Error Interrupt Status Flag
  354. * | | |This field is used for transfer error interrupt status flag
  355. * | | |The transfer error states is at SCn_STATUS register which includes receiver break error
  356. * | | |BEF (SCn_STATUS[6]), frame error FEF (SCn_STATUS[5], parity error PEF (SCn_STATUS[4] and receive
  357. * | | |buffer overflow error RXOV (SCn_STATUS[0]), transmit buffer overflow error TXOV (SCn_STATUS[8]),
  358. * | | |receiver retry over limit error RXOVERR (SCn_STATUS[22] or transmitter retry over limit error
  359. * | | |TXOVERR (SCn_STATUS[30]).
  360. * | | |0 = Transfer error interrupt did not occur.
  361. * | | |1 = Transfer error interrupt occurred.
  362. * | | |Note1: This field is the status flag of BEF, FEF, PEF, RXOV, TXOV, RXOVERR or TXOVERR.
  363. * | | |Note2: This bit can be cleared by writing 1 to it.
  364. * |[3] |TMR0IF |Timer0 Interrupt Status Flag
  365. * | | |This field is used for Timer0 interrupt status flag.
  366. * | | |0 = Timer0 interrupt did not occur.
  367. * | | |1 = Timer0 interrupt occurred.
  368. * | | |Note: This bit can be cleared by writing 1 to it.
  369. * |[4] |TMR1IF |Timer1 Interrupt Status Flag
  370. * | | |This field is used for Timer1 interrupt status flag.
  371. * | | |0 = Timer1 interrupt did not occur.
  372. * | | |1 = Timer1 interrupt occurred.
  373. * | | |Note: This bit can be cleared by writing 1 to it.
  374. * |[5] |TMR2IF |Timer2 Interrupt Status Flag
  375. * | | |This field is used for Timer2 interrupt status flag.
  376. * | | |0 = Timer2 interrupt did not occur.
  377. * | | |1 = Timer2 interrupt occurred.
  378. * | | |Note: This bit can be cleared by writing 1 to it.
  379. * |[6] |BGTIF |Block Guard Time Interrupt Status Flag
  380. * | | |This field is used for indicate block guard time interrupt status flag in receive direction.
  381. * | | |0 = Block guard time interrupt did not occur.
  382. * | | |1 = Block guard time interrupt occurred.
  383. * | | |Note1: This bit is valid only when RXBGTEN (SCn_ALTCTL[12]) is enabled.
  384. * | | |Note2: This bit can be cleared by writing 1 to it.
  385. * |[7] |CDIF |Card Detect Interrupt Status Flag (Read Only)
  386. * | | |This field is used for card detect interrupt status flag
  387. * | | |The card detect status is CINSERT (SCn_STATUS[12]) and CREMOVE (SCn_STATUS[11]).
  388. * | | |0 = Card detect event did not occur.
  389. * | | |1 = Card detect event occurred.
  390. * | | |Note: This bit is read only, user must to clear CINSERT or CREMOVE status to clear it.
  391. * |[8] |INITIF |Initial End Interrupt Status Flag
  392. * | | |This field is used for activation (ACTEN (SCn_ALTCTL[3])), deactivation (DACTEN (SCn_ALTCTL[2]))
  393. * | | |and warm reset (WARSTEN (SCn_ALTCTL[4])) sequence interrupt status flag.
  394. * | | |0 = Initial sequence is not complete.
  395. * | | |1 = Initial sequence is completed.
  396. * | | |Note: This bit can be cleared by writing 1 to it.
  397. * |[9] |RXTOIF |Receive Buffer Time-out Interrupt Status Flag (Read Only)
  398. * | | |This field is used for indicate receive buffer time-out interrupt status flag.
  399. * | | |0 = Receive buffer time-out interrupt did not occur.
  400. * | | |1 = Receive buffer time-out interrupt occurred.
  401. * | | |Note: This bit is read only, user must read all receive buffer remaining data by reading SCn_DAT
  402. * | | |register to clear it.
  403. * |[10] |ACERRIF |Auto Convention Error Interrupt Status Flag
  404. * | | |This field indicates auto convention sequence error.
  405. * | | |0 = Received TS at ATR state is 0x3B or 0x3F.
  406. * | | |1 = Received TS at ATR state is neither 0x3B nor 0x3F.
  407. * | | |Note: This bit can be cleared by writing 1 to it.
  408. * @var SC_T::STATUS
  409. * Offset: 0x20 SC Transfer Status Register
  410. * ---------------------------------------------------------------------------------------------------
  411. * |Bits |Field |Descriptions
  412. * | :----: | :----: | :---- |
  413. * |[0] |RXOV |Receive Overflow Error Status Flag
  414. * | | |This bit is set when Rx buffer overflow.
  415. * | | |0 = Rx buffer is not overflow.
  416. * | | |1 = Rx buffer is overflow when the number of received bytes is greater than Rx buffer size (4 bytes).
  417. * | | |Note: This bit can be cleared by writing 1 to it.
  418. * |[1] |RXEMPTY |Receive Buffer Empty Status Flag (Read Only)
  419. * | | |This bit indicates Rx buffer empty or not.
  420. * | | |0 = Rx buffer is not empty.
  421. * | | |1 = Rx buffer is empty, it means the last byte of Rx buffer has read from DAT (SCn_DAT[7:0]) by CPU.
  422. * |[2] |RXFULL |Receive Buffer Full Status Flag (Read Only)
  423. * | | |This bit indicates Rx buffer full or not.
  424. * | | |0 = Rx buffer count is less than 4.
  425. * | | |1 = Rx buffer count equals to 4.
  426. * |[4] |PEF |Receiver Parity Error Status Flag
  427. * | | |This bit is set to logic 1 whenever the received character does not have a valid parity bit.
  428. * | | |0 = Receiver parity error flag did not occur.
  429. * | | |1 = Receiver parity error flag occurred.
  430. * | | |Note1: This bit can be cleared by writing 1 to it.
  431. * | | |Note2: If CPU sets receiver retries function by setting RXRTYEN (SCn_CTL[19]), hardware will not
  432. * | | |set this flag.
  433. * |[5] |FEF |Receiver Frame Error Status Flag
  434. * | | |This bit is set to logic 1 whenever the received character does not have a valid stop bit (that is,
  435. * | | |the stop bit following the last data bit or parity bit is detected as logic 0).
  436. * | | |0 = Receiver frame error flag did not occur.
  437. * | | |1 = Receiver frame error flag occurred.
  438. * | | |Note1: This bit can be cleared by writing 1 to it.
  439. * | | |Note2: If CPU sets receiver retries function by setting RXRTYEN (SCn_CTL[19]), hardware will not
  440. * | | |set this flag.
  441. * |[6] |BEF |Receiver Break Error Status Flag
  442. * | | |This bit is set to logic 1 whenever the received data input (Rx) held in the spacing state
  443. * | | |(logic 0) is longer than a full word transmission time (that is, the total time of start bit +
  444. * | | |data bits + parity bit + stop bit).
  445. * | | |0 = Receiver break error flag did not occur.
  446. * | | |1 = Receiver break error flag occurred.
  447. * | | |Note1: This bit can be cleared by writing 1 to it.
  448. * | | |Note2: If CPU sets receiver retries function by setting RXRTYEN (SCn_CTL[19]), hardware will not set
  449. * | | |this flag.
  450. * |[8] |TXOV |Transmit Overflow Error Interrupt Status Flag
  451. * | | |This bit is set when Tx buffer overflow.
  452. * | | |0 = Tx buffer is not overflow.
  453. * | | |1 = Tx buffer is overflow when Tx buffer is full and an additional write operation to DAT (SCn_DAT[7:0]).
  454. * | | |Note: This bit can be cleared by writing 1 to it.
  455. * |[9] |TXEMPTY |Transmit Buffer Empty Status Flag (Read Only)
  456. * | | |This bit indicates TX buffer empty or not.
  457. * | | |0 = Tx buffer is not empty.
  458. * | | |1 = Tx buffer is empty, it means the last byte of Tx buffer has been transferred to Transmitter
  459. * | | |Shift Register.
  460. * | | |Note: This bit will be cleared when writing data into DAT (SCn_DAT[7:0]).
  461. * |[10] |TXFULL |Transmit Buffer Full Status Flag (Read Only)
  462. * | | |This bit indicates Tx buffer full or not.
  463. * | | |0 = Tx buffer count is less than 4.
  464. * | | |1 = Tx buffer count equals to 4.
  465. * |[11] |CREMOVE |Card Removal Status of SCn_CD Pin
  466. * | | |This bit is set whenever card has been removal.
  467. * | | |0 = No effect.
  468. * | | |1 = Card removed.
  469. * | | |Note1: This bit can be cleared by writing 1 to it.
  470. * | | |Note2: Card detect function will start after SCEN (SCn_CTL[0]) set.
  471. * |[12] |CINSERT |Card Insert Status of SCn_CD Pin
  472. * | | |This bit is set whenever card has been inserted.
  473. * | | |0 = No effect.
  474. * | | |1 = Card insert.
  475. * | | |Note1: This bit can be cleared by writing 1 to it.
  476. * | | |Note2: The card detect function will start after SCEN (SCn_CTL[0]) set.
  477. * |[13] |CDPINSTS |Card Detect Pin Status (Read Only)
  478. * | | |This bit is the pin status of SCn_CD.
  479. * | | |0 = The SCn_CD pin state at low.
  480. * | | |1 = The SCn_CD pin state at high.
  481. * |[18:16] |RXPOINT |Receive Buffer Pointer Status (Read Only)
  482. * | | |This field indicates the Rx buffer pointer status
  483. * | | |When SC controller receives one byte from external device, RXPOINT increases one
  484. * | | |When one byte of Rx buffer is read by CPU, RXPOINT decreases one.
  485. * |[21] |RXRERR |Receiver Retry Error
  486. * | | |This bit is used for receiver error retry and set by hardware.
  487. * | | |0 = No Rx retry transfer.
  488. * | | |1 = Rx has any error and retries transfer.
  489. * | | |Note1: This bit can be cleared by writing 1 to it.
  490. * | | |Note2 This bit is a flag and cannot generate any interrupt to CPU.
  491. * | | |Note3: If CPU enables receiver retries function by setting RXRTYEN (SCn_CTL[19]),
  492. * | | |hardware will not set this flag.
  493. * |[22] |RXOVERR |Receiver over Retry Error
  494. * | | |This bit is used for receiver retry counts over than retry number limitation.
  495. * | | |0 = Receiver retries counts is not over than RXRTY (SCn_CTL[18:16]) + 1.
  496. * | | |1 = Receiver retries counts over than RXRTY (SCn_CTL[18:16]) + 1.
  497. * | | |Note1: This bit can be cleared by writing 1 to it.
  498. * | | |Note2: If CPU enables receiver retries function by setting RXRTYEN (SCn_CTL[19]), hardware
  499. * | | |will not set this flag.
  500. * |[23] |RXACT |Receiver in Active Status Flag (Read Only)
  501. * | | |This bit indicates Rx transfer status.
  502. * | | |0 = This bit is cleared automatically when Rx transfer is finished.
  503. * | | |1 = This bit is set by hardware when Rx transfer is in active.
  504. * | | |Note: This bit is read only.
  505. * |[26:24] |TXPOINT |Transmit Buffer Pointer Status (Read Only)
  506. * | | |This field indicates the Tx buffer pointer status
  507. * | | |When CPU writes data into SCn_DAT, TXPOINT increases one
  508. * | | |When one byte of Tx buffer is transferred to transmitter shift register, TXPOINT decreases one.
  509. * |[29] |TXRERR |Transmitter Retry Error
  510. * | | |This bit is used for indicate transmitter error retry and set by hardware.
  511. * | | |0 = No Tx retry transfer.
  512. * | | |1 = Tx has any error and retries transfer.
  513. * | | |Note1: This bit can be cleared by writing 1 to it.
  514. * | | |Note2: This bit is a flag and cannot generate any interrupt to CPU.
  515. * |[30] |TXOVERR |Transmitter over Retry Error
  516. * | | |This bit is used for transmitter retry counts over than retry number limitation.
  517. * | | |0 = Transmitter retries counts is not over than TXRTY (SCn_CTL[22:20]) + 1.
  518. * | | |1 = Transmitter retries counts over than TXRTY (SCn_CTL[22:20]) + 1.
  519. * | | |Note: This bit can be cleared by writing 1 to it.
  520. * |[31] |TXACT |Transmit in Active Status Flag (Read Only)
  521. * | | |This bit indicates Tx transmit status.
  522. * | | |0 = This bit is cleared automatically when Tx transfer is finished or the last byte transmission
  523. * | | |has completed.
  524. * | | |1 = Transmit is active and this bit is set by hardware when Tx transfer is in active and the STOP
  525. * | | |bit of the last byte has not been transmitted.
  526. * | | |Note: This bit is read only.
  527. * @var SC_T::PINCTL
  528. * Offset: 0x24 SC Pin Control State Register
  529. * ---------------------------------------------------------------------------------------------------
  530. * |Bits |Field |Descriptions
  531. * | :----: | :----: | :---- |
  532. * |[0] |PWREN |SCn_PWR Pin Signal
  533. * | | |User can set PWRINV (SCn_PINCTL[11]) and PWREN (SCn_PINCTL[0]) to decide SCn_PWR pin is in high or low level.
  534. * | | |Write this field to drive SCn_PWR pin
  535. * | | |Refer PWRINV (SCn_PINCTL[11]) description for programming SCn_PWR pin voltage level.
  536. * | | |Read this field to get SCn_PWR signal status.
  537. * | | |0 = SCn_PWR signal status is low.
  538. * | | |1 = SCn_PWR signal status is high.
  539. * | | |Note: When operating at activation, warm reset or deactivation mode, this bit will be changed automatically.
  540. * | | |Thus, do not fill in this field when operating in these modes.
  541. * |[1] |RSTEN |SCn_RST Pin Signal
  542. * | | |User can set RSTEN (SCn_PINCTL[1]) to decide SCn_RST pin is in high or low level.
  543. * | | |Write this field to drive SCn_RST pin.
  544. * | | |0 = Drive SCn_RST pin to low.
  545. * | | |1 = Drive SCn_RST pin to high.
  546. * | | |Read this field to get SCn_RST signal status.
  547. * | | |0 = SCn_RST signal status is low.
  548. * | | |1 = SCn_RST signal status is high.
  549. * | | |Note: When operating at activation, warm reset or deactivation mode, this bit will be changed automatically.
  550. * | | |Thus, do not fill in this field when operating in these modes.
  551. * |[6] |CLKKEEP |SC Clock Enable Bit
  552. * | | |0 = SC clock generation Disabled.
  553. * | | |1 = SC clock always keeps free running.
  554. * | | |Note: When operating in activation, warm reset or deactivation mode, this bit will be changed automatically.
  555. * | | |Thus, do not fill in this field when operating in these modes.
  556. * |[9] |SCDATA |SCn_DATA Pin Signal
  557. * | | |This bit is the signal status of SCn_DATA but user can drive SCn_DATA pin to high or low by setting this bit.
  558. * | | |0 = Drive SCn_DATA pin to low.
  559. * | | |1 = Drive SCn_DATA pin to high.
  560. * | | |Read this field to get SCn_DATA signal status.
  561. * | | |0 = SCn_DATA signal status is low.
  562. * | | |1 = SCn_DATA signal status is high.
  563. * | | |Note: When SC is at activation, warm reset or deactivation mode, this bit will be changed automatically.
  564. * | | |Thus, do not fill in this field when SC is in these modes.
  565. * |[11] |PWRINV |SCn_PWR Pin Inverse
  566. * | | |This bit is used for inverse the SCn_PWR pin.
  567. * | | |There are four kinds of combination for SCn_PWR pin setting by PWRINV (SCn_PINCTL[11]) and PWREN (SCn_PINCTL[0]).
  568. * | | |PWRINV is 0 and PWREN is 0, SCn_PWR pin is 0.
  569. * | | |PWRINV is 0 and PWREN is 1, SCn_PWR pin is 1.
  570. * | | |PWRINV is 1 and PWREN is 0, SCn_PWR pin is 1.
  571. * | | |PWRINV is 1 and PWREN is 1, SCn_PWR pin is 0.
  572. * | | |Note: User must select PWRINV (SCn_PINCTL[11]) before smart card is enabled by SCEN (SCn_CTL[0]).
  573. * |[16] |DATASTS |SCn_DATA Pin Status (Read Only)
  574. * | | |This bit is the pin status of SCn_DATA.
  575. * | | |0 = The SCn_DATA pin status is low.
  576. * | | |1 = The SCn_DATA pin status is high.
  577. * |[17] |PWRSTS |SCn_PWR Pin Status (Read Only)
  578. * | | |This bit is the pin status of SCn_PWR.
  579. * | | |0 = SCn_PWR pin to low.
  580. * | | |1 = SCn_PWR pin to high.
  581. * |[18] |RSTSTS |SCn_RST Pin Status (Read Only)
  582. * | | |This bit is the pin status of SCn_RST.
  583. * | | |0 = SCn_RST pin is low.
  584. * | | |1 = SCn_RST pin is high.
  585. * |[30] |SYNC |SYNC Flag Indicator (Read Only)
  586. * | | |Due to synchronization, user should check this bit when writing a new value to SCn_PINCTL register.
  587. * | | |0 = Synchronizing is completion, user can write new data to SCn_PINCTL register.
  588. * | | |1 = Last value is synchronizing.
  589. * @var SC_T::TMRCTL0
  590. * Offset: 0x28 SC Internal Timer0 Control Register
  591. * ---------------------------------------------------------------------------------------------------
  592. * |Bits |Field |Descriptions
  593. * | :----: | :----: | :---- |
  594. * |[23:0] |CNT |Timer0 Counter Value
  595. * | | |This field indicates the internal Timer0 counter values.
  596. * | | |Note: Unit of Timer0 counter is ETU base.
  597. * |[27:24] |OPMODE |Timer0 Operation Mode Selection
  598. * | | |This field indicates the internal 24-bit Timer0 operation selection.
  599. * | | |Refer to Table 7.17-3 for programming Timer0.
  600. * |[31] |SYNC |SYNC Flag Indicator (Read Only)
  601. * | | |Due to synchronization, user should check this bit when writing a new value to the SCn_TMRCTL0 register.
  602. * | | |0 = Synchronizing is completion, user can write new data to SCn_TMRCTL0 register.
  603. * | | |1 = Last value is synchronizing.
  604. * @var SC_T::TMRCTL1
  605. * Offset: 0x2C SC Internal Timer1 Control Register
  606. * ---------------------------------------------------------------------------------------------------
  607. * |Bits |Field |Descriptions
  608. * | :----: | :----: | :---- |
  609. * |[7:0] |CNT |Timer 1 Counter Value
  610. * | | |This field indicates the internal Timer1 counter values.
  611. * | | |Note: Unit of Timer1 counter is ETU base.
  612. * |[27:24] |OPMODE |Timer 1 Operation Mode Selection
  613. * | | |This field indicates the internal 8-bit Timer1 operation selection.
  614. * | | |Refer to Table 7.17-3 for programming Timer1.
  615. * |[31] |SYNC |SYNC Flag Indicator (Read Only)
  616. * | | |Due to synchronization, software should check this bit when writing a new value to SCn_TMRCTL1 register.
  617. * | | |0 = Synchronizing is completion, user can write new data to SCn_TMRCTL1 register.
  618. * | | |1 = Last value is synchronizing.
  619. * @var SC_T::TMRCTL2
  620. * Offset: 0x30 SC Internal Timer2 Control Register
  621. * ---------------------------------------------------------------------------------------------------
  622. * |Bits |Field |Descriptions
  623. * | :----: | :----: | :---- |
  624. * |[7:0] |CNT |Timer 2 Counter Value
  625. * | | |This field indicates the internal Timer2 counter values.
  626. * | | |Note: Unit of Timer2 counter is ETU base.
  627. * |[27:24] |OPMODE |Timer 2 Operation Mode Selection
  628. * | | |This field indicates the internal 8-bit Timer2 operation selection
  629. * | | |Refer to Table 7.17-3 for programming Timer2.
  630. * |[31] |SYNC |SYNC Flag Indicator (Read Only)
  631. * | | |Due to synchronization, user should check this bit when writing a new value to SCn_TMRCTL2 register.
  632. * | | |0 = Synchronizing is completion, user can write new data to SCn_TMRCTL2 register.
  633. * | | |1 = Last value is synchronizing.
  634. * @var SC_T::UARTCTL
  635. * Offset: 0x34 SC UART Mode Control Register
  636. * ---------------------------------------------------------------------------------------------------
  637. * |Bits |Field |Descriptions
  638. * | :----: | :----: | :---- |
  639. * |[0] |UARTEN |UART Mode Enable Bit
  640. * | | |Sets this bit to enable UART mode function.
  641. * | | |0 = Smart Card mode.
  642. * | | |1 = UART mode.
  643. * | | |Note1: When operating in UART mode, user must set CONSEL (SCn_CTL[5:4]) = 00 and AUTOCEN (SCn_CTL[3]) = 0.
  644. * | | |Note2: When operating in Smart Card mode, user must set UARTEN (SCn_UARTCTL[0]) = 0.
  645. * | | |Note3: When UART mode is enabled, hardware will generate a reset to reset FIFO and internal state machine.
  646. * |[5:4] |WLS |Word Length Selection
  647. * | | |This field is used for select UART data length.
  648. * | | |00 = Word length is 8 bits.
  649. * | | |01 = Word length is 7 bits.
  650. * | | |10 = Word length is 6 bits.
  651. * | | |11 = Word length is 5 bits.
  652. * | | |Note: In smart card mode, this WLS must be '00'.
  653. * |[6] |PBOFF |Parity Bit Disable Control
  654. * | | |Sets this bit is used for disable parity check function.
  655. * | | |0 = Parity bit is generated or checked between the last data word bit and stop bit of the serial data.
  656. * | | |1 = Parity bit is not generated (transmitting data) or checked (receiving data) during transfer.
  657. * | | |Note: In smart card mode, this field must be '0' (default setting is with parity bit).
  658. * |[7] |OPE |Odd Parity Enable Bit
  659. * | | |This is used for odd/even parity selection.
  660. * | | |0 = Even number of logic 1's are transmitted or check the data word and parity bits in receiving mode.
  661. * | | |1 = Odd number of logic 1's are transmitted or check the data word and parity bits in receiving mode.
  662. * | | |Note: This bit has effect only when PBOFF bit is '0'.
  663. * @var SC_T::ACTCTL
  664. * Offset: 0x4C SC Activation Control Register
  665. * ---------------------------------------------------------------------------------------------------
  666. * |Bits |Field |Descriptions
  667. * | :----: | :----: | :---- |
  668. * |[4:0] |T1EXT |T1 Extend Time of Hardware Activation
  669. * | | |This field provide the configurable cycles to extend the activation time T1 period.
  670. * | | |The cycle scaling factor is 2048.
  671. * | | |Extend cycles = (filled value * 2048) cycles.
  672. * | | |Refer to SC activation sequence in Figure 7.17-4.
  673. * | | |For example,
  674. * | | |SCLK = 4MHz, each cycle = 0.25us,.
  675. * | | |Filled 20 to this field
  676. * | | |Extend time = 20 * 2048 * 0.25us = 10.24 ms.
  677. * | | |Note: Setting 0 to this field conforms to the protocol ISO/IEC 7816-3
  678. */
  679. __IO uint32_t DAT; /*!< [0x0000] SC Receive/Transmit Holding Buffer Register */
  680. __IO uint32_t CTL; /*!< [0x0004] SC Control Register */
  681. __IO uint32_t ALTCTL; /*!< [0x0008] SC Alternate Control Register */
  682. __IO uint32_t EGT; /*!< [0x000c] SC Extra Guard Time Register */
  683. __IO uint32_t RXTOUT; /*!< [0x0010] SC Receive Buffer Time-out Counter Register */
  684. __IO uint32_t ETUCTL; /*!< [0x0014] SC Element Time Unit Control Register */
  685. __IO uint32_t INTEN; /*!< [0x0018] SC Interrupt Enable Control Register */
  686. __IO uint32_t INTSTS; /*!< [0x001c] SC Interrupt Status Register */
  687. __IO uint32_t STATUS; /*!< [0x0020] SC Transfer Status Register */
  688. __IO uint32_t PINCTL; /*!< [0x0024] SC Pin Control State Register */
  689. __IO uint32_t TMRCTL0; /*!< [0x0028] SC Internal Timer0 Control Register */
  690. __IO uint32_t TMRCTL1; /*!< [0x002c] SC Internal Timer1 Control Register */
  691. __IO uint32_t TMRCTL2; /*!< [0x0030] SC Internal Timer2 Control Register */
  692. __IO uint32_t UARTCTL; /*!< [0x0034] SC UART Mode Control Register */
  693. /** @cond HIDDEN_SYMBOLS */
  694. __I uint32_t RESERVE0[5];
  695. /** @endcond */
  696. __IO uint32_t ACTCTL; /*!< [0x004c] SC Activation Control Register */
  697. } SC_T;
  698. /**
  699. @addtogroup SC_CONST SC Bit Field Definition
  700. Constant Definitions for SC Controller
  701. @{ */
  702. #define SC_DAT_DAT_Pos (0) /*!< SC_T::DAT: DAT Position */
  703. #define SC_DAT_DAT_Msk (0xfful << SC_DAT_DAT_Pos) /*!< SC_T::DAT: DAT Mask */
  704. #define SC_CTL_SCEN_Pos (0) /*!< SC_T::CTL: SCEN Position */
  705. #define SC_CTL_SCEN_Msk (0x1ul << SC_CTL_SCEN_Pos) /*!< SC_T::CTL: SCEN Mask */
  706. #define SC_CTL_RXOFF_Pos (1) /*!< SC_T::CTL: RXOFF Position */
  707. #define SC_CTL_RXOFF_Msk (0x1ul << SC_CTL_RXOFF_Pos) /*!< SC_T::CTL: RXOFF Mask */
  708. #define SC_CTL_TXOFF_Pos (2) /*!< SC_T::CTL: TXOFF Position */
  709. #define SC_CTL_TXOFF_Msk (0x1ul << SC_CTL_TXOFF_Pos) /*!< SC_T::CTL: TXOFF Mask */
  710. #define SC_CTL_AUTOCEN_Pos (3) /*!< SC_T::CTL: AUTOCEN Position */
  711. #define SC_CTL_AUTOCEN_Msk (0x1ul << SC_CTL_AUTOCEN_Pos) /*!< SC_T::CTL: AUTOCEN Mask */
  712. #define SC_CTL_CONSEL_Pos (4) /*!< SC_T::CTL: CONSEL Position */
  713. #define SC_CTL_CONSEL_Msk (0x3ul << SC_CTL_CONSEL_Pos) /*!< SC_T::CTL: CONSEL Mask */
  714. #define SC_CTL_RXTRGLV_Pos (6) /*!< SC_T::CTL: RXTRGLV Position */
  715. #define SC_CTL_RXTRGLV_Msk (0x3ul << SC_CTL_RXTRGLV_Pos) /*!< SC_T::CTL: RXTRGLV Mask */
  716. #define SC_CTL_BGT_Pos (8) /*!< SC_T::CTL: BGT Position */
  717. #define SC_CTL_BGT_Msk (0x1ful << SC_CTL_BGT_Pos) /*!< SC_T::CTL: BGT Mask */
  718. #define SC_CTL_TMRSEL_Pos (13) /*!< SC_T::CTL: TMRSEL Position */
  719. #define SC_CTL_TMRSEL_Msk (0x3ul << SC_CTL_TMRSEL_Pos) /*!< SC_T::CTL: TMRSEL Mask */
  720. #define SC_CTL_NSB_Pos (15) /*!< SC_T::CTL: NSB Position */
  721. #define SC_CTL_NSB_Msk (0x1ul << SC_CTL_NSB_Pos) /*!< SC_T::CTL: NSB Mask */
  722. #define SC_CTL_RXRTY_Pos (16) /*!< SC_T::CTL: RXRTY Position */
  723. #define SC_CTL_RXRTY_Msk (0x7ul << SC_CTL_RXRTY_Pos) /*!< SC_T::CTL: RXRTY Mask */
  724. #define SC_CTL_RXRTYEN_Pos (19) /*!< SC_T::CTL: RXRTYEN Position */
  725. #define SC_CTL_RXRTYEN_Msk (0x1ul << SC_CTL_RXRTYEN_Pos) /*!< SC_T::CTL: RXRTYEN Mask */
  726. #define SC_CTL_TXRTY_Pos (20) /*!< SC_T::CTL: TXRTY Position */
  727. #define SC_CTL_TXRTY_Msk (0x7ul << SC_CTL_TXRTY_Pos) /*!< SC_T::CTL: TXRTY Mask */
  728. #define SC_CTL_TXRTYEN_Pos (23) /*!< SC_T::CTL: TXRTYEN Position */
  729. #define SC_CTL_TXRTYEN_Msk (0x1ul << SC_CTL_TXRTYEN_Pos) /*!< SC_T::CTL: TXRTYEN Mask */
  730. #define SC_CTL_CDDBSEL_Pos (24) /*!< SC_T::CTL: CDDBSEL Position */
  731. #define SC_CTL_CDDBSEL_Msk (0x3ul << SC_CTL_CDDBSEL_Pos) /*!< SC_T::CTL: CDDBSEL Mask */
  732. #define SC_CTL_CDLV_Pos (26) /*!< SC_T::CTL: CDLV Position */
  733. #define SC_CTL_CDLV_Msk (0x1ul << SC_CTL_CDLV_Pos) /*!< SC_T::CTL: CDLV Mask */
  734. #define SC_CTL_SYNC_Pos (30) /*!< SC_T::CTL: SYNC Position */
  735. #define SC_CTL_SYNC_Msk (0x1ul << SC_CTL_SYNC_Pos) /*!< SC_T::CTL: SYNC Mask */
  736. #define SC_ALTCTL_TXRST_Pos (0) /*!< SC_T::ALTCTL: TXRST Position */
  737. #define SC_ALTCTL_TXRST_Msk (0x1ul << SC_ALTCTL_TXRST_Pos) /*!< SC_T::ALTCTL: TXRST Mask */
  738. #define SC_ALTCTL_RXRST_Pos (1) /*!< SC_T::ALTCTL: RXRST Position */
  739. #define SC_ALTCTL_RXRST_Msk (0x1ul << SC_ALTCTL_RXRST_Pos) /*!< SC_T::ALTCTL: RXRST Mask */
  740. #define SC_ALTCTL_DACTEN_Pos (2) /*!< SC_T::ALTCTL: DACTEN Position */
  741. #define SC_ALTCTL_DACTEN_Msk (0x1ul << SC_ALTCTL_DACTEN_Pos) /*!< SC_T::ALTCTL: DACTEN Mask */
  742. #define SC_ALTCTL_ACTEN_Pos (3) /*!< SC_T::ALTCTL: ACTEN Position */
  743. #define SC_ALTCTL_ACTEN_Msk (0x1ul << SC_ALTCTL_ACTEN_Pos) /*!< SC_T::ALTCTL: ACTEN Mask */
  744. #define SC_ALTCTL_WARSTEN_Pos (4) /*!< SC_T::ALTCTL: WARSTEN Position */
  745. #define SC_ALTCTL_WARSTEN_Msk (0x1ul << SC_ALTCTL_WARSTEN_Pos) /*!< SC_T::ALTCTL: WARSTEN Mask */
  746. #define SC_ALTCTL_CNTEN0_Pos (5) /*!< SC_T::ALTCTL: CNTEN0 Position */
  747. #define SC_ALTCTL_CNTEN0_Msk (0x1ul << SC_ALTCTL_CNTEN0_Pos) /*!< SC_T::ALTCTL: CNTEN0 Mask */
  748. #define SC_ALTCTL_CNTEN1_Pos (6) /*!< SC_T::ALTCTL: CNTEN1 Position */
  749. #define SC_ALTCTL_CNTEN1_Msk (0x1ul << SC_ALTCTL_CNTEN1_Pos) /*!< SC_T::ALTCTL: CNTEN1 Mask */
  750. #define SC_ALTCTL_CNTEN2_Pos (7) /*!< SC_T::ALTCTL: CNTEN2 Position */
  751. #define SC_ALTCTL_CNTEN2_Msk (0x1ul << SC_ALTCTL_CNTEN2_Pos) /*!< SC_T::ALTCTL: CNTEN2 Mask */
  752. #define SC_ALTCTL_INITSEL_Pos (8) /*!< SC_T::ALTCTL: INITSEL Position */
  753. #define SC_ALTCTL_INITSEL_Msk (0x3ul << SC_ALTCTL_INITSEL_Pos) /*!< SC_T::ALTCTL: INITSEL Mask */
  754. #define SC_ALTCTL_ADACEN_Pos (11) /*!< SC_T::ALTCTL: ADACEN Position */
  755. #define SC_ALTCTL_ADACEN_Msk (0x1ul << SC_ALTCTL_ADACEN_Pos) /*!< SC_T::ALTCTL: ADACEN Mask */
  756. #define SC_ALTCTL_RXBGTEN_Pos (12) /*!< SC_T::ALTCTL: RXBGTEN Position */
  757. #define SC_ALTCTL_RXBGTEN_Msk (0x1ul << SC_ALTCTL_RXBGTEN_Pos) /*!< SC_T::ALTCTL: RXBGTEN Mask */
  758. #define SC_ALTCTL_ACTSTS0_Pos (13) /*!< SC_T::ALTCTL: ACTSTS0 Position */
  759. #define SC_ALTCTL_ACTSTS0_Msk (0x1ul << SC_ALTCTL_ACTSTS0_Pos) /*!< SC_T::ALTCTL: ACTSTS0 Mask */
  760. #define SC_ALTCTL_ACTSTS1_Pos (14) /*!< SC_T::ALTCTL: ACTSTS1 Position */
  761. #define SC_ALTCTL_ACTSTS1_Msk (0x1ul << SC_ALTCTL_ACTSTS1_Pos) /*!< SC_T::ALTCTL: ACTSTS1 Mask */
  762. #define SC_ALTCTL_ACTSTS2_Pos (15) /*!< SC_T::ALTCTL: ACTSTS2 Position */
  763. #define SC_ALTCTL_ACTSTS2_Msk (0x1ul << SC_ALTCTL_ACTSTS2_Pos) /*!< SC_T::ALTCTL: ACTSTS2 Mask */
  764. #define SC_ALTCTL_SYNC_Pos (31) /*!< SC_T::ALTCTL: SYNC Position */
  765. #define SC_ALTCTL_SYNC_Msk (0x1ul << SC_ALTCTL_SYNC_Pos) /*!< SC_T::ALTCTL: SYNC Mask */
  766. #define SC_EGT_EGT_Pos (0) /*!< SC_T::EGT: EGT Position */
  767. #define SC_EGT_EGT_Msk (0xfful << SC_EGT_EGT_Pos) /*!< SC_T::EGT: EGT Mask */
  768. #define SC_RXTOUT_RFTM_Pos (0) /*!< SC_T::RXTOUT: RFTM Position */
  769. #define SC_RXTOUT_RFTM_Msk (0x1fful << SC_RXTOUT_RFTM_Pos) /*!< SC_T::RXTOUT: RFTM Mask */
  770. #define SC_ETUCTL_ETURDIV_Pos (0) /*!< SC_T::ETUCTL: ETURDIV Position */
  771. #define SC_ETUCTL_ETURDIV_Msk (0xffful << SC_ETUCTL_ETURDIV_Pos) /*!< SC_T::ETUCTL: ETURDIV Mask */
  772. #define SC_INTEN_RDAIEN_Pos (0) /*!< SC_T::INTEN: RDAIEN Position */
  773. #define SC_INTEN_RDAIEN_Msk (0x1ul << SC_INTEN_RDAIEN_Pos) /*!< SC_T::INTEN: RDAIEN Mask */
  774. #define SC_INTEN_TBEIEN_Pos (1) /*!< SC_T::INTEN: TBEIEN Position */
  775. #define SC_INTEN_TBEIEN_Msk (0x1ul << SC_INTEN_TBEIEN_Pos) /*!< SC_T::INTEN: TBEIEN Mask */
  776. #define SC_INTEN_TERRIEN_Pos (2) /*!< SC_T::INTEN: TERRIEN Position */
  777. #define SC_INTEN_TERRIEN_Msk (0x1ul << SC_INTEN_TERRIEN_Pos) /*!< SC_T::INTEN: TERRIEN Mask */
  778. #define SC_INTEN_TMR0IEN_Pos (3) /*!< SC_T::INTEN: TMR0IEN Position */
  779. #define SC_INTEN_TMR0IEN_Msk (0x1ul << SC_INTEN_TMR0IEN_Pos) /*!< SC_T::INTEN: TMR0IEN Mask */
  780. #define SC_INTEN_TMR1IEN_Pos (4) /*!< SC_T::INTEN: TMR1IEN Position */
  781. #define SC_INTEN_TMR1IEN_Msk (0x1ul << SC_INTEN_TMR1IEN_Pos) /*!< SC_T::INTEN: TMR1IEN Mask */
  782. #define SC_INTEN_TMR2IEN_Pos (5) /*!< SC_T::INTEN: TMR2IEN Position */
  783. #define SC_INTEN_TMR2IEN_Msk (0x1ul << SC_INTEN_TMR2IEN_Pos) /*!< SC_T::INTEN: TMR2IEN Mask */
  784. #define SC_INTEN_BGTIEN_Pos (6) /*!< SC_T::INTEN: BGTIEN Position */
  785. #define SC_INTEN_BGTIEN_Msk (0x1ul << SC_INTEN_BGTIEN_Pos) /*!< SC_T::INTEN: BGTIEN Mask */
  786. #define SC_INTEN_CDIEN_Pos (7) /*!< SC_T::INTEN: CDIEN Position */
  787. #define SC_INTEN_CDIEN_Msk (0x1ul << SC_INTEN_CDIEN_Pos) /*!< SC_T::INTEN: CDIEN Mask */
  788. #define SC_INTEN_INITIEN_Pos (8) /*!< SC_T::INTEN: INITIEN Position */
  789. #define SC_INTEN_INITIEN_Msk (0x1ul << SC_INTEN_INITIEN_Pos) /*!< SC_T::INTEN: INITIEN Mask */
  790. #define SC_INTEN_RXTOIEN_Pos (9) /*!< SC_T::INTEN: RXTOIEN Position */
  791. #define SC_INTEN_RXTOIEN_Msk (0x1ul << SC_INTEN_RXTOIEN_Pos) /*!< SC_T::INTEN: RXTOIEN Mask */
  792. #define SC_INTEN_ACERRIEN_Pos (10) /*!< SC_T::INTEN: ACERRIEN Position */
  793. #define SC_INTEN_ACERRIEN_Msk (0x1ul << SC_INTEN_ACERRIEN_Pos) /*!< SC_T::INTEN: ACERRIEN Mask */
  794. #define SC_INTSTS_RDAIF_Pos (0) /*!< SC_T::INTSTS: RDAIF Position */
  795. #define SC_INTSTS_RDAIF_Msk (0x1ul << SC_INTSTS_RDAIF_Pos) /*!< SC_T::INTSTS: RDAIF Mask */
  796. #define SC_INTSTS_TBEIF_Pos (1) /*!< SC_T::INTSTS: TBEIF Position */
  797. #define SC_INTSTS_TBEIF_Msk (0x1ul << SC_INTSTS_TBEIF_Pos) /*!< SC_T::INTSTS: TBEIF Mask */
  798. #define SC_INTSTS_TERRIF_Pos (2) /*!< SC_T::INTSTS: TERRIF Position */
  799. #define SC_INTSTS_TERRIF_Msk (0x1ul << SC_INTSTS_TERRIF_Pos) /*!< SC_T::INTSTS: TERRIF Mask */
  800. #define SC_INTSTS_TMR0IF_Pos (3) /*!< SC_T::INTSTS: TMR0IF Position */
  801. #define SC_INTSTS_TMR0IF_Msk (0x1ul << SC_INTSTS_TMR0IF_Pos) /*!< SC_T::INTSTS: TMR0IF Mask */
  802. #define SC_INTSTS_TMR1IF_Pos (4) /*!< SC_T::INTSTS: TMR1IF Position */
  803. #define SC_INTSTS_TMR1IF_Msk (0x1ul << SC_INTSTS_TMR1IF_Pos) /*!< SC_T::INTSTS: TMR1IF Mask */
  804. #define SC_INTSTS_TMR2IF_Pos (5) /*!< SC_T::INTSTS: TMR2IF Position */
  805. #define SC_INTSTS_TMR2IF_Msk (0x1ul << SC_INTSTS_TMR2IF_Pos) /*!< SC_T::INTSTS: TMR2IF Mask */
  806. #define SC_INTSTS_BGTIF_Pos (6) /*!< SC_T::INTSTS: BGTIF Position */
  807. #define SC_INTSTS_BGTIF_Msk (0x1ul << SC_INTSTS_BGTIF_Pos) /*!< SC_T::INTSTS: BGTIF Mask */
  808. #define SC_INTSTS_CDIF_Pos (7) /*!< SC_T::INTSTS: CDIF Position */
  809. #define SC_INTSTS_CDIF_Msk (0x1ul << SC_INTSTS_CDIF_Pos) /*!< SC_T::INTSTS: CDIF Mask */
  810. #define SC_INTSTS_INITIF_Pos (8) /*!< SC_T::INTSTS: INITIF Position */
  811. #define SC_INTSTS_INITIF_Msk (0x1ul << SC_INTSTS_INITIF_Pos) /*!< SC_T::INTSTS: INITIF Mask */
  812. #define SC_INTSTS_RXTOIF_Pos (9) /*!< SC_T::INTSTS: RXTOIF Position */
  813. #define SC_INTSTS_RXTOIF_Msk (0x1ul << SC_INTSTS_RXTOIF_Pos) /*!< SC_T::INTSTS: RXTOIF Mask */
  814. #define SC_INTSTS_ACERRIF_Pos (10) /*!< SC_T::INTSTS: ACERRIF Position */
  815. #define SC_INTSTS_ACERRIF_Msk (0x1ul << SC_INTSTS_ACERRIF_Pos) /*!< SC_T::INTSTS: ACERRIF Mask */
  816. #define SC_STATUS_RXOV_Pos (0) /*!< SC_T::STATUS: RXOV Position */
  817. #define SC_STATUS_RXOV_Msk (0x1ul << SC_STATUS_RXOV_Pos) /*!< SC_T::STATUS: RXOV Mask */
  818. #define SC_STATUS_RXEMPTY_Pos (1) /*!< SC_T::STATUS: RXEMPTY Position */
  819. #define SC_STATUS_RXEMPTY_Msk (0x1ul << SC_STATUS_RXEMPTY_Pos) /*!< SC_T::STATUS: RXEMPTY Mask */
  820. #define SC_STATUS_RXFULL_Pos (2) /*!< SC_T::STATUS: RXFULL Position */
  821. #define SC_STATUS_RXFULL_Msk (0x1ul << SC_STATUS_RXFULL_Pos) /*!< SC_T::STATUS: RXFULL Mask */
  822. #define SC_STATUS_PEF_Pos (4) /*!< SC_T::STATUS: PEF Position */
  823. #define SC_STATUS_PEF_Msk (0x1ul << SC_STATUS_PEF_Pos) /*!< SC_T::STATUS: PEF Mask */
  824. #define SC_STATUS_FEF_Pos (5) /*!< SC_T::STATUS: FEF Position */
  825. #define SC_STATUS_FEF_Msk (0x1ul << SC_STATUS_FEF_Pos) /*!< SC_T::STATUS: FEF Mask */
  826. #define SC_STATUS_BEF_Pos (6) /*!< SC_T::STATUS: BEF Position */
  827. #define SC_STATUS_BEF_Msk (0x1ul << SC_STATUS_BEF_Pos) /*!< SC_T::STATUS: BEF Mask */
  828. #define SC_STATUS_TXOV_Pos (8) /*!< SC_T::STATUS: TXOV Position */
  829. #define SC_STATUS_TXOV_Msk (0x1ul << SC_STATUS_TXOV_Pos) /*!< SC_T::STATUS: TXOV Mask */
  830. #define SC_STATUS_TXEMPTY_Pos (9) /*!< SC_T::STATUS: TXEMPTY Position */
  831. #define SC_STATUS_TXEMPTY_Msk (0x1ul << SC_STATUS_TXEMPTY_Pos) /*!< SC_T::STATUS: TXEMPTY Mask */
  832. #define SC_STATUS_TXFULL_Pos (10) /*!< SC_T::STATUS: TXFULL Position */
  833. #define SC_STATUS_TXFULL_Msk (0x1ul << SC_STATUS_TXFULL_Pos) /*!< SC_T::STATUS: TXFULL Mask */
  834. #define SC_STATUS_CREMOVE_Pos (11) /*!< SC_T::STATUS: CREMOVE Position */
  835. #define SC_STATUS_CREMOVE_Msk (0x1ul << SC_STATUS_CREMOVE_Pos) /*!< SC_T::STATUS: CREMOVE Mask */
  836. #define SC_STATUS_CINSERT_Pos (12) /*!< SC_T::STATUS: CINSERT Position */
  837. #define SC_STATUS_CINSERT_Msk (0x1ul << SC_STATUS_CINSERT_Pos) /*!< SC_T::STATUS: CINSERT Mask */
  838. #define SC_STATUS_CDPINSTS_Pos (13) /*!< SC_T::STATUS: CDPINSTS Position */
  839. #define SC_STATUS_CDPINSTS_Msk (0x1ul << SC_STATUS_CDPINSTS_Pos) /*!< SC_T::STATUS: CDPINSTS Mask */
  840. #define SC_STATUS_RXPOINT_Pos (16) /*!< SC_T::STATUS: RXPOINT Position */
  841. #define SC_STATUS_RXPOINT_Msk (0x7ul << SC_STATUS_RXPOINT_Pos) /*!< SC_T::STATUS: RXPOINT Mask */
  842. #define SC_STATUS_RXRERR_Pos (21) /*!< SC_T::STATUS: RXRERR Position */
  843. #define SC_STATUS_RXRERR_Msk (0x1ul << SC_STATUS_RXRERR_Pos) /*!< SC_T::STATUS: RXRERR Mask */
  844. #define SC_STATUS_RXOVERR_Pos (22) /*!< SC_T::STATUS: RXOVERR Position */
  845. #define SC_STATUS_RXOVERR_Msk (0x1ul << SC_STATUS_RXOVERR_Pos) /*!< SC_T::STATUS: RXOVERR Mask */
  846. #define SC_STATUS_RXACT_Pos (23) /*!< SC_T::STATUS: RXACT Position */
  847. #define SC_STATUS_RXACT_Msk (0x1ul << SC_STATUS_RXACT_Pos) /*!< SC_T::STATUS: RXACT Mask */
  848. #define SC_STATUS_TXPOINT_Pos (24) /*!< SC_T::STATUS: TXPOINT Position */
  849. #define SC_STATUS_TXPOINT_Msk (0x7ul << SC_STATUS_TXPOINT_Pos) /*!< SC_T::STATUS: TXPOINT Mask */
  850. #define SC_STATUS_TXRERR_Pos (29) /*!< SC_T::STATUS: TXRERR Position */
  851. #define SC_STATUS_TXRERR_Msk (0x1ul << SC_STATUS_TXRERR_Pos) /*!< SC_T::STATUS: TXRERR Mask */
  852. #define SC_STATUS_TXOVERR_Pos (30) /*!< SC_T::STATUS: TXOVERR Position */
  853. #define SC_STATUS_TXOVERR_Msk (0x1ul << SC_STATUS_TXOVERR_Pos) /*!< SC_T::STATUS: TXOVERR Mask */
  854. #define SC_STATUS_TXACT_Pos (31) /*!< SC_T::STATUS: TXACT Position */
  855. #define SC_STATUS_TXACT_Msk (0x1ul << SC_STATUS_TXACT_Pos) /*!< SC_T::STATUS: TXACT Mask */
  856. #define SC_PINCTL_PWREN_Pos (0) /*!< SC_T::PINCTL: PWREN Position */
  857. #define SC_PINCTL_PWREN_Msk (0x1ul << SC_PINCTL_PWREN_Pos) /*!< SC_T::PINCTL: PWREN Mask */
  858. #define SC_PINCTL_RSTEN_Pos (1) /*!< SC_T::PINCTL: RSTEN Position */
  859. #define SC_PINCTL_RSTEN_Msk (0x1ul << SC_PINCTL_RSTEN_Pos) /*!< SC_T::PINCTL: RSTEN Mask */
  860. #define SC_PINCTL_CLKKEEP_Pos (6) /*!< SC_T::PINCTL: CLKKEEP Position */
  861. #define SC_PINCTL_CLKKEEP_Msk (0x1ul << SC_PINCTL_CLKKEEP_Pos) /*!< SC_T::PINCTL: CLKKEEP Mask */
  862. #define SC_PINCTL_SCDATA_Pos (9) /*!< SC_T::PINCTL: SCDATA Position */
  863. #define SC_PINCTL_SCDATA_Msk (0x1ul << SC_PINCTL_SCDATA_Pos) /*!< SC_T::PINCTL: SCDATA Mask */
  864. #define SC_PINCTL_PWRINV_Pos (11) /*!< SC_T::PINCTL: PWRINV Position */
  865. #define SC_PINCTL_PWRINV_Msk (0x1ul << SC_PINCTL_PWRINV_Pos) /*!< SC_T::PINCTL: PWRINV Mask */
  866. #define SC_PINCTL_DATASTS_Pos (16) /*!< SC_T::PINCTL: DATASTS Position */
  867. #define SC_PINCTL_DATASTS_Msk (0x1ul << SC_PINCTL_DATASTS_Pos) /*!< SC_T::PINCTL: DATASTS Mask */
  868. #define SC_PINCTL_PWRSTS_Pos (17) /*!< SC_T::PINCTL: PWRSTS Position */
  869. #define SC_PINCTL_PWRSTS_Msk (0x1ul << SC_PINCTL_PWRSTS_Pos) /*!< SC_T::PINCTL: PWRSTS Mask */
  870. #define SC_PINCTL_RSTSTS_Pos (18) /*!< SC_T::PINCTL: RSTSTS Position */
  871. #define SC_PINCTL_RSTSTS_Msk (0x1ul << SC_PINCTL_RSTSTS_Pos) /*!< SC_T::PINCTL: RSTSTS Mask */
  872. #define SC_PINCTL_SYNC_Pos (30) /*!< SC_T::PINCTL: SYNC Position */
  873. #define SC_PINCTL_SYNC_Msk (0x1ul << SC_PINCTL_SYNC_Pos) /*!< SC_T::PINCTL: SYNC Mask */
  874. #define SC_TMRCTL0_CNT_Pos (0) /*!< SC_T::TMRCTL0: CNT Position */
  875. #define SC_TMRCTL0_CNT_Msk (0xfffffful << SC_TMRCTL0_CNT_Pos) /*!< SC_T::TMRCTL0: CNT Mask */
  876. #define SC_TMRCTL0_OPMODE_Pos (24) /*!< SC_T::TMRCTL0: OPMODE Position */
  877. #define SC_TMRCTL0_OPMODE_Msk (0xful << SC_TMRCTL0_OPMODE_Pos) /*!< SC_T::TMRCTL0: OPMODE Mask */
  878. #define SC_TMRCTL0_SYNC_Pos (31) /*!< SC_T::TMRCTL0: SYNC Position */
  879. #define SC_TMRCTL0_SYNC_Msk (0x1ul << SC_TMRCTL0_SYNC_Pos) /*!< SC_T::TMRCTL0: SYNC Mask */
  880. #define SC_TMRCTL1_CNT_Pos (0) /*!< SC_T::TMRCTL1: CNT Position */
  881. #define SC_TMRCTL1_CNT_Msk (0xfful << SC_TMRCTL1_CNT_Pos) /*!< SC_T::TMRCTL1: CNT Mask */
  882. #define SC_TMRCTL1_OPMODE_Pos (24) /*!< SC_T::TMRCTL1: OPMODE Position */
  883. #define SC_TMRCTL1_OPMODE_Msk (0xful << SC_TMRCTL1_OPMODE_Pos) /*!< SC_T::TMRCTL1: OPMODE Mask */
  884. #define SC_TMRCTL1_SYNC_Pos (31) /*!< SC_T::TMRCTL1: SYNC Position */
  885. #define SC_TMRCTL1_SYNC_Msk (0x1ul << SC_TMRCTL1_SYNC_Pos) /*!< SC_T::TMRCTL1: SYNC Mask */
  886. #define SC_TMRCTL2_CNT_Pos (0) /*!< SC_T::TMRCTL2: CNT Position */
  887. #define SC_TMRCTL2_CNT_Msk (0xfful << SC_TMRCTL2_CNT_Pos) /*!< SC_T::TMRCTL2: CNT Mask */
  888. #define SC_TMRCTL2_OPMODE_Pos (24) /*!< SC_T::TMRCTL2: OPMODE Position */
  889. #define SC_TMRCTL2_OPMODE_Msk (0xful << SC_TMRCTL2_OPMODE_Pos) /*!< SC_T::TMRCTL2: OPMODE Mask */
  890. #define SC_TMRCTL2_SYNC_Pos (31) /*!< SC_T::TMRCTL2: SYNC Position */
  891. #define SC_TMRCTL2_SYNC_Msk (0x1ul << SC_TMRCTL2_SYNC_Pos) /*!< SC_T::TMRCTL2: SYNC Mask */
  892. #define SC_UARTCTL_UARTEN_Pos (0) /*!< SC_T::UARTCTL: UARTEN Position */
  893. #define SC_UARTCTL_UARTEN_Msk (0x1ul << SC_UARTCTL_UARTEN_Pos) /*!< SC_T::UARTCTL: UARTEN Mask */
  894. #define SC_UARTCTL_WLS_Pos (4) /*!< SC_T::UARTCTL: WLS Position */
  895. #define SC_UARTCTL_WLS_Msk (0x3ul << SC_UARTCTL_WLS_Pos) /*!< SC_T::UARTCTL: WLS Mask */
  896. #define SC_UARTCTL_PBOFF_Pos (6) /*!< SC_T::UARTCTL: PBOFF Position */
  897. #define SC_UARTCTL_PBOFF_Msk (0x1ul << SC_UARTCTL_PBOFF_Pos) /*!< SC_T::UARTCTL: PBOFF Mask */
  898. #define SC_UARTCTL_OPE_Pos (7) /*!< SC_T::UARTCTL: OPE Position */
  899. #define SC_UARTCTL_OPE_Msk (0x1ul << SC_UARTCTL_OPE_Pos) /*!< SC_T::UARTCTL: OPE Mask */
  900. #define SC_ACTCTL_T1EXT_Pos (0) /*!< SC_T::ACTCTL: T1EXT Position */
  901. #define SC_ACTCTL_T1EXT_Msk (0x1ful << SC_ACTCTL_T1EXT_Pos) /*!< SC_T::ACTCTL: T1EXT Mask */
  902. /**@}*/ /* SC_CONST */
  903. /**@}*/ /* end of SC register group */
  904. /**@}*/ /* end of REGISTER group */
  905. #if defined ( __CC_ARM )
  906. #pragma no_anon_unions
  907. #endif
  908. #endif /* __SC_REG_H__ */