Giter VIP home page Giter VIP logo

Comments (3)

caspermeijn avatar caspermeijn commented on August 17, 2024

You are right, only the SANITY_INTERVAL is needed to make the application work properly. However I liked the fact that the application tries to configure the watchdog the same as the bootloader. This way you have the same watchdog behaviour when running without bootloader, which could ease problem searching.
And there is no harm is setting WATCHDOG_INTERVAL, so why not?
Maybe the bootloader could even use the value from WATCHDOG_INTERVAL.

from pinetime-rust-mynewt.

caspermeijn avatar caspermeijn commented on August 17, 2024

I found this: https://github.com/JuulLabs-OSS/mcuboot/blob/10c97baa77d8b6b75b0411d2c55c497c43af0f0f/boot/mynewt/src/main.c#L221

MCUBoot will automatically init the watchdog when WATCHDOG_INTERVAL is set. So you either need to set WATCHDOG_INTERVAL or

, but not both.

So I think it would make sense to switch over to using WATCHDOG_INTERVAL and removing the setup_watchdog() function.

from pinetime-rust-mynewt.

lupyuen avatar lupyuen commented on August 17, 2024

pinetime-rust-mynewt has been revamped as educational firmware (so it's not meant for daily use). The following config should be sufficient for educational purposes:

https://github.com/lupyuen/pinetime-rust-mynewt/blob/master/apps/my_sensor_app/syscfg.yml

syscfg.vals:

    ###########################################################################
    # Watchdog Settings

    # The default PineTime bootloader will setup a 7 second watchdog
    SANITY_INTERVAL:      5000  #  Tickle the watchdog every 5 seconds, that the watchdog won't trigger a reboot
    # WATCHDOG_INTERVAL:  7000  #  If watchdog is not set, set it to 7 seconds

Also refer to this note...

https://lupyuen.github.io/pinetime-rust-mynewt/articles/mcuboot#bootloader-watchdog

from pinetime-rust-mynewt.

Related Issues (15)

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.