• I did a check executing a same program from ( downloading from the Web IDE ) or from FLASH using the USB console.
    I obtained that the version executed after downloading from Flash onInit() runs twice as much as it would.
    I set a led flashing at 1 Hz.
    It flashed at 1 Hz when executing after a reset() and at 2Hz when executing after onInit()

    function SD_flash(op) {
       if ( op == "start") {
         if ( SD_TIM === undefined ) {
           console.log("SD_TIM");
           SD_TIM = setInterval(function() {
              sd_on = !sd_on; if (sd_on) { STOP.set(); } else {STOP.reset();}}, 1000);
         }
       }
       if ( op == "stop") {
         if (SD_TIM !== undefined) { clearInterval(SD_TIM); SD_TIM=undefined; setTimeout(function(){STOP.reset();},1000); }
       }
    }
    

    The same happens for characters received fron an external part and sampled every 100 ms in a state machine loop.
    IS there a reason for this behaviour ?

    Thanks in advance for the reply.

    Please find attached below the profiling.

    reset();
    =undefined
     _____                 _
    |   __|___ ___ ___ _ _|_|___ ___
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
              |_| http://espruino.com
     1v63 Copyright 2014 G.Williams
    >echo(0);
    =undefined
    ERROR: Unable to mount SD card : NOT_READY
    SD_TIM
    UART5: ARF54 Command mode request.
    Received 0
    Elapsed: 200 ms
    STEP 1
    Elapsed: 300 ms
    STEP 2
    Elapsed: 700 ms
    Received 0
    Elapsed: 700 ms
    STEP 3
    Elapsed: 800 ms
    Received 0
    Elapsed: 900 ms
    STEP 4
    Elapsed: 1100 ms
    Received 0
    Elapsed: 1200 ms
    STEP 5
    Elapsed: 1300 ms
    Received 0
    Elapsed: 1400 ms
    STEP 6
    Elapsed: 1700 ms
    Received 0
    Elapsed: 1700 ms
    STEP 7
    Elapsed: 1800 ms
    Received 0
    Elapsed: 1900 ms
    STEP 8
    Elapsed: 2000 ms
    Received 0
    Elapsed: 2100 ms
    STEP 9
    Elapsed: 2200 ms
    Received 0
    Elapsed: 2300 ms
    STEP 10
    Elapsed: 2400 ms
    Received 0
    Elapsed: 2700 ms
    END OF SEPRI INIT SEQUENCE.
    Elapsed: 2700 ms
    
    UART5: ARF54 Command mode request.
    Received 0
    Elapsed: 200 ms
    STEP 1
    Elapsed: 300 ms
    STEP 2
    Elapsed: 700 ms
    Received 0
    Elapsed: 800 ms
    STEP 2
    Elapsed: 800 ms
    Received 0
    Elapsed: 900 ms
    STEP 3
    Elapsed: 900 ms
    Received 0
    Elapsed: 1000 ms
    STEP 4
    Elapsed: 1100 ms
    Received 0
    Elapsed: 1200 ms
    STEP 5
    Elapsed: 1300 ms
    Received 0
    Elapsed: 1400 ms
    STEP 6
    Elapsed: 1500 ms
    Received 0
    Elapsed: 1800 ms
    STEP 6
    Elapsed: 1800 ms
    STEP 7
    Elapsed: 1800 ms
    Received 0
    Elapsed: 1800 ms
    STEP 8
    Elapsed: 1900 ms
    Received 0
    Elapsed: 2000 ms
    STEP 9
    Elapsed: 2100 ms
    Received 0
    Elapsed: 2200 ms
    STEP 10
    Elapsed: 2300 ms
    Received 0
    Elapsed: 2400 ms
    END OF SEPRI INIT SEQUENCE.
    Elapsed: 2500 ms
    
    UART5: ARF54 Command mode request.
    Received 0
    Elapsed: 400 ms
    STEP 1
    Elapsed: 2700 ms
    STEP 1
    Elapsed: 3000 ms
    STEP 2
    Elapsed: 3100 ms
    Received 0
    Elapsed: 3200 ms
    STEP 3
    Elapsed: 3300 ms
    Received 0
    Elapsed: 3400 ms
    STEP 4
    Elapsed: 3600 ms
    Received 0
    Elapsed: 3700 ms
    STEP 5
    Elapsed: 4000 ms
    Received 0
    Elapsed: 4100 ms
    STEP 5              RICHIESTA RIPETUTA DA NIC.
    Elapsed: 4100 ms
    Received 0
    Elapsed: 4200 ms
    STEP 6
    Elapsed: 4200 ms
    Received 0
    Elapsed: 4300 ms
    STEP 7
    Elapsed: 4300 ms
    Received 0
    Elapsed: 4400 ms
                      <— SALTATO UNO STEP, ovvero una inizializzazione
    STEP 9
    Elapsed: 4500 ms
    Received 0
    Elapsed: 4600 ms
    STEP 10
    Elapsed: 4700 ms
    Received 0
    Elapsed: 4800 ms
    END OF SEPRI INIT SEQUENCE.
    Elapsed: 5000 ms
    
    
    UART5: ARF54 Command mode request.
    Received 0
    Elapsed: 200 ms
    STEP 1
    Elapsed: 300 ms
    STEP 2
    Elapsed: 500 ms
    Received 0
    Elapsed: 700 ms
    STEP 3
    Elapsed: 800 ms
    STEP 3
    Elapsed: 2100 ms  <— QUI SI INTERROMPE
    
    
    >save()
    =undefined
    Erasing Flash...
    Programming 109000 Bytes..............................................................................................................
    Checking...
    Done!
    Running onInit()...
    ERROR: Unable to mount SD card : NOT_READY
    SD_TIM
    UART5: ARF54 Command mode request.
    Received 0
    Elapsed: 0 ms
    STEP 1
    Elapsed: 0 ms
    STEP 2
    Elapsed: 200 ms
    Received 0
    Elapsed: 200 ms
    STEP 3
    Elapsed: 300 ms
    Received 0
    Elapsed: 300 ms
    STEP 4
    Elapsed: 500 ms
    Received 0
    Elapsed: 500 ms
    STEP 5
    Elapsed: 600 ms
    Received 0
    Elapsed: 600 ms
    STEP 6
    Elapsed: 700 ms
    Received 0
    Elapsed: 700 ms
    STEP 7
    Elapsed: 800 ms
    Received 0
    Elapsed: 1000 ms
    STEP 7
    Elapsed: 1000 ms
    STEP 7
    Elapsed: 1000 ms
    Received 0
    Elapsed: 1000 ms
    STEP 8
    Elapsed: 1000 ms
    Received 0
    Elapsed: 1000 ms
    STEP 9
    Elapsed: 1000 ms
    STEP 10
    Elapsed: 1000 ms
    Received 0
    Elapsed: 1100 ms
    END OF SEPRI INIT SEQUENCE.
    Elapsed: 1200 ms
    
    UART5: ARF54 Command mode request.
    Received 0
    Elapsed: 100 ms
    STEP 1
    Elapsed: 200 ms
    STEP 2
    Elapsed: 300 ms
    Received 0
    Elapsed: 300 ms
    STEP 3
    Elapsed: 400 ms
    Received 0
    Elapsed: 400 ms
    STEP 4
    Elapsed: 700 ms
    Received 0
    Elapsed: 700 ms
    STEP 5
    Elapsed: 700 ms
    Received 0
    Elapsed: 800 ms
    STEP 6
    Elapsed: 900 ms
    Received 0
    Elapsed: 900 ms
    STEP 7
    Elapsed: 1000 ms
    Received 0
    Elapsed: 1000 ms
    STEP 8
    Elapsed: 1100 ms
    Received 0
    Elapsed: 1100 ms
    
  • Hi,

    I'm not entirely sure what the problem is, but you are using quite an outdated firmware (I think it's the one that came with the board) - I'd try upgrading if I were you - just click the yellow warning icon that should have appeared in the top right of the Web IDE.

    There's been one issue in 1v71 (the latest) that I know of that does tend to break the timing for the first second or so after startup (although it should be fine after that). I'm releasing a new version (1v72) in the next few days though (hopefully tomorrow) that has that fixed.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

a different timestamp profile for programs executed from ram or from onint ( flash)

Posted by Avatar for user6350 @user6350

Actions