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.
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
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?
Read will empty receive register, have data receive register SPI_INT_BIT would have been to 1
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?