Go Down

Topic: Problem with VidorDrawLogo (Read 1 time) previous topic - next topic

philippe_at_sysemb

Hi all,

I can not make "VidorDrawLogo" work.
I had problems with uploading stucks at 37%, but when I unplug the device, make a double reset, and try again to upload it works.

My problem now, is that nothing is displayed (no signal) on HDMI monitor (in bootloader mode, I am able to see the logo).

FPGA.begin() return without error in 2 seconds.

Each following commands return in 5 seconds (I suspect a timeout)
except for setcursor/alpha/size/.. which return immediatly.

And of course duration of " vdgfx.println("ARDUINO");" is 35 seconds (7 chars multiply by 5 seconds).

I use :
- Arduino IDE
- Arduino SAMD beta boards version 1.6.22
- lastest VidorGraphics library


Thanks.

AustinClark

#1
Jul 30, 2018, 06:49 am Last Edit: Jul 30, 2018, 07:10 am by AustinClark
I'm having precisely the same problem.
Seems things aren't quite ready for prime-time yet. It's still very early. Not everything is polished and working well.

ronsoul

There are a few threads on here with the same exact problem.  Im sure they will sort out the issues.

See this thread:
https://forum.arduino.cc/index.php?topic=560394.0

FrederickZh

#3
Aug 01, 2018, 12:58 pm Last Edit: Aug 01, 2018, 04:45 pm by FrederickZh
I'm experiencing exactly the same issue.

There are a few threads on here with the same exact problem.  Im sure they will sort out the issues.

See this thread:
https://forum.arduino.cc/index.php?topic=560394.0
I don't think it's an identical topic though... Their problem tends to be more related to a corrupted bootloader, in which case if you click the reset button twice to enter the bootloader mode, nothing shows up in your screen. And the uploading process constantly fails on their chips.

But in my case the uploading only fails occasionally, and I can see the logo in bootloader mode. As mentioned by OP, just all the operations somehow always time out.

And btw, actually if I add
Code: [Select]
auto version = FPGA.version();
Serial.print("FPGA version: ");
Serial.println(version);
if (!FPGA.ready()) {
  Serial.println("Initialization failed!");
  while (1) {}
}

... into setup(), it'll just print out "FPGA version: 4294967295", "Initialization failed!" and stop here.

sandeepmistry

Hi Everyone,

We've prepared some manual steps to repair the FPGA's bootloader for those of you facing sketch upload issues. You can find them in the following forum post: http://forum.arduino.cc/index.php?topic=561393.0

FrederickZh

Hi Everyone,

We've prepared some manual steps to repair the FPGA's bootloader for those of you facing sketch upload issues. You can find them in the following forum post: http://forum.arduino.cc/index.php?topic=561393.0
Although, as I mentioned, it doesn't seem to be the same issue, I still followed the instructions to 'repair' the bootloader and sadly it just didn't help. I still can only see the bootloader logo.

DarioPennisi

Hi,
if you run VidorDrawLogo example and are stuck with the original logo likely the issue is that you didn't connect to the USB serial with the monitor.
the issue is that the Serial object being declared in the setup() function is the USB virtual serial port, so the sketch will remain stuck there until you connect with a terminal.
in particular the setup function looks like:

void setup() {
  Serial.begin(115200);
  while (!Serial){}

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

  delay(4000);
}

so the while !(Serial){} is basically locking everything out until you connect through USB terminal.
if you comment all references to Serial the sketch will run immediately. if you don't want to connect through USB virtual com port please modify that as follows:

void setup() {
//  Serial.begin(115200);
//  while (!Serial){}

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

  delay(4000);
}

FrederickZh

Hi,
if you run VidorDrawLogo example and are stuck with the original logo likely the issue is that you didn't connect to the USB serial with the monitor.
the issue is that the Serial object being declared in the setup() function is the USB virtual serial port, so the sketch will remain stuck there until you connect with a terminal.
in particular the setup function looks like:

void setup() {
  Serial.begin(115200);
  while (!Serial){}

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

  delay(4000);
}

so the while !(Serial){} is basically locking everything out until you connect through USB terminal.
if you comment all references to Serial the sketch will run immediately. if you don't want to connect through USB virtual com port please modify that as follows:

void setup() {
//  Serial.begin(115200);
//  while (!Serial){}

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

  delay(4000);
}

I was indeed using the serial monitor...

DarioPennisi

so... you download the sketch, you open the serial monitor and don't see anything, not even the initialization failed error message?
what if you add a print if the initialization is ok? do you see it?

how are you powering the board?

FrederickZh

#9
Aug 07, 2018, 10:24 am Last Edit: Aug 07, 2018, 10:48 am by FrederickZh
so... you download the sketch, you open the serial monitor and don't see anything, not even the initialization failed error message?
what if you add a print if the initialization is ok? do you see it?

how are you powering the board?
I did see the output but not the failure message... Could you please go through my comment first? I understand you must be quite busy right now, but please...

Anyway... what I did:

1. Original VidorDrawLogo sketch + Serial Monitor + USB 3.0 power = Bootloader logo only
2. Original sketch with only Serial-related codes removed + 5V 1A phone charger = Bootloader logo only
3. Following modified setup() + Serial Monitor + USB 3.0 power = endless loop in "Waiting for FPGA..."
Code: [Select]
void setup() {
  Serial.begin(115200);
  while (!Serial) {}

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

  Serial.println("Waiting for FPGA...");
  for (int i = 0; !FPGA.ready(); ++i) {
    Serial.println(i);
    delay(1000);
  }

  auto version = FPGA.version();
  Serial.print("FPGA version: ");
  Serial.println(version);

  delay(1000);
}


I've also got an official Raspberry Pi 5.1V 2.5A charger... haven't tried it out yet cos I read Vidor 4000 allows only 5V input somewhere... If you give me the green light I can also give it a shot.

DarioPennisi

#10
Aug 07, 2018, 12:22 pm Last Edit: Aug 07, 2018, 12:24 pm by DarioPennisi Reason: modified attachment
Hi Frederick,
i probably went through your first comment but forgot that when i wrote. sorry but there alre lots of things going on and as you can see i don't always keep track of everything.
5.1V is fine but i don't think this is the issue as a USB3 port should be just fine.
i just tested the exact same sketch on a couple of boards i have here and it works so there must be some issue somewhere.
there are two possibilities... one is that there is a problem with flash initialization and the other is that there is an issue with SAM bootloader.
i don't have the possibility to immediately push an update to VidorGraphics but i would ask you to try replacing the app.ttf file under VidorGraphics library with the one attached here (after unzipping it of course) and let me know if this makes any difference.
if it doesn't then there still is some possibility there is an issue with some flash related code but while we create another version of the ttf you may want to try (if you have AT-SAM ICE) to reload the SAM bootloader via Arduino IDE as i am getting the sensation some boards may have been shipped with an old version of the bootloader that is causing some trouble. to reload bootloader you would have to select tools->burn bootloader after you selected Atmel-SAM ICE under programmer (under tools) and connect that through the 6 pads on the bottom of the board. i usually do that witout soldering the connector... just fit some strips in the female header of the programmer and make contact... burning bootloader is very fast...
if you are not able to do the above i should be able to post another bitstream to test later today.

FrederickZh

#11
Aug 07, 2018, 12:37 pm Last Edit: Aug 07, 2018, 12:41 pm by FrederickZh
i don't have the possibility to immediately push an update to VidorGraphics but i would ask you to try replacing the app.ttf file under VidorGraphics library with the one attached here (after unzipping it of course) and let me know if this makes any difference.
I replaced my ~/Arduino/libraries/VidorGraphics-master/src/app.ttf with the new one and it resulted in ...
Code: [Select]
Verify 680460 bytes of flash with checksum.
Verify failed
An error occurred while uploading the sketch

May I know how to fix it?

And sorry I don't have the programmer.

DarioPennisi

Hi Frederick,
verification failure is not a problem. this is because the header information in VidorGraphics.cpp is not updated for this bitstream however it should run anyway.
once loaded what happens if you just reset the board and open the terminal?

FrederickZh

Hi Frederick,
verification failure is not a problem. this is because the header information in VidorGraphics.cpp is not updated for this bitstream however it should run anyway.
once loaded what happens if you just reset the board and open the terminal?
Nothing changes with the new app.ttf and FPGA.version() is still FFFFFFFF... I removed the code I added so it didn't block in setup() but still what all I could see was the bootloader logo.

DarioPennisi

Hi Frederick,
if you reload the bootloader using the instructions here (https://forum.arduino.cc/index.php?topic=561393.0) do you see a green spot on the top left side?
thanks,

Dario

Go Up