poll-function not called

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

poll-function not called

Karl Karpfen
Hi,

I'm using lwIP 1.4.0 implementation that comes with Starterware for AM3358 from Texas Instruments. Thus I do not know that much about its exact implementation for used hardware. Now I found the poll-function is never called in TI's implementation.

To track down the problem: where in lwIP is this this part implemented? Any hints/suggestion hwere to look at are welcome!

Kind regards

Karl



_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: poll-function not called

mobin.seven
Hi lad
tcp_tmr() must be called every TCP_TMR_INTERVAL milliseconds.this is necessary for poll callback.
Reply | Threaded
Open this post in threaded view
|

Re: poll-function not called

Karl Karpfen
OK, thanks, this leaded me into the correct direction: Texas Instrumetns has implemented full poll-functionality but they have set both NO_SYS and NO_SYS_NO_TIMERS to 1 which disables the timers completely. One of both seems to be wrong/superfluid for me...


2014-09-22 9:31 GMT+02:00 mobin.seven <[hidden email]>:
Hi lad
tcp_tmr() must be called every TCP_TMR_INTERVAL milliseconds.this is
necessary for poll callback.



--
View this message in context: http://lwip.100.n7.nabble.com/poll-function-not-called-tp23324p23326.html
Sent from the lwip-users mailing list archive at Nabble.com.

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users


_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: poll-function not called

mobin.seven
Karl Karpfen wrote
OK, thanks, this leaded me into the correct direction: Texas Instrumetns
has implemented full poll-functionality but they have set both NO_SYS and
NO_SYS_NO_TIMERS to 1 which disables the timers completely. One of both
seems to be wrong/superfluid for me...
I think you should ask it on TI forums. this problem is platform dependent.;)
Reply | Threaded
Open this post in threaded view
|

Re: poll-function not called

Sergio R. Caprile
In reply to this post by Karl Karpfen
You could try the way we vendor-agnostic use the stack:
Once you set NO_SYS_NO_TIMERS = 0, add a call to sys_check_timeouts() in
your main loop. This is the 1.4 way of checking all the timers,
including DHCP. This should take care of TCP and so calling your poll
function callback for your application.

If that doesn't help, then you should ask in the TI forum as mobin.seven
said. Anyway, keep us posted so the next victim can find it in the list,
and/or the FAQ keeps growing.



_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: poll-function not called

goldsimon@gmx.de
Sergio R. Caprile wrote:
> You could try the way we vendor-agnostic use the stack:
> Once you set NO_SYS_NO_TIMERS = 0, add a call to sys_check_timeouts() in
> your main loop. This is the 1.4 way of checking all the timers,
> including DHCP. This should take care of TCP and so calling your poll
> function callback for your application.

Wasn't that Karl where everything runs in interrupt context? If so, calling sys_check_timeouts() from the main loop while everything else in lwIP runs in interrupt context will surely lead to problems.


Simon

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: poll-function not called

Sergio R. Caprile
In reply to this post by Sergio R. Caprile
Yes Simon, it was Karl.
Maybe that is the reason why TI disabled the timers... I would have
expected that from a teenager, not from TI... anyway, Karl said he was
buffering at interrupts and calling lwIP at main loop (or so I understood).
So... Karl: you must call sys_check_timeouts() from the same scope you
are calling all other lwIP routines... or ask TI where to, if
possible... or use a vendor-agnostic port, like mine:
http://scaprile.ldir.com.ar/cms/category/os/lwip-port/

 



_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: poll-function not called

Karl Karpfen
Just to complete this discussion: TI's support for their products is really very, very poor. There is simply no answer to my question why they have disabled it although the poll-callbacks are still there (not the first time that there is no response to users requests also in case of definitive bugs). So I'll try to do some hacks for my own according to your hints.


_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users