Go Down

Topic: [Solved] FPGA boot loader recovery (Read 6456 times) previous topic - next topic

DarioPennisi

Hi,
One thing most people don't notice is that some sketches such as Vidor draw logo wait for serial terminal to be open before doing anything, including initializing FPGA (there's a while loop waiting for serial to be opened). Also, we saw that some PCs tend to not be able to put the board in bootloader mode and this is something we are investigating. Please try uploading the board by manually entering bootloader by doubletapping the button. That should work.


jwestmoreland

including initializing FPGA (there's a while loop waiting for serial to be opened). Also, we saw that some PCs tend to not be able to put the board in bootloader mode and this is something we are investigating. Please try uploading the board by manually entering bootloader by doubletapping the button. That should work.


Dario,

Any news on the bootloader issue and the wait on serial port open issue?

Thanks,
John W.

Limba

Any news on the bootloader issue and the wait on serial port open issue?

I think these were already fixed. I had serious problems with bootloader that come with vidor. After updating my bootloader my problems solved.

Also for vidor for waiting serial port to open is few lines in examples (draw logo). Just comment all lines that have "Serial" in it. Recommend to set IO pin for FPGA.begin failing indicator.
Code: [Select]
void setup() {
  Serial.begin(9600);

  // wait for the serial monitor to open,
  // if you are powering the board from a USB charger remove the next line
  while (!Serial);

  // Initialize the FPGA
  if (!FPGA.begin()) {
    Serial.println("Initialization failed!");
    while (1) {}
  }

  delay(4000);
}

jwestmoreland

#33
Mar 16, 2019, 09:52 pm Last Edit: Mar 16, 2019, 09:59 pm by jwestmoreland
Limba,

I think the way to handle this has been suggested - I just hadn't seen it yet - I've coded up something like this so if the serial port is connected it can still be used:

#define SERIAL_COUNTER_TIME_OUT 5000    // so serial port doesn't hang the board

in setup():

unsigned int counter_main = 0;

 Serial.begin(115200);

  // in case serial port isn't connected:
 do {
      counter_main++;
       
 } while ( !Serial && ( counter_main < SERIAL_COUNTER_TIME_OUT) );

Maybe not the most efficient code but works for me.

Regards,
John W.

Go Up