Timer callback

mariuszb
Posts: 12
Joined: Tue Jun 16, 2015 2:51 pm

Timer callback

Postby mariuszb » Wed Sep 02, 2015 5:04 pm

Hi,

Can you explain this in more detail ??
Last SDK info:
"Please do not call "os_delay_us" or "while" or "for" to occupy CPU more than 10 ms in timer callback."


Does it mean:
1. That the whole function can not be longer than 10 milliseconds?
2. while (counter--); this is wrong (I suppose that the function is uninterruptible) ?
...........and while (counter--) { func, (plece for interupt??) func etc} is also wrong ???

Most of the examples on the Web, eg. sample DS1820 uses the delay (even to 1 second ) , all in timer callback.
I noticed that it has a tremendous impact on the sending TCP (err -8 abort)

User avatar
kolban
Posts: 131
Joined: Tue Jun 16, 2015 1:09 pm
Location: Fort Worth, Texas, USA

Re: Timer callback

Postby kolban » Sat Sep 05, 2015 11:40 pm

I would suggest posting this in the SDK section as you are looking for an explanation of function and not reporting a bug or change request.

Neil

eriksl
Posts: 159
Joined: Fri May 22, 2015 6:22 pm

Re: Timer callback

Postby eriksl » Sun Sep 13, 2015 6:05 pm

Anyway this has nothing to with timer callback, in the end.

Your code should never run more than a few milliseconds before returning to the SDK code, anyway, regardless. It's not specific for timers.

ESP_Faye
Posts: 1646
Joined: Mon Oct 27, 2014 11:08 am

Re: Timer callback

Postby ESP_Faye » Fri Sep 18, 2015 10:47 am

Hi,

Yes, it should not take longer than 10 ms..

Who is online

Users browsing this forum: No registered users and 2 guests