New interpreter error: FIFO_FULL

Posted on
  • I ran code in STM32F4DISCOVERY board.

    I use Event on for listening the 4G Sim。If the Http Response is a little datas, it work well. But If the Response is relatively much more data, this error will happen.

    In the code, the variable line will receive data as much as the http return.

    How do I avoid this error?

    The main code like this:

    uart.on("data", function cb(d) {
        line += d;
        if (line.startsWith("\r\n")) {
          line = line.substr(2);
        }
        if (line[0] === "\n") {
          line = line.substr(1);
        }
        if (line[0] === "\r") {
          line = line.substr(1);
        }
        if (line[0] === "\u00FF") {
          line = line.replace("\u00FF", "");
        }
        if (line.length > 0) {
          for (let h in lineHandlers)
            if (line.indexOf(h) > -1) {
              line = lineHandlers[h](line.substr(line.indexOf(h)));
            }
        }
        if (handlers) {
          for (let h in handlers) {
            while (line.substr(0, h.length) === h) {
              let resp = handlers[h](line);
              if (resp) {
                line = resp;
              } else {
                line = "";
              }
              return;
            }
          }
        }
    
  • If possible the best way is to use flow control.

    You can either you can use XON/OFF software flow control when setting up the Serial device, or you can do hardware flow control too - you then just need to set the modem up to use it

  • ... either that or use a lower baud rate

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

New interpreter error: FIFO_FULL

Posted by Avatar for user109783 @user109783

Actions