lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Sys_Timeout(); Calling Handler Immediately?


From: Ishmeet
Subject: Re: [lwip-users] Sys_Timeout(); Calling Handler Immediately?
Date: Sat, 19 Oct 2013 21:49:30 -0700 (PDT)

Thanks for the reply chrysn, 

I am using No OS, I have inserted LwIP code into stm32L using IAR compiler, my sys_now() is working fine as I am using Hardware Timer(Systick timer) and it is producing proper milliseconds.

The problem--> sys_timeout() was calling handler function immediately. Is fixed now. 

I have now fixed the problem using sys_restart_timeouts() before sys_timeout(), sys_restart_timeouts() sets back the timestamp of the last call to sys_check_timeouts(). Thus after 1000 milliseconds, I get called the handler function (Just what I needed). 

I am using this timeout in getting Request Timeout prints in ping.c.

On 20-Oct-2013 9:24 AM, "chrysn [via lwIP]" <[hidden email]> wrote:
On Wed, Oct 09, 2013 at 11:41:50PM -0700, Ishmeet wrote:
> I am using LwIP 1.4.1, the problem is I have to use sys_timeouts(), for "Ping
> Request Timed out" prints inside ping.c. When I send ping requests using
> ping_send_now(). I call sys_timeout(1000, ping_timeout, ping_pcb); along
> with it. The problem is ping_timeout handler calls immediately after calling
> sys_timeout, rather it should call after 1000 msec as described.

what are you using to handle timeouts? do you use an operating system
(which?) or are you in NO_SYS=1 mode? if NO_SYS=1, is your sys_now()
function reliably producing milliseconds?

best regards
chrysn

--
To use raw power is to make yourself infinitely vulnerable to greater powers.
  -- Bene Gesserit axiom

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

signature.asc (853 bytes) Download Attachment



If you reply to this email, your message will be added to the discussion below:
http://lwip.100.n7.nabble.com/Sys-Timeout-Calling-Handler-Immediately-tp21956p21967.html
To unsubscribe from Sys_Timeout(); Calling Handler Immediately?, click here.
NAML


View this message in context: Re: Sys_Timeout(); Calling Handler Immediately?
Sent from the lwip-users mailing list archive at Nabble.com.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]