We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I need to use 2 Tcp sockets (one for received orders, and one to send datas)
Even i group all my tcp functions in a single task (with lowest priority), i can't executes other tasks.
I use a tick_timer task as in example (with highest priority) :
__task void tick_timer (void) { os_itv_set (10); while (1) { os_itv_wait (); timer_tick (); } }
and task_tcp with:
while (1) { main_TcpNet (); send_data(); os_tsk_pass (); }
Do i use os_tsk_pass() in all other task ?
I integrated TCPnet in RTX as showed in userguide : www.keil.com/.../rlarm_tn_using_withkernel.htm
When using only TCPsend to send data over ethernet Everything is OK. But I'm experiencing troubles when adding another task, like lcd display (also ported for rtx, ie changed all dly loop to os_dly_wait())
So I added an other task that updates LCD display. I'm using Round Robin Scheduler to be sure that all tasks will have a slice of time to execute. Higher Priority is given to LCD task and tick_timer.
When running : LCD display task updates every seconds. When connecting to TCPnet with a client (telnet), LCD display is not anymore updated and only some frame are sent on the net (using wireshark). If I disconnect the telnet client LCD display does not come back. Everything stopped !
I checked at debug : Never fall in the sys_error_loop.
Thanks for any advice.
Just guessing. I guess that you should move the send_data() to another Task.
I guess it's not possible, since as it said in :
http://www.keil.com/support/man/docs/rlarm/rlarm_tn_using_withkernel.htm
"Functions are not reentrant. This means they must not be interrupted and called again from another task. All TCPnet-related functionality should be collected in a single networking task"
So, i don't know where i could put this fonction send_data().
Sorry for the wrong guessing.
In the below thread:
www.keil.com/.../
Franc Urbanc said ->
Take a HTTP_Demo example as a reference. It has a several targets, one is configured to be used with RTX.