GithubHelp home page GithubHelp logo

Comments (2)

ivmarkov avatar ivmarkov commented on June 18, 2024

After browsing the ESP-IDF documentation myself, I'm not really sure that this is a bug :) . A few notes:

  • How do you know that it does not yield? The fact that you get the WDT triggered is not an indication that it does not yield, because the default WDT is watching the idle tasks, not your main task, nor the extra task you spawn here as a separate thread
  • ESP-IDF uses pre-emptive execution. Meaning, if a higher priority task is ready, the lower priority task will be preempted.
  • Idle tasks on ESP-IDF run with priority 0, the main task (and I suspect - also the extra one you create) runs with priority 1 (check table "List of Tasks Created During Startup" here) so what most likely happens is that the thread does yield, maybe even the idle task for that core is scheduled, but then it gets almost immediately preempted by the main task or the thread task you are spawning, and as a result the watchdog does trigger. This also explains why it does work with a higher sleep delay in #66

Last but not least, the fact that you can reproduce all of these with plain vTaskDelay() calls as well means that the problem is not really in Rust STD, but is a basic behavior of ESP-IDF itself. And as per above, I doubt that this behavior is a bug.

from esp-idf-sys.

andresv avatar andresv commented on June 18, 2024

Excellent point. I will close it.

from esp-idf-sys.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.