Problem with VidorDrawLogo

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.

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.

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'm experiencing exactly the same issue.

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

See this thread:
SAM-BA operation failed - MKRVIDOR4000 - Arduino Forum

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

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.

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: [Solved] FPGA boot loader recovery - MKRVIDOR4000 - Arduino Forum

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: [Solved] FPGA boot loader recovery - MKRVIDOR4000 - Arduino Forum

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.

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);
}

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);
}

I was indeed using the serial monitor...

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?

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?

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..."
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.

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.

app.zip (396 KB)

DarioPennisi:
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 ...

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.

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?

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?

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.

Hi Frederick,
if you reload the bootloader using the instructions here ([Solved] FPGA boot loader recovery - MKRVIDOR4000 - Arduino Forum) do you see a green spot on the top left side?
thanks,

Dario

DarioPennisi:
Hi Frederick,
if you reload the bootloader using the instructions here ([Solved] FPGA boot loader recovery - MKRVIDOR4000 - Arduino Forum) do you see a green spot on the top left side?
thanks,

Dario

I had done the 'recovery' before carrying out all the tests I mentioned above. And actually I can see a green square in the upper-right corner of my screen instead of upper-left.

Same results also from me.
With the new app nothing has changed compared to the old one.
Nothing has changed since the FPGA Recovery.

I confirm that the green rectangle is at the top right.

Hi Everyone,

There was some issues with the bitstream provided in the original VidorGraphics library. We've pushed an updated version to Github: GitHub - vidor-libraries/VidorGraphics: VidorGraphics "fat" library repository - for issues/PR refer to

Please re-download the library and add to your sketchbook to get the fixes.

sandeepmistry:
Hi Everyone,

There was some issues with the bitstream provided in the original VidorGraphics library. We've pushed an updated version to Github: GitHub - vidor-libraries/VidorGraphics: VidorGraphics "fat" library repository - for issues/PR refer to

Please re-download the library and add to your sketchbook to get the fixes.

Sorry but as reported by a2retro, the updated library still gave me the same results.

I confirm: no change after updating the library.