espruino bug on setWatch, digital pin.

Posted on
  • HI,

    Just found that a pushbutton on my dev board failed and I had to touch with a tweezer on its terminals to get my code to run.

    setWatch(function(e) {
      print('Touched!');
    }, D34, {repeat:true, edge:"falling", debounce:20});
    

    And it very often gives me:

    Guru Meditation Error of type LoadProhibited occurred on core 0.
    Exception was unhandled. Register dump: PC : 0x40084912 PS
    : 0x00060e33 A0 : 0x80088557 A1 : 0x3ffd7a10 A2 :
    0x00000450 A3 : 0x00000000 A4 : 0xe3996419 A5 :
    0x00000030 A6 : 0x3ffb2998 A7 : 0x3ffd4cd0 A8 :
    0xe3996419 A9 : 0x44041563 A10 : 0x3ffb0b04 A11 :
    0x00060e20 A12 : 0x0000001a A13 : 0x4013e3bb A14 :
    0x3f419544 A15 : 0x00000000 SAR : 0x00000019 EXCCAUSE:
    0x0000001c EXCVADDR: 0xe399641d LBEG : 0x4000c2e0 LEND :
    0x4000c2f6 LCOUNT : 0xffffffff Backtrace: 0x40084912:0x3ffd7a10
    0x40088554:0x3ffd7a30 0x40088595:0x3ffd7a50 0x40082ae1:0x3ffd7a70
    0x4000bef5:0x3ffd7a90 0x40142760:0x3ffd7ab0 0x40141fd8:0x3ffd7ae0
    0x4013e3bb:0x3ffd7b40

  • Which version firmware are you using?

  • It is the espruino_1v96.21_esp32.bin.

    A bit more info on that... Just inject noise on D34.

    /mnt/c/Users/rhys/esp32/edge/EspruinoBuildTools/esp32/build/esp-idf/components/freertos/./queue.c:1613 (xQueueReceiveFromISR)- assert failed!
    Guru Meditation Error of type StoreProhibited occurred on core 0. Exception was unhandled.
    Register dump:
    PC : 0x4000c2e4 PS : 0x00060733 A0 : 0x80084e22 A1 : 0x3ffaeab0
    A2 : 0x00000000 A3 : 0x3ffaec70 A4 : 0x40086b8c A5 : 0x00000000
    A6 : 0x00000000 A7 : 0x3ffaecd4 A8 : 0x00000000 A9 : 0x3ffaea10
    A10 : 0x0000000a A11 : 0x00000000 A12 : 0x00000000 A13 : 0x00001000
    A14 : 0x3ffaea03 A15 : 0x3ffaec70 SAR : 0x00000004 EXCCAUSE: 0x0000001d
    EXCVADDR: 0x00000000 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0x040086b7
    Backtrace: 0x4000c2e4:0x3ffaeab0 0x40084e1f:0x3ffaeac0 0x40085449:0x3ffaeae0 0x4008283d:0x3ffaeb00 0x4008293d:0x3ffaeb30 0x400d3352:0x3ffaeb50 0x40082a18:0x3ffaeb70 0x40114b15:0x3ffaeb90 0x40082d08:0x3ffaebb0 0x40082be4:0x3ffaebe0 0x40082ce2:0x3ffaec00

    var ssid = 'xxxx';
    var password = 'xxxxxx';
    var wifi = require('Wifi');
    wifi.connect(ssid, {password: password}, function() {
      console.log('Connected to Wifi.  IP address is:', wifi.getIP().ip);
      wifi.save();
    });
    
    pinMode(D34,"input_pullup");
    pinMode(D39,"input_pullup");
    pinMode(D32,"output");
    pinMode(D33,"output");
    pinMode(D12,"input_pulldown");
    
    var times = {
    volp:[ 4.4,4.2,.64,1.6,.64,1.6,.69,1.6,.67,.45,.68,.44,.64,.43,.64,.44,.67,.45,.67,1.6,.64,1.6,.64,1.6,.67,.45,.64,.45,.67,.45,.67,.44,.67,.45,.69,1.54,.68,1.56,.64,.44,.64,1.56,.67,.46,.67,.45,.68,.44,.64,.44,.67,.45,.66,.46,.66,1.57,.64,.44,.68,1.56,.64,1.56,.67,1.57,.64,1.56,.64,46.74,4.6,4.42,.64,1.56,.69,1.56,.67,1.56,.69,.43,.69,.43,.64,.45,.68,.44,.68,.43,.69,1.55,.64,1.56,.64,1.57,.68,.45,.67,.42,.71,.42,.69,.43,.68,.45,.67,1.56,.64,1.56,.68,.44,.64,1.56,.69,.43,.64,.44,.64,.43,.69,.43,.64,.44,.67,.45,.67,1.6,.64,.44,.67,1.57,.67,1.6,.68,1.6,.64,1.6,.64],
    volm:[ 4.4,4.2,.64,1.6,.64,1.6,.69,1.6,.67,.45,.68,.44,.64,.43,.64,.44,.67,.45,.67,1.6,.64,1.6,.64,1.6,.67,.45,.64,.45,.67,.45,.67,.44,.67,.45,.69,1.54,.68,1.56,.64,.44,.64,1.56,.67,.46,.67,.45,.68,.44,.64,.44,.67,.45,.66,.46,.66,1.57,.64,.44,.68,1.56,.64,1.56,.67,1.57,.64,1.56,.64,46.74,4.6,4.42,.64,1.56,.69,1.56,.67,1.56,.69,.43,.69,.43,.64,.45,.68,.44,.68,.43,.69,1.55,.64,1.56,.64,1.57,.68,.45,.67,.42,.71,.42,.69,.43,.68,.45,.67,1.56,.64,1.56,.68,.44,.64,1.56,.69,.43,.64,.44,.64,.43,.69,.43,.64,.44,.67,.45,.67,1.6,.64,.44,.67,1.57,.67,1.6,.68,1.6,.64,1.6,.64],
    vola:[ 4.4,4.2,.64,1.6,.64,1.6,.69,1.6,.67,.45,.68,.44,.64,.43,.64,.44,.67,.45,.67,1.6,.64,1.6,.64,1.6,.67,.45,.64,.45,.67,.45,.67,.44,.67,.45,.69,1.54,.68,1.56,.64,.44,.64,1.56,.67,.46,.67,.45,.68,.44,.64,.44,.67,.45,.66,.46,.66,1.57,.64,.44,.68,1.56,.64,1.56,.67,1.57,.64,1.56,.64,46.74,4.6,4.42,.64,1.56,.69,1.56,.67,1.56,.69,.43,.69,.43,.64,.45,.68,.44,.68,.43,.69,1.55,.64,1.56,.64,1.57,.68,.45,.67,.42,.71,.42,.69,.43,.68,.45,.67,1.56,.64,1.56,.68,.44,.64,1.56,.69,.43,.64,.44,.64,.43,.69,.43,.64,.44,.67,.45,.67,1.6,.64,.44,.67,1.57,.67,1.6,.68,1.6,.64,1.6,.64],
    volb:[ 4.4,4.2,.64,1.6,.64,1.6,.69,1.6,.67,.45,.68,.44,.64,.43,.64,.44,.67,.45,.67,1.6,.64,1.6,.64,1.6,.67,.45,.64,.45,.67,.45,.67,.44,.67,.45,.69,1.54,.68,1.56,.64,.44,.64,1.56,.67,.46,.67,.45,.68,.44,.64,.44,.67,.45,.66,.46,.66,1.57,.64,.44,.68,1.56,.64,1.56,.67,1.57,.64,1.56,.64,46.74,4.6,4.42,.64,1.56,.69,1.56,.67,1.56,.69,.43,.69,.43,.64,.45,.68,.44,.68,.43,.69,1.55,.64,1.56,.64,1.57,.68,.45,.67,.42,.71,.42,.69,.43,.68,.45,.67,1.56,.64,1.56,.68,.44,.64,1.56,.69,.43,.64,.44,.64,.43,.69,.43,.64,.44,.67,.45,.67,1.6,.64,.44,.67,1.57,.67,1.6,.68,1.6,.64,1.6,.64],
    volc:[ 4.4,4.2,.64,1.6,.64,1.6,.69,1.6,.67,.45,.68,.44,.64,.43,.64,.44,.67,.45,.67,1.6,.64,1.6,.64,1.6,.67,.45,.64,.45,.67,.45,.67,.44,.67,.45,.69,1.54,.68,1.56,.64,.44,.64,1.56,.67,.46,.67,.45,.68,.44,.64,.44,.67,.45,.66,.46,.66,1.57,.64,.44,.68,1.56,.64,1.56,.67,1.57,.64,1.56,.64,46.74,4.6,4.42,.64,1.56,.69,1.56,.67,1.56,.69,.43,.69,.43,.64,.45,.68,.44,.68,.43,.69,1.55,.64,1.56,.64,1.57,.68,.45,.67,.42,.71,.42,.69,.43,.68,.45,.67,1.56,.64,1.56,.68,.44,.64,1.56,.69,.43,.64,.44,.64,.43,.69,.43,.64,.44,.67,.45,.67,1.6,.64,.44,.67,1.57,.67,1.6,.68,1.6,.64,1.6,.64],
    };
    
    function analogPulse(pin, value, time, options) {
      analogWrite(pin, value, options );
      setTimeout(function() { digitalWrite(pin, 0); try { options["func"](); } catch(e){ } }, time);
    }
    
    setWatch(function(e) {
      print('Enviando código');
      analogPulse(D13,0.9,100,{freq:38000});
      digitalPulse(D16, 0, times.volp);
    }, D34, {repeat:true, edge:"falling", debounce:100});
    
  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

espruino bug on setWatch, digital pin.

Posted by Avatar for barbiani @barbiani

Actions