Tool/software: Code Composer Studio
Hello,
I have ported the Simple Link driver to the am335x line, and have things working as expected.
I am seeing a very slow performance when I create my own server. Specifically, the first read is taking about 250ms to obtain about 500 bytes after the connection is accepted.
The server is using regular blocking calls for sl_Create, sl_Bind, sl_Listen, sl_Accept, and sl_Read. The basic code design is:
char *ptr = buffer; do { recv(m_socket, ptr, 1 ... ) /* one byte at a time */ if (*ptr == DELIMITER) break; ptr++; } while ((ptr - buffer) < MAX_BUFFER); /* Digest the block to determine payload and then... */ recv(m_socket, payload, payload_size,... );
After bringing up the server, and the accept call returns, the full read completes about 250ms later.
(A competitors device uses the interrupt to signal when to perform a "recv", and can read the same block of data in 1/10 the time. )
This device seems to send the request to the device via SPI, block until it gets an interrupt, then reads the amount of data requested. Is this a correct assessment? What are any recommended ways to improve the performance?