]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/CORTEX_MPU_M23_Nuvoton_NuMaker_PFM_M2351_IAR_GCC/Nuvoton_Code/Device/Nuvoton/M2351/Include/qspi_reg.h
Add Cortex M23 GCC and IAR ports. Add demo projects for Nuvoton NuMaker-PFM-2351.
[freertos] / FreeRTOS / Demo / CORTEX_MPU_M23_Nuvoton_NuMaker_PFM_M2351_IAR_GCC / Nuvoton_Code / Device / Nuvoton / M2351 / Include / qspi_reg.h
1 /**************************************************************************//**\r
2  * @file     qspi_reg.h\r
3  * @version  V1.00\r
4  * @brief    QSPI register definition header file\r
5  *\r
6  * @copyright (C) 2017 Nuvoton Technology Corp. All rights reserved.\r
7  *****************************************************************************/\r
8 #ifndef __QSPI_REG_H__\r
9 #define __QSPI_REG_H__\r
10 \r
11 /** @addtogroup REGISTER Control Register\r
12 \r
13   @{\r
14 \r
15 */\r
16 \r
17 /*---------------------- Quad Serial Peripheral Interface Controller -------------------------*/\r
18 /**\r
19     @addtogroup QSPI Quad Serial Peripheral Interface Controller(QSPI)\r
20     Memory Mapped Structure for QSPI Controller\r
21 @{ */\r
22 \r
23 typedef struct\r
24 {\r
25 \r
26 \r
27     /**\r
28      * @var QSPI_T::CTL\r
29      * Offset: 0x00  QSPI Control Register\r
30      * ---------------------------------------------------------------------------------------------------\r
31      * |Bits    |Field     |Descriptions\r
32      * | :----: | :----:   | :---- |\r
33      * |[0]     |SPIEN     |QSPI Transfer Control Enable Bit\r
34      * |        |          |In Master mode, the transfer will start when there is data in the FIFO buffer after this bit is set to 1\r
35      * |        |          |In Slave mode, this device is ready to receive data when this bit is set to 1.\r
36      * |        |          |0 = Transfer control Disabled.\r
37      * |        |          |1 = Transfer control Enabled.\r
38      * |        |          |Note: Before changing the configurations of QSPIx_CTL, QSPIx_CLKDIV, QSPIx_SSCTL and QSPIx_FIFOCTL registers, user shall clear the SPIEN (QSPIx_CTL[0]) and confirm the SPIENSTS (QSPIx_STATUS[15]) is 0.\r
39      * |[1]     |RXNEG     |Receive on Negative Edge\r
40      * |        |          |0 = Received data input signal is latched on the rising edge of QSPI bus clock.\r
41      * |        |          |1 = Received data input signal is latched on the falling edge of QSPI bus clock.\r
42      * |[2]     |TXNEG     |Transmit on Negative Edge\r
43      * |        |          |0 = Transmitted data output signal is changed on the rising edge of QSPI bus clock.\r
44      * |        |          |1 = Transmitted data output signal is changed on the falling edge of QSPI bus clock.\r
45      * |[3]     |CLKPOL    |Clock Polarity\r
46      * |        |          |0 = QSPI bus clock is idle low.\r
47      * |        |          |1 = QSPI bus clock is idle high.\r
48      * |[7:4]   |SUSPITV   |Suspend Interval (Master Only)\r
49      * |        |          |The four bits provide configurable suspend interval between two successive transmit/receive transaction in a transfer\r
50      * |        |          |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\r
51      * |        |          |The default value is 0x3\r
52      * |        |          |The period of the suspend interval is obtained according to the following equation.\r
53      * |        |          |(SUSPITV[3:0] + 0.5) * period of QSPICLK clock cycle\r
54      * |        |          |Example:\r
55      * |        |          |SUSPITV = 0x0 .... 0.5 QSPICLK clock cycle.\r
56      * |        |          |SUSPITV = 0x1 .... 1.5 QSPICLK clock cycle.\r
57      * |        |          |.....\r
58      * |        |          |SUSPITV = 0xE .... 14.5 QSPICLK clock cycle.\r
59      * |        |          |SUSPITV = 0xF .... 15.5 QSPICLK clock cycle.\r
60      * |[12:8]  |DWIDTH    |Data Width\r
61      * |        |          |This field specifies how many bits can be transmitted / received in one transaction\r
62      * |        |          |The minimum bit length is 8 bits and can up to 32 bits.\r
63      * |        |          |DWIDTH = 0x08 .... 8 bits.\r
64      * |        |          |DWIDTH = 0x09 .... 9 bits.\r
65      * |        |          |.....\r
66      * |        |          |DWIDTH = 0x1F .... 31 bits.\r
67      * |        |          |DWIDTH = 0x00 .... 32 bits.\r
68      * |        |          |Note: For QSPI0~QSPI3, this bit field will decide the depth of TX/RX FIFO configuration in QSPI mode\r
69      * |        |          |Therefore, changing this bit field will clear TX/RX FIFO by hardware automatically in QSPI0~QSPI3.\r
70      * |[13]    |LSB       |Send LSB First\r
71      * |        |          |0 = The MSB, which bit of transmit/receive register depends on the setting of DWIDTH, is transmitted/received first.\r
72      * |        |          |1 = The LSB, bit 0 of the QSPI TX register, is sent first to the QSPI data output pin, and the first bit received from the QSPI data input pin will be put in the LSB position of the RX register (bit 0 of QSPI_RX).\r
73      * |[14]    |HALFDPX   |QSPI Half-duplex Transfer Enable Bit\r
74      * |        |          |This bit is used to select full-duplex or half-duplex for QSPI transfer\r
75      * |        |          |The bit field DATDIR (QSPIx_CTL[20]) can be used to set the data direction in half-duplex transfer.\r
76      * |        |          |0 = QSPI operates in full-duplex transfer.\r
77      * |        |          |1 = QSPI operates in half-duplex transfer.\r
78      * |[15]    |RXONLY    |Receive-only Mode Enable Bit (Master Only)\r
79      * |        |          |This bit field is only available in Master mode\r
80      * |        |          |In receive-only mode, QSPI Master will generate QSPI bus clock continuously for receiving data bit from QSPI slave device and assert the BUSY status.\r
81      * |        |          |0 = Receive-only mode Disabled.\r
82      * |        |          |1 = Receive-only mode Enabled.\r
83      * |[16]    |TWOBIT    |2-bit Transfer Mode Enable Bit (Only Supported in QSPI0)\r
84      * |        |          |0 = 2-Bit Transfer mode Disabled.\r
85      * |        |          |1 = 2-Bit Transfer mode Enabled.\r
86      * |        |          |Note: When 2-Bit Transfer mode is enabled, the first serial transmitted bit data is from the first FIFO buffer data, and the 2nd serial transmitted bit data is from the second FIFO buffer data\r
87      * |        |          |As the same as transmitted function, the first received bit data is stored into the first FIFO buffer and the 2nd received bit data is stored into the second FIFO buffer at the same time.\r
88      * |[17]    |UNITIEN   |Unit Transfer Interrupt Enable Bit\r
89      * |        |          |0 = QSPI unit transfer interrupt Disabled.\r
90      * |        |          |1 = QSPI unit transfer interrupt Enabled.\r
91      * |[18]    |SLAVE     |Slave Mode Control\r
92      * |        |          |0 = Master mode.\r
93      * |        |          |1 = Slave mode.\r
94      * |[19]    |REORDER   |Byte Reorder Function Enable Bit\r
95      * |        |          |0 = Byte Reorder function Disabled.\r
96      * |        |          |1 = Byte Reorder function Enabled\r
97      * |        |          |A byte suspend interval will be inserted among each byte\r
98      * |        |          |The period of the byte suspend interval depends on the setting of SUSPITV.\r
99      * |        |          |Note: Byte Reorder function is only available if DWIDTH is defined as 16, 24, and 32 bits.\r
100      * |[20]    |DATDIR    |Data Port Direction Control\r
101      * |        |          |This bit is used to select the data input/output direction in half-duplex transfer and Dual/Quad transfer\r
102      * |        |          |0 = QSPI data is input direction.\r
103      * |        |          |1 = QSPI data is output direction.\r
104      * |[21]    |DUALIOEN  |Dual I/O Mode Enable Bit (Only Supported in QSPI0)\r
105      * |        |          |0 = Dual I/O mode Disabled.\r
106      * |        |          |1 = Dual I/O mode Enabled.\r
107      * |[22]    |QUADIOEN  |Quad I/O Mode Enable Bit (Only Supported in QSPI0)\r
108      * |        |          |0 = Quad I/O mode Disabled.\r
109      * |        |          |1 = Quad I/O mode Enabled.\r
110      * @var QSPI_T::CLKDIV\r
111      * Offset: 0x04  QSPI Clock Divider Register\r
112      * ---------------------------------------------------------------------------------------------------\r
113      * |Bits    |Field     |Descriptions\r
114      * | :----: | :----:   | :---- |\r
115      * |[8:0]   |DIVIDER   |Clock Divider\r
116      * |        |          |The value in this field is the frequency divider for generating the peripheral clock, fspi_eclk, and the QSPI bus clock of QSPI Master\r
117      * |        |          |The frequency is obtained according to the following equation.\r
118      * |        |          |where\r
119      * |        |          |is the peripheral clock source, which is defined in the clock control register, CLK_CLKSEL2.\r
120      * @var QSPI_T::SSCTL\r
121      * Offset: 0x08  QSPI Slave Select Control Register\r
122      * ---------------------------------------------------------------------------------------------------\r
123      * |Bits    |Field     |Descriptions\r
124      * | :----: | :----:   | :---- |\r
125      * |[0]     |SS        |Slave Selection Control (Master Only)\r
126      * |        |          |If AUTOSS bit is cleared to 0,\r
127      * |        |          |0 = set the QSPIx_SS line to inactive state.\r
128      * |        |          |1 = set the QSPIx_SS line to active state.\r
129      * |        |          |If the AUTOSS bit is set to 1,\r
130      * |        |          |0 = Keep the QSPIx_SS line at inactive state.\r
131      * |        |          |1 = QSPIx_SS line will be automatically driven to active state for the duration of data transfer, and will be driven to inactive state for the rest of the time\r
132      * |        |          |The active state of QSPIx_SS is specified in SSACTPOL (QSPIx_SSCTL[2]).\r
133      * |[2]     |SSACTPOL  |Slave Selection Active Polarity\r
134      * |        |          |This bit defines the active polarity of slave selection signal (QSPIx_SS).\r
135      * |        |          |0 = The slave selection signal QSPIx_SS is active low.\r
136      * |        |          |1 = The slave selection signal QSPIx_SS is active high.\r
137      * |[3]     |AUTOSS    |Automatic Slave Selection Function Enable Bit (Master Only)\r
138      * |        |          |0 = Automatic slave selection function Disabled\r
139      * |        |          |Slave selection signal will be asserted/de-asserted according to SS (QSPIx_SSCTL[0]).\r
140      * |        |          |1 = Automatic slave selection function Enabled.\r
141      * |[4]     |SLV3WIRE  |Slave 3-wire Mode Enable Bit (Only Supported in QSPI0)\r
142      * |        |          |Slave 3-wire mode is only available in QSPI0\r
143      * |        |          |In Slave 3-wire mode, the QSPI controller can work with 3-wire interface including QSPI0_CLK, QSPI0_MISO and QSPI0_MOSI pins.\r
144      * |        |          |0 = 4-wire bi-direction interface.\r
145      * |        |          |1 = 3-wire bi-direction interface.\r
146      * |[5]     |SLVTOIEN  |Slave Mode Time-out Interrupt Enable Bit (Only Supported in QSPI0)\r
147      * |        |          |0 = Slave mode time-out interrupt Disabled.\r
148      * |        |          |1 = Slave mode time-out interrupt Enabled.\r
149      * |[6]     |SLVTORST  |Slave Mode Time-out Reset Control (Only Supported in QSPI0)\r
150      * |        |          |0 = When Slave mode time-out event occurs, the TX and RX control circuit will not be reset.\r
151      * |        |          |1 = When Slave mode time-out event occurs, the TX and RX control circuit will be reset by hardware.\r
152      * |[8]     |SLVBEIEN  |Slave Mode Bit Count Error Interrupt Enable Bit\r
153      * |        |          |0 = Slave mode bit count error interrupt Disabled.\r
154      * |        |          |1 = Slave mode bit count error interrupt Enabled.\r
155      * |[9]     |SLVURIEN  |Slave Mode TX Under Run Interrupt Enable Bit\r
156      * |        |          |0 = Slave mode TX under run interrupt Disabled.\r
157      * |        |          |1 = Slave mode TX under run interrupt Enabled.\r
158      * |[12]    |SSACTIEN  |Slave Select Active Interrupt Enable Bit\r
159      * |        |          |0 = Slave select active interrupt Disabled.\r
160      * |        |          |1 = Slave select active interrupt Enabled.\r
161      * |[13]    |SSINAIEN  |Slave Select Inactive Interrupt Enable Bit\r
162      * |        |          |0 = Slave select inactive interrupt Disabled.\r
163      * |        |          |1 = Slave select inactive interrupt Enabled.\r
164      * |[31:16] |SLVTOCNT  |Slave Mode Time-out Period (Only Supported in QSPI0)\r
165      * |        |          |In Slave mode, these bits indicate the time-out period when there is bus clock input during slave select active\r
166      * |        |          |The clock source of the time-out counter is Slave peripheral clock\r
167      * |        |          |If the value is 0, it indicates the slave mode time-out function is disabled.\r
168      * @var QSPI_T::PDMACTL\r
169      * Offset: 0x0C  QSPI PDMA Control Register\r
170      * ---------------------------------------------------------------------------------------------------\r
171      * |Bits    |Field     |Descriptions\r
172      * | :----: | :----:   | :---- |\r
173      * |[0]     |TXPDMAEN  |Transmit PDMA Enable Bit\r
174      * |        |          |0 = Transmit PDMA function Disabled.\r
175      * |        |          |1 = Transmit PDMA function Enabled.\r
176      * |        |          |Note: In QSPI Master mode with full duplex transfer, if both TX and RX PDMA functions are enabled, RX PDMA function cannot be enabled prior to TX PDMA function\r
177      * |        |          |User can enable TX PDMA function firstly or enable both functions simultaneously.\r
178      * |[1]     |RXPDMAEN  |Receive PDMA Enable Bit\r
179      * |        |          |0 = Receive PDMA function Disabled.\r
180      * |        |          |1 = Receive PDMA function Enabled.\r
181      * |[2]     |PDMARST   |PDMA Reset\r
182      * |        |          |0 = No effect.\r
183      * |        |          |1 = Reset the PDMA control logic of the QSPI controller. This bit will be automatically cleared to 0.\r
184      * @var QSPI_T::FIFOCTL\r
185      * Offset: 0x10  QSPI FIFO Control Register\r
186      * ---------------------------------------------------------------------------------------------------\r
187      * |Bits    |Field     |Descriptions\r
188      * | :----: | :----:   | :---- |\r
189      * |[0]     |RXRST     |Receive Reset\r
190      * |        |          |0 = No effect.\r
191      * |        |          |1 = Reset receive FIFO pointer and receive circuit\r
192      * |        |          |The RXFULL bit will be cleared to 0 and the RXEMPTY bit will be set to 1\r
193      * |        |          |This bit will be cleared to 0 by hardware about 3 system clock cycles + 2 peripheral clock cycles after it is set to 1\r
194      * |        |          |User can read TXRXRST (QSPIx_STATUS[23]) to check if reset is accomplished or not.\r
195      * |[1]     |TXRST     |Transmit Reset\r
196      * |        |          |0 = No effect.\r
197      * |        |          |1 = Reset transmit FIFO pointer and transmit circuit\r
198      * |        |          |The TXFULL bit will be cleared to 0 and the TXEMPTY bit will be set to 1\r
199      * |        |          |This bit will be cleared to 0 by hardware about 3 system clock cycles + 2 peripheral clock cycles after it is set to 1\r
200      * |        |          |User can read TXRXRST (QSPIx_STATUS[23]) to check if reset is accomplished or not.\r
201      * |        |          |Note: If TX underflow event occurs in QSPI Slave mode, this bit can be used to make QSPI return to idle state.\r
202      * |[2]     |RXTHIEN   |Receive FIFO Threshold Interrupt Enable Bit\r
203      * |        |          |0 = RX FIFO threshold interrupt Disabled.\r
204      * |        |          |1 = RX FIFO threshold interrupt Enabled.\r
205      * |[3]     |TXTHIEN   |Transmit FIFO Threshold Interrupt Enable Bit\r
206      * |        |          |0 = TX FIFO threshold interrupt Disabled.\r
207      * |        |          |1 = TX FIFO threshold interrupt Enabled.\r
208      * |[4]     |RXTOIEN   |Slave Receive Time-out Interrupt Enable Bit\r
209      * |        |          |0 = Receive time-out interrupt Disabled.\r
210      * |        |          |1 = Receive time-out interrupt Enabled.\r
211      * |[5]     |RXOVIEN   |Receive FIFO Overrun Interrupt Enable Bit\r
212      * |        |          |0 = Receive FIFO overrun interrupt Disabled.\r
213      * |        |          |1 = Receive FIFO overrun interrupt Enabled.\r
214      * |[6]     |TXUFPOL   |TX Underflow Data Polarity\r
215      * |        |          |0 = The QSPI data out is keep 0 if there is TX underflow event in Slave mode.\r
216      * |        |          |1 = The QSPI data out is keep 1 if there is TX underflow event in Slave mode.\r
217      * |        |          |Note:\r
218      * |        |          |1. The TX underflow event occurs if there is no any data in TX FIFO when the slave selection signal is active.\r
219      * |        |          |2. When TX underflow event occurs, QSPIx_MISO pin state will be determined by this setting even though TX FIFO is not empty afterward\r
220      * |        |          |Data stored in TX FIFO will be sent through QSPIx_MISO pin in the next transfer frame.\r
221      * |[7]     |TXUFIEN   |TX Underflow Interrupt Enable Bit\r
222      * |        |          |When TX underflow event occurs in Slave mode, TXUFIF (QSPIx_STATUS[19]) will be set to 1\r
223      * |        |          |This bit is used to enable the TX underflow interrupt.\r
224      * |        |          |0 = Slave TX underflow interrupt Disabled.\r
225      * |        |          |1 = Slave TX underflow interrupt Enabled.\r
226      * |[8]     |RXFBCLR   |Receive FIFO Buffer Clear\r
227      * |        |          |0 = No effect.\r
228      * |        |          |1 = Clear receive FIFO pointer\r
229      * |        |          |The RXFULL bit will be cleared to 0 and the RXEMPTY bit will be set to 1\r
230      * |        |          |This bit will be cleared to 0 by hardware about 1 system clock after it is set to 1.\r
231      * |        |          |Note: The RX shift register will not be cleared.\r
232      * |[9]     |TXFBCLR   |Transmit FIFO Buffer Clear\r
233      * |        |          |0 = No effect.\r
234      * |        |          |1 = Clear transmit FIFO pointer\r
235      * |        |          |The TXFULL bit will be cleared to 0 and the TXEMPTY bit will be set to 1\r
236      * |        |          |This bit will be cleared to 0 by hardware about 1 system clock after it is set to 1.\r
237      * |        |          |Note: The TX shift register will not be cleared.\r
238      * |[26:24] |RXTH      |Receive FIFO Threshold\r
239      * |        |          |If the valid data count of the receive FIFO buffer is larger than the RXTH setting, the RXTHIF bit will be set to 1, else the RXTHIF bit will be cleared to 0\r
240      * |        |          |For QSPI0~QSPI3, the MSB of this bit field is only meaningful while QSPI mode 8~16 bits of data length.\r
241      * |[30:28] |TXTH      |Transmit FIFO Threshold\r
242      * |        |          |If the valid data count of the transmit FIFO buffer is less than or equal to the TXTH setting, the TXTHIF bit will be set to 1, else the TXTHIF bit will be cleared to 0\r
243      * |        |          |For QSPI0~QSPI3, the MSB of this bit field is only meaningful while QSPI mode 8~16 bits of data length.\r
244      * @var QSPI_T::STATUS\r
245      * Offset: 0x14  QSPI Status Register\r
246      * ---------------------------------------------------------------------------------------------------\r
247      * |Bits    |Field     |Descriptions\r
248      * | :----: | :----:   | :---- |\r
249      * |[0]     |BUSY      |Busy Status (Read Only)\r
250      * |        |          |0 = QSPI controller is in idle state.\r
251      * |        |          |1 = QSPI controller is in busy state.\r
252      * |        |          |The following listing are the bus busy conditions:\r
253      * |        |          |a. QSPIx_CTL[0] = 1 and TXEMPTY = 0.\r
254      * |        |          |b\r
255      * |        |          |For QSPI Master mode, QSPIx_CTL[0] = 1 and TXEMPTY = 1 but the current transaction is not finished yet.\r
256      * |        |          |c. For QSPI Master mode, QSPIx_CTL[0] = 1 and RXONLY = 1.\r
257      * |        |          |d.\r
258      * |        |          |For QSPI Slave mode, the QSPIx_CTL[0] = 1 and there is serial clock input into the QSPI core logic when slave select is active.\r
259      * |        |          |e.\r
260      * |        |          |For QSPI Slave mode, the QSPIx_CTL[0] = 1 and the transmit buffer or transmit shift register is not empty even if the slave select is inactive.\r
261      * |[1]     |UNITIF    |Unit Transfer Interrupt Flag\r
262      * |        |          |0 = No transaction has been finished since this bit was cleared to 0.\r
263      * |        |          |1 = QSPI controller has finished one unit transfer.\r
264      * |        |          |Note: This bit will be cleared by writing 1 to it.\r
265      * |[2]     |SSACTIF   |Slave Select Active Interrupt Flag\r
266      * |        |          |0 = Slave select active interrupt was cleared or not occurred.\r
267      * |        |          |1 = Slave select active interrupt event occurred.\r
268      * |        |          |Note: Only available in Slave mode. This bit will be cleared by writing 1 to it.\r
269      * |[3]     |SSINAIF   |Slave Select Inactive Interrupt Flag\r
270      * |        |          |0 = Slave select inactive interrupt was cleared or not occurred.\r
271      * |        |          |1 = Slave select inactive interrupt event occurred.\r
272      * |        |          |Note: Only available in Slave mode. This bit will be cleared by writing 1 to it.\r
273      * |[4]     |SSLINE    |Slave Select Line Bus Status (Read Only)\r
274      * |        |          |0 = The slave select line status is 0.\r
275      * |        |          |1 = The slave select line status is 1.\r
276      * |        |          |Note: This bit is only available in Slave mode\r
277      * |        |          |If SSACTPOL (QSPIx_SSCTL[2]) is set 0, and the SSLINE is 1, the QSPI slave select is in inactive status.\r
278      * |[5]     |SLVTOIF   |Slave Time-out Interrupt Flag (Only Supported in QSPI0)\r
279      * |        |          |When the slave select is active and the value of SLVTOCNT is not 0, as the bus clock is detected, the slave time-out counter in QSPI controller logic will be started\r
280      * |        |          |When the value of time-out counter is greater than or equal to the value of SLVTOCNT (QSPI_SSCTL[31:16]) before one transaction is done, the slave time-out interrupt event will be asserted.\r
281      * |        |          |0 = Slave time-out is not active.\r
282      * |        |          |1 = Slave time-out is active.\r
283      * |        |          |Note: This bit will be cleared by writing 1 to it.\r
284      * |[6]     |SLVBEIF   |Slave Mode Bit Count Error Interrupt Flag\r
285      * |        |          |In Slave mode, when the slave select line goes to inactive state, if bit counter is mismatch with DWIDTH, this interrupt flag will be set to 1.\r
286      * |        |          |0 = No Slave mode bit count error event.\r
287      * |        |          |1 = Slave mode bit count error event occurs.\r
288      * |        |          |Note: If the slave select active but there is no any bus clock input, the SLVBEIF also active when the slave select goes to inactive state\r
289      * |        |          |This bit will be cleared by writing 1 to it.\r
290      * |[7]     |SLVURIF   |Slave Mode TX Under Run Interrupt Flag\r
291      * |        |          |In Slave mode, if TX underflow event occurs and the slave select line goes to inactive state, this interrupt flag will be set to 1.\r
292      * |        |          |0 = No Slave TX under run event.\r
293      * |        |          |1 = Slave TX under run event occurs.\r
294      * |        |          |Note: This bit will be cleared by writing 1 to it.\r
295      * |[8]     |RXEMPTY   |Receive FIFO Buffer Empty Indicator (Read Only)\r
296      * |        |          |0 = Receive FIFO buffer is not empty.\r
297      * |        |          |1 = Receive FIFO buffer is empty.\r
298      * |[9]     |RXFULL    |Receive FIFO Buffer Full Indicator (Read Only)\r
299      * |        |          |0 = Receive FIFO buffer is not full.\r
300      * |        |          |1 = Receive FIFO buffer is full.\r
301      * |[10]    |RXTHIF    |Receive FIFO Threshold Interrupt Flag (Read Only)\r
302      * |        |          |0 = The valid data count within the receive FIFO buffer is smaller than or equal to the setting value of RXTH.\r
303      * |        |          |1 = The valid data count within the receive FIFO buffer is larger than the setting value of RXTH.\r
304      * |[11]    |RXOVIF    |Receive FIFO Overrun Interrupt Flag\r
305      * |        |          |When the receive FIFO buffer is full, the follow-up data will be dropped and this bit will be set to 1.\r
306      * |        |          |0 = No FIFO is overrun.\r
307      * |        |          |1 = Receive FIFO is overrun.\r
308      * |        |          |Note: This bit will be cleared by writing 1 to it.\r
309      * |[12]    |RXTOIF    |Receive Time-out Interrupt Flag\r
310      * |        |          |0 = No receive FIFO time-out event.\r
311      * |        |          |1 = Receive FIFO buffer is not empty and no read operation on receive FIFO buffer over 64 QSPI peripheral clock periods in Master mode or over 576 QSPI peripheral clock periods in Slave mode\r
312      * |        |          |When the received FIFO buffer is read by software, the time-out status will be cleared automatically.\r
313      * |        |          |Note: This bit will be cleared by writing 1 to it.\r
314      * |[15]    |SPIENSTS  |QSPI Enable Status (Read Only)\r
315      * |        |          |0 = The QSPI controller is disabled.\r
316      * |        |          |1 = The QSPI controller is enabled.\r
317      * |        |          |Note: The QSPI peripheral clock is asynchronous with the system clock\r
318      * |        |          |In order to make sure the QSPI control logic is disabled, this bit indicates the real status of QSPI controller.\r
319      * |[16]    |TXEMPTY   |Transmit FIFO Buffer Empty Indicator (Read Only)\r
320      * |        |          |0 = Transmit FIFO buffer is not empty.\r
321      * |        |          |1 = Transmit FIFO buffer is empty.\r
322      * |[17]    |TXFULL    |Transmit FIFO Buffer Full Indicator (Read Only)\r
323      * |        |          |0 = Transmit FIFO buffer is not full.\r
324      * |        |          |1 = Transmit FIFO buffer is full.\r
325      * |[18]    |TXTHIF    |Transmit FIFO Threshold Interrupt Flag (Read Only)\r
326      * |        |          |0 = The valid data count within the transmit FIFO buffer is larger than the setting value of TXTH.\r
327      * |        |          |1 = The valid data count within the transmit FIFO buffer is less than or equal to the setting value of TXTH.\r
328      * |[19]    |TXUFIF    |TX Underflow Interrupt Flag\r
329      * |        |          |When the TX underflow event occurs, this bit will be set to 1, the state of data output pin depends on the setting of TXUFPOL.\r
330      * |        |          |0 = No effect.\r
331      * |        |          |1 = No data in Transmit FIFO and TX shift register when the slave selection signal is active.\r
332      * |        |          |Note 1: This bit will be cleared by writing 1 to it.\r
333      * |        |          |Note 2: If reset slave's transmission circuit when slave selection signal is active, this flag will be set to 1 after 2 peripheral clock cycles + 3 system clock cycles since the reset operation is done.\r
334      * |[23]    |TXRXRST   |TX or RX Reset Status (Read Only)\r
335      * |        |          |0 = The reset function of TXRST or RXRST is done.\r
336      * |        |          |1 = Doing the reset function of TXRST or RXRST.\r
337      * |        |          |Note: Both the reset operations of TXRST and RXRST need 3 system clock cycles + 2 peripheral clock cycles\r
338      * |        |          |User can check the status of this bit to monitor the reset function is doing or done.\r
339      * |[27:24] |RXCNT     |Receive FIFO Data Count (Read Only)\r
340      * |        |          |This bit field indicates the valid data count of receive FIFO buffer.\r
341      * |[31:28] |TXCNT     |Transmit FIFO Data Count (Read Only)\r
342      * |        |          |This bit field indicates the valid data count of transmit FIFO buffer.\r
343      * @var QSPI_T::TX\r
344      * Offset: 0x20  QSPI Data Transmit Register\r
345      * ---------------------------------------------------------------------------------------------------\r
346      * |Bits    |Field     |Descriptions\r
347      * | :----: | :----:   | :---- |\r
348      * |[31:0]  |TX        |Data Transmit Register\r
349      * |        |          |The data transmit registers pass through the transmitted data into the 8-level transmit FIFO buffers\r
350      * |        |          |The number of valid bits depends on the setting of DWIDTH (QSPIx_CTL[12:8]) in QSPI mode.\r
351      * |        |          |In QSPI mode, if DWIDTH is set to 0x08, the bits TX[7:0] will be transmitted.\r
352      * |        |          |If DWIDTH is set to 0x00 , the QSPI controller will perform a 32-bit transfer.\r
353      * |        |          |Note: In Master mode, QSPI controller will start to transfer the QSPI bus clock after 1 APB clock and 6 peripheral clock cycles after user writes to this register.\r
354      * @var QSPI_T::RX\r
355      * Offset: 0x30  QSPI Data Receive Register\r
356      * ---------------------------------------------------------------------------------------------------\r
357      * |Bits    |Field     |Descriptions\r
358      * | :----: | :----:   | :---- |\r
359      * |[31:0]  |RX        |Data Receive Register (Read Only)\r
360      * |        |          |There are 8-level FIFO buffers in this controller.\r
361      * |        |          |The data receive register holds the data received from QSPI data input pin.\r
362      * |        |          |If the RXEMPTY (QSPIx_STATUS[8]) is not set to 1, the receive FIFO buffers can be accessed through software by reading this register.\r
363      */\r
364 \r
365     __IO uint32_t CTL;                   /*!< [0x0000] QSPI Control Register                                             */\r
366     __IO uint32_t CLKDIV;                /*!< [0x0004] QSPI Clock Divider Register                                       */\r
367     __IO uint32_t SSCTL;                 /*!< [0x0008] QSPI Slave Select Control Register                                */\r
368     __IO uint32_t PDMACTL;               /*!< [0x000c] QSPI PDMA Control Register                                        */\r
369     __IO uint32_t FIFOCTL;               /*!< [0x0010] QSPI FIFO Control Register                                        */\r
370     __IO uint32_t STATUS;                /*!< [0x0014] QSPI Status Register                                              */\r
371     __I  uint32_t RESERVE0[2];\r
372     __O  uint32_t TX;                    /*!< [0x0020] QSPI Data Transmit Register                                       */\r
373     __I  uint32_t RESERVE1[3];\r
374     __I  uint32_t RX;                    /*!< [0x0030] QSPI Data Receive Register                                        */\r
375 \r
376 } QSPI_T;\r
377 \r
378 /**\r
379     @addtogroup QSPI_CONST QSPI Bit Field Definition\r
380     Constant Definitions for QSPI Controller\r
381 @{ */\r
382 \r
383 #define QSPI_CTL_SPIEN_Pos                (0)                                               /*!< QSPI_T::CTL: SPIEN Position             */\r
384 #define QSPI_CTL_SPIEN_Msk                (0x1ul << QSPI_CTL_SPIEN_Pos)                     /*!< QSPI_T::CTL: SPIEN Mask                 */\r
385 \r
386 #define QSPI_CTL_RXNEG_Pos                (1)                                               /*!< QSPI_T::CTL: RXNEG Position             */\r
387 #define QSPI_CTL_RXNEG_Msk                (0x1ul << QSPI_CTL_RXNEG_Pos)                     /*!< QSPI_T::CTL: RXNEG Mask                 */\r
388 \r
389 #define QSPI_CTL_TXNEG_Pos                (2)                                               /*!< QSPI_T::CTL: TXNEG Position             */\r
390 #define QSPI_CTL_TXNEG_Msk                (0x1ul << QSPI_CTL_TXNEG_Pos)                     /*!< QSPI_T::CTL: TXNEG Mask                 */\r
391 \r
392 #define QSPI_CTL_CLKPOL_Pos               (3)                                               /*!< QSPI_T::CTL: CLKPOL Position            */\r
393 #define QSPI_CTL_CLKPOL_Msk               (0x1ul << QSPI_CTL_CLKPOL_Pos)                    /*!< QSPI_T::CTL: CLKPOL Mask                */\r
394 \r
395 #define QSPI_CTL_SUSPITV_Pos              (4)                                               /*!< QSPI_T::CTL: SUSPITV Position           */\r
396 #define QSPI_CTL_SUSPITV_Msk              (0xful << QSPI_CTL_SUSPITV_Pos)                   /*!< QSPI_T::CTL: SUSPITV Mask               */\r
397 \r
398 #define QSPI_CTL_DWIDTH_Pos               (8)                                               /*!< QSPI_T::CTL: DWIDTH Position            */\r
399 #define QSPI_CTL_DWIDTH_Msk               (0x1ful << QSPI_CTL_DWIDTH_Pos)                   /*!< QSPI_T::CTL: DWIDTH Mask                */\r
400 \r
401 #define QSPI_CTL_LSB_Pos                  (13)                                              /*!< QSPI_T::CTL: LSB Position               */\r
402 #define QSPI_CTL_LSB_Msk                  (0x1ul << QSPI_CTL_LSB_Pos)                       /*!< QSPI_T::CTL: LSB Mask                   */\r
403 \r
404 #define QSPI_CTL_HALFDPX_Pos              (14)                                              /*!< QSPI_T::CTL: HALFDPX Position           */\r
405 #define QSPI_CTL_HALFDPX_Msk              (0x1ul << QSPI_CTL_HALFDPX_Pos)                   /*!< QSPI_T::CTL: HALFDPX Mask               */\r
406 \r
407 #define QSPI_CTL_RXONLY_Pos               (15)                                              /*!< QSPI_T::CTL: RXONLY Position            */\r
408 #define QSPI_CTL_RXONLY_Msk               (0x1ul << QSPI_CTL_RXONLY_Pos)                    /*!< QSPI_T::CTL: RXONLY Mask                */\r
409 \r
410 #define QSPI_CTL_TWOBIT_Pos               (16)                                              /*!< QSPI_T::CTL: TWOBIT Position            */\r
411 #define QSPI_CTL_TWOBIT_Msk               (0x1ul << QSPI_CTL_TWOBIT_Pos)                    /*!< QSPI_T::CTL: TWOBIT Mask                */\r
412 \r
413 #define QSPI_CTL_UNITIEN_Pos              (17)                                              /*!< QSPI_T::CTL: UNITIEN Position           */\r
414 #define QSPI_CTL_UNITIEN_Msk              (0x1ul << QSPI_CTL_UNITIEN_Pos)                   /*!< QSPI_T::CTL: UNITIEN Mask               */\r
415 \r
416 #define QSPI_CTL_SLAVE_Pos                (18)                                              /*!< QSPI_T::CTL: SLAVE Position             */\r
417 #define QSPI_CTL_SLAVE_Msk                (0x1ul << QSPI_CTL_SLAVE_Pos)                     /*!< QSPI_T::CTL: SLAVE Mask                 */\r
418 \r
419 #define QSPI_CTL_REORDER_Pos              (19)                                              /*!< QSPI_T::CTL: REORDER Position           */\r
420 #define QSPI_CTL_REORDER_Msk              (0x1ul << QSPI_CTL_REORDER_Pos)                   /*!< QSPI_T::CTL: REORDER Mask               */\r
421 \r
422 #define QSPI_CTL_DATDIR_Pos               (20)                                              /*!< QSPI_T::CTL: DATDIR Position            */\r
423 #define QSPI_CTL_DATDIR_Msk               (0x1ul << QSPI_CTL_DATDIR_Pos)                    /*!< QSPI_T::CTL: DATDIR Mask                */\r
424 \r
425 #define QSPI_CTL_DUALIOEN_Pos             (21)                                              /*!< QSPI_T::CTL: DUALIOEN Position          */\r
426 #define QSPI_CTL_DUALIOEN_Msk             (0x1ul << QSPI_CTL_DUALIOEN_Pos)                  /*!< QSPI_T::CTL: DUALIOEN Mask              */\r
427 \r
428 #define QSPI_CTL_QUADIOEN_Pos             (22)                                              /*!< QSPI_T::CTL: QUADIOEN Position          */\r
429 #define QSPI_CTL_QUADIOEN_Msk             (0x1ul << QSPI_CTL_QUADIOEN_Pos)                  /*!< QSPI_T::CTL: QUADIOEN Mask              */\r
430 \r
431 #define QSPI_CLKDIV_DIVIDER_Pos           (0)                                               /*!< QSPI_T::CLKDIV: DIVIDER Position        */\r
432 #define QSPI_CLKDIV_DIVIDER_Msk           (0x1fful << QSPI_CLKDIV_DIVIDER_Pos)              /*!< QSPI_T::CLKDIV: DIVIDER Mask            */\r
433 \r
434 #define QSPI_SSCTL_SS_Pos                 (0)                                               /*!< QSPI_T::SSCTL: SS Position              */\r
435 #define QSPI_SSCTL_SS_Msk                 (0x1ul << QSPI_SSCTL_SS_Pos)                      /*!< QSPI_T::SSCTL: SS Mask                  */\r
436 \r
437 #define QSPI_SSCTL_SSACTPOL_Pos           (2)                                               /*!< QSPI_T::SSCTL: SSACTPOL Position        */\r
438 #define QSPI_SSCTL_SSACTPOL_Msk           (0x1ul << QSPI_SSCTL_SSACTPOL_Pos)                /*!< QSPI_T::SSCTL: SSACTPOL Mask            */\r
439 \r
440 #define QSPI_SSCTL_AUTOSS_Pos             (3)                                               /*!< QSPI_T::SSCTL: AUTOSS Position          */\r
441 #define QSPI_SSCTL_AUTOSS_Msk             (0x1ul << QSPI_SSCTL_AUTOSS_Pos)                  /*!< QSPI_T::SSCTL: AUTOSS Mask              */\r
442 \r
443 #define QSPI_SSCTL_SLV3WIRE_Pos           (4)                                               /*!< QSPI_T::SSCTL: SLV3WIRE Position        */\r
444 #define QSPI_SSCTL_SLV3WIRE_Msk           (0x1ul << QSPI_SSCTL_SLV3WIRE_Pos)                /*!< QSPI_T::SSCTL: SLV3WIRE Mask            */\r
445 \r
446 #define QSPI_SSCTL_SLVTOIEN_Pos           (5)                                               /*!< QSPI_T::SSCTL: SLVTOIEN Position        */\r
447 #define QSPI_SSCTL_SLVTOIEN_Msk           (0x1ul << QSPI_SSCTL_SLVTOIEN_Pos)                /*!< QSPI_T::SSCTL: SLVTOIEN Mask            */\r
448 \r
449 #define QSPI_SSCTL_SLVTORST_Pos           (6)                                               /*!< QSPI_T::SSCTL: SLVTORST Position        */\r
450 #define QSPI_SSCTL_SLVTORST_Msk           (0x1ul << QSPI_SSCTL_SLVTORST_Pos)                /*!< QSPI_T::SSCTL: SLVTORST Mask            */\r
451 \r
452 #define QSPI_SSCTL_SLVBEIEN_Pos           (8)                                               /*!< QSPI_T::SSCTL: SLVBEIEN Position        */\r
453 #define QSPI_SSCTL_SLVBEIEN_Msk           (0x1ul << QSPI_SSCTL_SLVBEIEN_Pos)                /*!< QSPI_T::SSCTL: SLVBEIEN Mask            */\r
454 \r
455 #define QSPI_SSCTL_SLVURIEN_Pos           (9)                                               /*!< QSPI_T::SSCTL: SLVURIEN Position        */\r
456 #define QSPI_SSCTL_SLVURIEN_Msk           (0x1ul << QSPI_SSCTL_SLVURIEN_Pos)                /*!< QSPI_T::SSCTL: SLVURIEN Mask            */\r
457 \r
458 #define QSPI_SSCTL_SSACTIEN_Pos           (12)                                              /*!< QSPI_T::SSCTL: SSACTIEN Position        */\r
459 #define QSPI_SSCTL_SSACTIEN_Msk           (0x1ul << QSPI_SSCTL_SSACTIEN_Pos)                /*!< QSPI_T::SSCTL: SSACTIEN Mask            */\r
460 \r
461 #define QSPI_SSCTL_SSINAIEN_Pos           (13)                                              /*!< QSPI_T::SSCTL: SSINAIEN Position        */\r
462 #define QSPI_SSCTL_SSINAIEN_Msk           (0x1ul << QSPI_SSCTL_SSINAIEN_Pos)                /*!< QSPI_T::SSCTL: SSINAIEN Mask            */\r
463 \r
464 #define QSPI_SSCTL_SLVTOCNT_Pos           (16)                                              /*!< QSPI_T::SSCTL: SLVTOCNT Position        */\r
465 #define QSPI_SSCTL_SLVTOCNT_Msk           (0xfffful << QSPI_SSCTL_SLVTOCNT_Pos)             /*!< QSPI_T::SSCTL: SLVTOCNT Mask            */\r
466 \r
467 #define QSPI_PDMACTL_TXPDMAEN_Pos         (0)                                               /*!< QSPI_T::PDMACTL: TXPDMAEN Position      */\r
468 #define QSPI_PDMACTL_TXPDMAEN_Msk         (0x1ul << QSPI_PDMACTL_TXPDMAEN_Pos)              /*!< QSPI_T::PDMACTL: TXPDMAEN Mask          */\r
469 \r
470 #define QSPI_PDMACTL_RXPDMAEN_Pos         (1)                                               /*!< QSPI_T::PDMACTL: RXPDMAEN Position      */\r
471 #define QSPI_PDMACTL_RXPDMAEN_Msk         (0x1ul << QSPI_PDMACTL_RXPDMAEN_Pos)              /*!< QSPI_T::PDMACTL: RXPDMAEN Mask          */\r
472 \r
473 #define QSPI_PDMACTL_PDMARST_Pos          (2)                                               /*!< QSPI_T::PDMACTL: PDMARST Position       */\r
474 #define QSPI_PDMACTL_PDMARST_Msk          (0x1ul << QSPI_PDMACTL_PDMARST_Pos)               /*!< QSPI_T::PDMACTL: PDMARST Mask           */\r
475 \r
476 #define QSPI_FIFOCTL_RXRST_Pos            (0)                                               /*!< QSPI_T::FIFOCTL: RXRST Position         */\r
477 #define QSPI_FIFOCTL_RXRST_Msk            (0x1ul << QSPI_FIFOCTL_RXRST_Pos)                 /*!< QSPI_T::FIFOCTL: RXRST Mask             */\r
478 \r
479 #define QSPI_FIFOCTL_TXRST_Pos            (1)                                               /*!< QSPI_T::FIFOCTL: TXRST Position         */\r
480 #define QSPI_FIFOCTL_TXRST_Msk            (0x1ul << QSPI_FIFOCTL_TXRST_Pos)                 /*!< QSPI_T::FIFOCTL: TXRST Mask             */\r
481 \r
482 #define QSPI_FIFOCTL_RXTHIEN_Pos          (2)                                               /*!< QSPI_T::FIFOCTL: RXTHIEN Position       */\r
483 #define QSPI_FIFOCTL_RXTHIEN_Msk          (0x1ul << QSPI_FIFOCTL_RXTHIEN_Pos)               /*!< QSPI_T::FIFOCTL: RXTHIEN Mask           */\r
484 \r
485 #define QSPI_FIFOCTL_TXTHIEN_Pos          (3)                                               /*!< QSPI_T::FIFOCTL: TXTHIEN Position       */\r
486 #define QSPI_FIFOCTL_TXTHIEN_Msk          (0x1ul << QSPI_FIFOCTL_TXTHIEN_Pos)               /*!< QSPI_T::FIFOCTL: TXTHIEN Mask           */\r
487 \r
488 #define QSPI_FIFOCTL_RXTOIEN_Pos          (4)                                               /*!< QSPI_T::FIFOCTL: RXTOIEN Position       */\r
489 #define QSPI_FIFOCTL_RXTOIEN_Msk          (0x1ul << QSPI_FIFOCTL_RXTOIEN_Pos)               /*!< QSPI_T::FIFOCTL: RXTOIEN Mask           */\r
490 \r
491 #define QSPI_FIFOCTL_RXOVIEN_Pos          (5)                                               /*!< QSPI_T::FIFOCTL: RXOVIEN Position       */\r
492 #define QSPI_FIFOCTL_RXOVIEN_Msk          (0x1ul << QSPI_FIFOCTL_RXOVIEN_Pos)               /*!< QSPI_T::FIFOCTL: RXOVIEN Mask           */\r
493 \r
494 #define QSPI_FIFOCTL_TXUFPOL_Pos          (6)                                               /*!< QSPI_T::FIFOCTL: TXUFPOL Position       */\r
495 #define QSPI_FIFOCTL_TXUFPOL_Msk          (0x1ul << QSPI_FIFOCTL_TXUFPOL_Pos)               /*!< QSPI_T::FIFOCTL: TXUFPOL Mask           */\r
496 \r
497 #define QSPI_FIFOCTL_TXUFIEN_Pos          (7)                                               /*!< QSPI_T::FIFOCTL: TXUFIEN Position       */\r
498 #define QSPI_FIFOCTL_TXUFIEN_Msk          (0x1ul << QSPI_FIFOCTL_TXUFIEN_Pos)               /*!< QSPI_T::FIFOCTL: TXUFIEN Mask           */\r
499 \r
500 #define QSPI_FIFOCTL_RXFBCLR_Pos          (8)                                               /*!< QSPI_T::FIFOCTL: RXFBCLR Position       */\r
501 #define QSPI_FIFOCTL_RXFBCLR_Msk          (0x1ul << QSPI_FIFOCTL_RXFBCLR_Pos)               /*!< QSPI_T::FIFOCTL: RXFBCLR Mask           */\r
502 \r
503 #define QSPI_FIFOCTL_TXFBCLR_Pos          (9)                                               /*!< QSPI_T::FIFOCTL: TXFBCLR Position       */\r
504 #define QSPI_FIFOCTL_TXFBCLR_Msk          (0x1ul << QSPI_FIFOCTL_TXFBCLR_Pos)               /*!< QSPI_T::FIFOCTL: TXFBCLR Mask           */\r
505 \r
506 #define QSPI_FIFOCTL_RXTH_Pos             (24)                                              /*!< QSPI_T::FIFOCTL: RXTH Position          */\r
507 #define QSPI_FIFOCTL_RXTH_Msk             (0x7ul << QSPI_FIFOCTL_RXTH_Pos)                  /*!< QSPI_T::FIFOCTL: RXTH Mask              */\r
508 \r
509 #define QSPI_FIFOCTL_TXTH_Pos             (28)                                              /*!< QSPI_T::FIFOCTL: TXTH Position          */\r
510 #define QSPI_FIFOCTL_TXTH_Msk             (0x7ul << QSPI_FIFOCTL_TXTH_Pos)                  /*!< QSPI_T::FIFOCTL: TXTH Mask              */\r
511 \r
512 #define QSPI_STATUS_BUSY_Pos              (0)                                               /*!< QSPI_T::STATUS: BUSY Position           */\r
513 #define QSPI_STATUS_BUSY_Msk              (0x1ul << QSPI_STATUS_BUSY_Pos)                   /*!< QSPI_T::STATUS: BUSY Mask               */\r
514 \r
515 #define QSPI_STATUS_UNITIF_Pos            (1)                                               /*!< QSPI_T::STATUS: UNITIF Position         */\r
516 #define QSPI_STATUS_UNITIF_Msk            (0x1ul << QSPI_STATUS_UNITIF_Pos)                 /*!< QSPI_T::STATUS: UNITIF Mask             */\r
517 \r
518 #define QSPI_STATUS_SSACTIF_Pos           (2)                                               /*!< QSPI_T::STATUS: SSACTIF Position        */\r
519 #define QSPI_STATUS_SSACTIF_Msk           (0x1ul << QSPI_STATUS_SSACTIF_Pos)                /*!< QSPI_T::STATUS: SSACTIF Mask            */\r
520 \r
521 #define QSPI_STATUS_SSINAIF_Pos           (3)                                               /*!< QSPI_T::STATUS: SSINAIF Position        */\r
522 #define QSPI_STATUS_SSINAIF_Msk           (0x1ul << QSPI_STATUS_SSINAIF_Pos)                /*!< QSPI_T::STATUS: SSINAIF Mask            */\r
523 \r
524 #define QSPI_STATUS_SSLINE_Pos            (4)                                               /*!< QSPI_T::STATUS: SSLINE Position         */\r
525 #define QSPI_STATUS_SSLINE_Msk            (0x1ul << QSPI_STATUS_SSLINE_Pos)                 /*!< QSPI_T::STATUS: SSLINE Mask             */\r
526 \r
527 #define QSPI_STATUS_SLVTOIF_Pos           (5)                                               /*!< QSPI_T::STATUS: SLVTOIF Position        */\r
528 #define QSPI_STATUS_SLVTOIF_Msk           (0x1ul << QSPI_STATUS_SLVTOIF_Pos)                /*!< QSPI_T::STATUS: SLVTOIF Mask            */\r
529 \r
530 #define QSPI_STATUS_SLVBEIF_Pos           (6)                                               /*!< QSPI_T::STATUS: SLVBEIF Position        */\r
531 #define QSPI_STATUS_SLVBEIF_Msk           (0x1ul << QSPI_STATUS_SLVBEIF_Pos)                /*!< QSPI_T::STATUS: SLVBEIF Mask            */\r
532 \r
533 #define QSPI_STATUS_SLVURIF_Pos           (7)                                               /*!< QSPI_T::STATUS: SLVURIF Position        */\r
534 #define QSPI_STATUS_SLVURIF_Msk           (0x1ul << QSPI_STATUS_SLVURIF_Pos)                /*!< QSPI_T::STATUS: SLVURIF Mask            */\r
535 \r
536 #define QSPI_STATUS_RXEMPTY_Pos           (8)                                               /*!< QSPI_T::STATUS: RXEMPTY Position        */\r
537 #define QSPI_STATUS_RXEMPTY_Msk           (0x1ul << QSPI_STATUS_RXEMPTY_Pos)                /*!< QSPI_T::STATUS: RXEMPTY Mask            */\r
538 \r
539 #define QSPI_STATUS_RXFULL_Pos            (9)                                               /*!< QSPI_T::STATUS: RXFULL Position         */\r
540 #define QSPI_STATUS_RXFULL_Msk            (0x1ul << QSPI_STATUS_RXFULL_Pos)                 /*!< QSPI_T::STATUS: RXFULL Mask             */\r
541 \r
542 #define QSPI_STATUS_RXTHIF_Pos            (10)                                              /*!< QSPI_T::STATUS: RXTHIF Position         */\r
543 #define QSPI_STATUS_RXTHIF_Msk            (0x1ul << QSPI_STATUS_RXTHIF_Pos)                 /*!< QSPI_T::STATUS: RXTHIF Mask             */\r
544 \r
545 #define QSPI_STATUS_RXOVIF_Pos            (11)                                              /*!< QSPI_T::STATUS: RXOVIF Position         */\r
546 #define QSPI_STATUS_RXOVIF_Msk            (0x1ul << QSPI_STATUS_RXOVIF_Pos)                 /*!< QSPI_T::STATUS: RXOVIF Mask             */\r
547 \r
548 #define QSPI_STATUS_RXTOIF_Pos            (12)                                              /*!< QSPI_T::STATUS: RXTOIF Position         */\r
549 #define QSPI_STATUS_RXTOIF_Msk            (0x1ul << QSPI_STATUS_RXTOIF_Pos)                 /*!< QSPI_T::STATUS: RXTOIF Mask             */\r
550 \r
551 #define QSPI_STATUS_SPIENSTS_Pos          (15)                                              /*!< QSPI_T::STATUS: SPIENSTS Position       */\r
552 #define QSPI_STATUS_SPIENSTS_Msk          (0x1ul << QSPI_STATUS_SPIENSTS_Pos)               /*!< QSPI_T::STATUS: SPIENSTS Mask           */\r
553 \r
554 #define QSPI_STATUS_TXEMPTY_Pos           (16)                                              /*!< QSPI_T::STATUS: TXEMPTY Position        */\r
555 #define QSPI_STATUS_TXEMPTY_Msk           (0x1ul << QSPI_STATUS_TXEMPTY_Pos)                /*!< QSPI_T::STATUS: TXEMPTY Mask            */\r
556 \r
557 #define QSPI_STATUS_TXFULL_Pos            (17)                                              /*!< QSPI_T::STATUS: TXFULL Position         */\r
558 #define QSPI_STATUS_TXFULL_Msk            (0x1ul << QSPI_STATUS_TXFULL_Pos)                 /*!< QSPI_T::STATUS: TXFULL Mask             */\r
559 \r
560 #define QSPI_STATUS_TXTHIF_Pos            (18)                                              /*!< QSPI_T::STATUS: TXTHIF Position         */\r
561 #define QSPI_STATUS_TXTHIF_Msk            (0x1ul << QSPI_STATUS_TXTHIF_Pos)                 /*!< QSPI_T::STATUS: TXTHIF Mask             */\r
562 \r
563 #define QSPI_STATUS_TXUFIF_Pos            (19)                                              /*!< QSPI_T::STATUS: TXUFIF Position         */\r
564 #define QSPI_STATUS_TXUFIF_Msk            (0x1ul << QSPI_STATUS_TXUFIF_Pos)                 /*!< QSPI_T::STATUS: TXUFIF Mask             */\r
565 \r
566 #define QSPI_STATUS_TXRXRST_Pos           (23)                                              /*!< QSPI_T::STATUS: TXRXRST Position        */\r
567 #define QSPI_STATUS_TXRXRST_Msk           (0x1ul << QSPI_STATUS_TXRXRST_Pos)                /*!< QSPI_T::STATUS: TXRXRST Mask            */\r
568 \r
569 #define QSPI_STATUS_RXCNT_Pos             (24)                                              /*!< QSPI_T::STATUS: RXCNT Position          */\r
570 #define QSPI_STATUS_RXCNT_Msk             (0xful << QSPI_STATUS_RXCNT_Pos)                  /*!< QSPI_T::STATUS: RXCNT Mask              */\r
571 \r
572 #define QSPI_STATUS_TXCNT_Pos             (28)                                              /*!< QSPI_T::STATUS: TXCNT Position          */\r
573 #define QSPI_STATUS_TXCNT_Msk             (0xful << QSPI_STATUS_TXCNT_Pos)                  /*!< QSPI_T::STATUS: TXCNT Mask              */\r
574 \r
575 #define QSPI_TX_TX_Pos                    (0)                                               /*!< QSPI_T::TX: TX Position                 */\r
576 #define QSPI_TX_TX_Msk                    (0xfffffffful << QSPI_TX_TX_Pos)                  /*!< QSPI_T::TX: TX Mask                     */\r
577 \r
578 #define QSPI_RX_RX_Pos                    (0)                                               /*!< QSPI_T::RX: RX Position                 */\r
579 #define QSPI_RX_RX_Msk                    (0xfffffffful << QSPI_RX_RX_Pos)                  /*!< QSPI_T::RX: RX Mask                     */\r
580 \r
581 /**@}*/ /* QSPI_CONST */\r
582 /**@}*/ /* end of QSPI register group */\r
583 /**@}*/ /* end of REGISTER group */\r
584 \r
585 #endif /* __QSPI_REG_H__ */\r