hannes23 wrote on Friday, June 01, 2018:
Hello,
at my project I’ve setup a TCP server based on the one found in FreeRTOS-Plus.
The hardware is a Zynq-7000 variant, and the FreeRTOS Version is FreeRTOSv10.0.0.
The TCP server calls a HTTP worker. The server has the FreeRTOS_select() function to wait for incoming TCP packets. This function is called with a blocking time of 100 ms.
The job of the HTTP-worker is to receive a HTTP url followed by sending an amount of 10 MByte data.
This is done continuosly.
I’ve changed the HTTP-worker according to my needs in that, that the prvSendFile() routine gives to a semaphore and returns . The semaphore is then taken by a separate task (named prvHTTPClientTask), which does the sending.
Each new client gets a new prvHTTPClientTask.
So HTTP clients on th PC can work better in in parallel.
But the problem, which I describe here, also arises with a single client.
The whole job is running quiet well for a long time, (some gigabyte sent), if the task priority of the TCP-server ( 6 ) is lower than the priority of the prvHTTPClientTask ( 7 ).
If I change the priority of the TCP-server to equal or higher piority, the job will starve after a short time.
Maybe 2 - 20 of the 10-MByte sendings.
What I observe is that the FreeRTOS_select() function never returns, although a blocking time of 100 ms is given.
Can anybody give a hint here?
Thanks and greetings.