Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: Teensy 4.1 & Teensy 4.0 : Different Behavior with the Watchdog library

  1. #1
    Senior Member
    Join Date
    Jun 2017
    Posts
    102

    Teensy 4.1 & Teensy 4.0 : Different Behavior with the Watchdog library

    I am running the same code on a Teensy 4.0 and a Teensy 4.1. The timings on the Teensy 4.0 are below and they work flawlessly.

    Code:
      //-----------------------------------------------------------------------------
      WDT_timings_t config;
      config.trigger = 5; /* in seconds, 0->128 */
      config.timeout = 10; /* in seconds, 0->128 */
      config.callback = myCallback;
      wdt.begin(config);
      //-----------------------------------------------------------------------------
    However, on the Teensy 4.1, the board kept resetting. This problem was fixed using the settings below:

    Code:
      //-----------------------------------------------------------------------------
      WDT_timings_t config;
      config.trigger = 10; /* in seconds, 0->128 */
      config.timeout = 20; /* in seconds, 0->128 */
      config.callback = myCallback;
      wdt.begin(config);
      //-----------------------------------------------------------------------------
    Why would these settings need to be different?

    Watchdog processes are very complicated to me so I do not understand why the same exact code would require different settings?

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    13,454
    Quote Originally Posted by jimmie View Post
    I am running the same code on a Teensy 4.0 and a Teensy 4.1. The timings on the Teensy 4.0 are below and they work flawlessly.

    ...
    Why would these settings need to be different?

    Watchdog processes are very complicated to me so I do not understand why the same exact code would require different settings?
    Not sure where WDT_timings_t comde from - not a library included in TeensyDuino?

    More info needed on libraries and code in use - and version of TeensyDuino ...more complete code so a viewer could run it and observe?

  3. #3
    Senior Member
    Join Date
    Jun 2017
    Posts
    102
    Thank you defragster.

    I am using Teensyduino 1.53 with this library:

    https://github.com/tonton81/WDT_T4

    I am happy to try any other library but the one above seems to work well.

  4. #4
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,599
    odd.... it is the identical chip in both

    are you sure theres no extra code blocking thats making the time expire sooner before feeding? (maybe something is taking a long time to initialize?)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •