This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

lwIP: timers disabled

Genius 5820 points

Hi,

while checking the lwIP examples that come for BeagleBone I found the timers are disabled by define

#define NO_SYS_NO_TIMERS 1

This makes all calls tcp_poll() and related callback functions useless since the poll-functions are never called due to the absence of these timers. So...what is the intended purposes of these examples? To have no timers (which means all poll-functions can be removed) or to use the poll-functions (which means above definition has to be changed)?

Thanks!

  • Since this is the implementation from TI I cannot ask this in lwIP mailing list. So: anybody from TI an idea why timers are disabled/why poll-function is used?

  • So nobody from TI has an idea why these timers are disabled and the poll-function is set but therefore never used?

  • qxc,

    In the example use case LWIP_TIMERS is not used. Hence it is disabled. The LwIP stack code is not modified as this configuration is provided.

    Regards,

    Ramesh D

  • OK, but why is it disabled?

    Or to ask this in a different way: since poll-function is not available and since all receive- and send-functions are running in interrupt-context, how should one send some data out of normal (main-loop) context?

    lwIP is not thread-/IRQ-safe, means when RX and TX functions are running in interrupt-context, poll-function is mandatory to send such data asynchronously. This problem does not appear in StarterWare examples since sending is done out of receive-function only, but it appears in real-world-code.

  • Ramesh Dandamudi said:
    In the example use case LWIP_TIMERS is not used. Hence it is disabled.

    OK, but why is it disabled?

    Or to ask this in a different way: since poll-function is not available and since all receive- and send-functions are running in interrupt-context, how should one send some data out of normal (main-loop) context?

    lwIP is not thread-/IRQ-safe, means when RX and TX functions are running in interrupt-context, poll-function is mandatory to send such data asynchronously. This problem does not appear in StarterWare examples since sending is done out of receive-function only, but it appears in real-world-code.

  • qxc,

    The requirement in that scenario is very much specific to the use case. Handling such scenarios is too much for StarterWare use case. But we shall take this as feedback and try to enhance for such scenario.

    Regards,

    Ramesh D