-
Notifications
You must be signed in to change notification settings - Fork 11
Can't get library really working #6
Comments
This is the purpose of the 1-2 months old patches in the core. With your patch you call it more often (2*timeout_ms) times instead of once. Can you check the old fashion, with Thanks for debugging this ! |
Sorry I was not talking about the same delay() but they are very similar (in the same file, the other Your fix is good and I think also is worth being applied to the other function. To make it not a test, just add a test on
Similarly on the other
It those changes work for you, would you propose a PR on the arduino core with them and a link to this issue ? |
I've looked dipper to Arduino core code and it looks like it's better to refactor delay(). Main idea is to call esp_yield() periodically during delay not only once. I'll try to create PR after comprehensive testing. Nevertheless above mentioned for (decltype(_timeout_ms) i = 0; _connect_pending && i < _timeout_ms; i++) {
// let a chance to recurrent scheduled functions (ethernet)
delay(1);
} modifications are also required. I'll create separate PR for them too. |
Just built rather complex project (client/server both) with ethernet (WiFi off) -- it's working. No issue except connect delay and wdt reset on first start (coldstart?). |
This wdreset should be identified.
As you probably saw it, it's rather simple and only connecting lwIP with a new link layer. What's left is
And afterward
|
Steps to reproduce WDT reset:
Hope to have some spare time to play with W5500 interrupt usage next days. But i'm not sure it can be really helpful. |
David, |
I will try to reproduce ASAP (currently finishing to update recurrent scheduled functions in the arduno core).
Yes because minimum timing resolution is 1ms and I don't know whether performances need lower value yet.
Once it works reliably in CONT stack (= not in ISR) we can try to make it work from interrupts (timer or external int) without recurrent/scheduled functions (= in ISR). |
Probably i missing something but was able to get code below running only by patching esp8266\libraries\ESP8266WiFi\src\include\ClientContext.h (i know, delay doesn't implement early exit but it's just test)
That case connect() is success. Don't perform more detailed checks.
So it looks like that's enough to make run_scheduled_functions() called from yield()/delay() is that possible?
The text was updated successfully, but these errors were encountered: