Avatar for Sacha

Sacha

Member since Feb 2014 • Last active Feb 2017
  • 33 conversations
  • 197 comments

Most recent activity

  • in Interfacing
    Avatar for Sacha

    That's cool. Include this in your homeautomation. Google will be listening what you are saying and is able to control your home....

    • 5 comments
    • 261 views
  • in General
    Avatar for Sacha

    @allObjects
    Thanks, i know about onInit. I didn't know that the watchdog function has to be called/restarted after a reset while other internal functions like Intervals/Timers for example not.

  • in General
    Avatar for Sacha

    Dear Gordon
    I've done some tests with the new watchdog function. My testcode is the following (right side):

    doreset=false;
    setInterval(function() { if(doreset===false) { console.log('kick'); E.kickWatchdog(); } },20000);
    E.enableWatchdog(25,false);
    save();

    You will see in the console every 20 seconds 'kick'. E.kickWatchdog is called.
    Then please set the var doreset to true:

    doreset=true;

    After a few seconds the pico will reset. Then please reconnect to the console.
    You will see the output of 'kick' again.

    Please give the variable doreset again the value of true.

    doreset=true;

    On the console 'kick' messages are gone. E.kickWatchdog is not called anymore.

    But the pico does not reset after more that 25 seconds. Please see the attached screenshot.

    Do I understand something wrong ? It only resets once ?

    Thanks

    Sacha

  • in General
    Avatar for Sacha

    Gordon. Please include this command in the reference page of setInterval/Timeout.
    "print(global["\xff"].timers);". This will help others debugging those functions.
    Thanks
    Sacha

  • in General
    Avatar for Sacha

    Many thanks for your help Gordon. I think i found the problem. It was self made. In a special situation i called clearTimeout() with an undefined var. This cleared all intervals.

    Sacha

    • 5 comments
    • 264 views
  • in General
    Avatar for Sacha

    Worked this is the output while setInterval is not anymore called:

    test();
    LSEON 0
    LSERDY 0
    LSION 1
    LSIRDY 2
    LSI

  • in General
    Avatar for Sacha

    I have the problems also when not using setTime..... E.kickWatchdog is realy not ideal.
    Is there a way to debug, display registered or pending setInterval's / setTimeout's ?

  • in General
    Avatar for Sacha

    Gordon
    Tried to run your code by copy it into the left side. Got:

    >test();
    Uncaught ReferenceError: "R" is not defined
     at line 1 col 40
    console.log("LSEON",peek32(RCC.a.BDCR)&R­CC.f.BDCR.LSEON);
                                           ^
    in function "test" called from line 1 col 6
    test();
    
Actions