Hi Norbert,
First of all I would suggest changing your design and use an OS. I am running
FreeRTOS
on STM micro's for 6 years now and I do not see myself doing it any other way.
The STM32F4 is a strong micro with sufficient power to do much more then you do
now.
If you run an OS there will be a small overhead but your system design will be
much simpler
to menage.
If you use Socket API you can send data outside of the LwIP context. If you use
RAW API
you cannot send data from outside of the LwIP context and must take that into
consideration:
First option protect the code that is called from outside of the LwIP context.
Either by using a
critical section (OS).... or using the poll call back.... or triggering LwIP
own system_timer call-back:
sys_timeout(TMR_INTERVAL, function , NULL);
The above is an LwIP internal timer handling. You pass the function you want
(see prototype)
with or without parameters and it will be triggered when time expires.
BR,
Noam.
________________________________
From: lwip-users <[email protected]> on behalf of
Norbert Kleber <[email protected]>
Sent: Friday, September 23, 2016 6:58 PM
To: [email protected]
Subject: [lwip-users] prioritizing of active connections
Hi evereyone,
I got some questions again.
I am using the lwIP on a STM32F4 mikrocontroller without OS. A client
will connect to the stack at two ports for transmission. First port will
be used for controlsignals and second for datatransmission. The whole
System works sequentially.
Firstly 1 package will be received on the ctrl connection afterwards we
receive many packages on the dataconnection. Now I was wondering that
the stack acknowlegded all data packages before he acknowledges the ctrl
package. Due to the operation of the µC I can tell that he received the
package right away and ofcause i use the acknowledgement function in the
receive function. But somehow it is severly delayed approx. 200ms but
the later received data packages all get acknowledged right away.
Does the stack some prioritizing between open connections? Or is it due
to the Ctrl Package being quite short?
Also I am doing some computational work outside of the callback
functions and want to transmit some of the results asap over the ctrl
connection. Is there a way to do that without waiting for the polling
function? Or is there a way to trigger the polling function somehow for
a instant call? Also it seemed like i can't use tcp_write if i am
outside of a callback function (i was storing the pointer to the pcb in
a global variable).
sincerly,
Norbert
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users
lwip-users -- Mailing list for lwIP users -
lists.nongnu.org<https://lists.nongnu.org/mailman/listinfo/lwip-users>
lists.nongnu.org
Welcome to the lwip-users mailing list. Use it to ask questions, share your
experience and discuss new ideas. To see the collection of prior postings to
the list ...
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users