No such memory, or...?

Posted on
  • on my f3discovery i write:

    function delays(s){var n=1000; while(n--){}}
    
    spi = new SPI();
    
    spi.setup({sck:A5, miso:A6, mosi:A7});
    var nrf = require("NRF24L01P").connect( spi, B0, B1 );
    function onInit() {
      nrf.init([0,0,0,0,2], [0,0,0,0,1]);
    }
    
    onInit();
    
    setInterval(function() {
      nrf.masterHandler();
    }, 50);
    function g1on(){digitalWrite(B9,1);}
    function g1of(){digitalWrite(B9,0);}
    
    //function a1on(){digitalWrite(B8,1);}
    

    it works ok, but if I try to add the last (commented) line it doesnt work -
    download process doesn't finish properly. - no "=undefined" string.
    process.memory() shows nothing criminal -

    >process.memory()
    ={"free":1306,"usage":414,"total":1720,"­history":249,"stackEndAddress":536906916­,"flash_start":134217728,"flash_binary_e­nd":134371320,"flash_code_start":1344450­56,"flash_length":262144}
    
    

    what can be? thanks!

  • What do you mean by doesn't finish properly? What happens when you type a1on()?

    Also, if you type dump(), what gets shown? Is the function listed?

  • I cant type It. it doesn't allow type anyth.
    But I fixed it already by setting .js|.min.js in minification setup.
    dump() lists the functions - it's ok there.
    Ough! Update -
    It helped only for 3 added functions. And appeared again when i try to add more than 3.

  • Under IDE settings, under communication, enable throttling - I see this sort of behavior fairly often on the official board if I don't enable throttling.

  • Shame... I thought the lost character issues were mostly fixed on newer firmware versions.

    To get control back, you can usually do Ctrl + C then echo(1); then enter.

  • thanks, CTRL-C + echo(1) returns control, but program doesn't work.
    But everything is ok after moving the reqired module code to the right pane.

  • The lost character issue has gotten better, but I've found that often the code reaches a point where it starts intermittently losing characters.

  • Could you e-mail me something that exhibits the problem? It'd be goog to look into it and see if there was anything I could do...

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

No such memory, or...?

Posted by Avatar for Andrey @Andrey

Actions