SPI_INT_BIT is send interrupt flag bit or receiving interrupt flag bit?

5 posts / 0 new
The Last post
tanyong1126
Offline
Last seen:3 years 4 have a line
Joined:The 2016-04-11 01:46
SPI_INT_BIT is send interrupt flag bit or receiving interrupt flag bit?

X50001200 DA14580 SPI_CTRL_REG (0) the bit13 SPI_INT_BIT is receiving interrupt flag bit or send interrupt flag bit?
If send interrupt flags, then the data is not sent when the bit is 0, send data over the TX Register or fifo is empty when this bit is 1?
If receiving interrupt flags, so did not receive the data when the bit is 0, receives the data after the 1?

While of the following statements in the program is waiting to send to send data over still waiting to receive registers to receive data complete?
X0500 SetWord16 (SPI_RX_TX_REG0, 0);/ / write data to the SPI_RX_TX_REG0
The do
{
} while (GetBits16 (SPI_CTRL_REG SPI_INT_BIT) = = 0).
DataRead = GetWord16 (SPI_RX_TX_REG0);/ / read from SPI_RX_TX_REG0 register data

The function of the complete statement is to send a command to 0 x0500 to spi flash plugin, the flash will return a data to the da14580.

Keywords:
Device:
Qinjiny_Dialog
Offline
Last seen:3 up 3 days a line
The Staff
Joined:The 2016-11-01 05:47
0 = RX Register or FIFO is

0 = RX Register or FIFO is empty.
1 = SPI interrupt. Data from thenTransmitted and received-
Must be reset by SW by writing to SPI_CLEAR_INT_REG.

Is receiving interrupt and sends the interrupt

tanyong1126
Offline
Last seen:3 years 4 have a line
Joined:The 2016-04-11 01:46
Further, when SPI_RX_TX

Further ask, when SPI_RX_TX_REG0 after receiving the data receive register for full, if you want to empty it, so what is the read SPI_RX_TX_REG0 data, or by SPI_INT_BIT a reset?Which way is the true empty receive register?

Qinjiny_Dialog
Offline
Last seen:3 up 3 days a line
The Staff
Joined:The 2016-11-01 05:47
Read will empty receive register, receive register data under the condition of SPI

Read will empty receive register, have data receive register SPI_INT_BIT would have been to 1

tanyong1126
Offline
Last seen:3 years 4 have a line
Joined:The 2016-04-11 01:46
If you don't clear the receiving register

If not empty receive register, that is, as you said above have data receive register SPI_INT_BIT will always is 1, you can continue to receive the data?Still say come back data have been rejected?