• I run a example in STM32F4DISCOVERY board.
    I copied the example code like this:

    let WIZnet = require("WIZnet");
    
    
    E.on('init', function () {
      SPI2.setup({ mosi:B15, miso:B14, sck:B13 });
      let eth = WIZnet.connect(SPI2, B10);
      eth.setIP();
    });
    save();
    

    But is's not okay.

    Prompt not detected - upload failed. Trying to recover...Execution Interrupted during event processing.

    I do have the library WIZnet in board.
    I want to konw how connect to Internet stably by Ethernet cable?

    ===================================
    Then I changed the code like this:

    let WIZnet = require("WIZnet");
    
    setTimeout(()=>{
      SPI2.setup({ mosi:B15, miso:B14, sck:B13 });
      let eth = WIZnet.connect(SPI2, B10);
      eth.setIP();
    },2000)
    
    E.on('init', function () {
    
    });
    save();
    

    that's okay. But the new question is, If i closed the power of the board and then reopened it, It couldn't access to network, I couldn't ping the static ip of the board.

    It seems that I have to run code after I access the board by IDE!

    I wonder when and where I access to network is better.

  • try not adding save() to the end of what you upload, then do it manually.

    If you do that the following should work fine, and is the best way of working:

    let WIZnet = require("WIZnet");
    E.on('init', function () {
      SPI2.setup({ mosi:B15, miso:B14, sck:B13 });
      let eth = WIZnet.connect(SPI2, B10);
      eth.setIP();
    });
    
  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Prompt not detected - upload failed. Trying to recover...

Posted by Avatar for user109783 @user109783

Actions