Specifications

SLAA137A
MSP430 Internet Connectivity 23
Bit 7
SOCK_
ERROR
Bit 6
SOCK_
ERROR
Bit 5
SOCK_
ERROR
Bit 4
SOCK_
ERROR
Bit 3
SOCK_TX_BUF_
RELEASED
Bit 2
SOCK_DATA_
AVAILABLE
Bit 1
SOCK_
CONNECTED
Bit 0
SOCK_
ACTIVE
Figure 11. SocketStatus Register
SOCK_ACTIVE (Bit 0)
This flag is set when the TCP is busy opening a connection (previous call of an API method to
open a session). While set, no further call of one of these functions is allowed. If an open fails or
the connection is closed normally, the stack clears this flag again. The occurrence of a possible
error is shown in the error code flags.
SOCK_CONNECTED (Bit 1)
This flag indicates that the state of the TCP state machine is established. If set, data transfer
using the appropriate API function can take place. On closing or resetting a connection this flag
is cleared.
SOCK_DATA_AVAILABLE (Bit 2)
This flag informs the application that a new TCP segment has just arrived and can be read out of
the receive buffer. To get simple access to this buffer, the pointer TCP_RX_BUF should be
used. The variable TCPRxDataCount contains the amount of data received. After reading the
contents of the buffer, the application should release the buffer by calling the API function
TCPReleaseRxBuffer() immediately so that the stack can fill in new data (see Figure 12). If the
buffer is not released for a longer time and therefore a lot of TCP segments have to be
discarded, the connection can be reset by the other TCP.
DATA_AVAILABLE?
Yes
No
No. of Bytes Rec'd = TCPRxDataCount
Read Out and Process rx Buffer Starting With
Address TCP_RX_BUF
TCPReleaseRxBuffer()
Figure 12. Data Reception