xem3005- prom config


I’m trying to record my bitfile in a Xem3005 eprom to program and start the fpga without the usb cable.

How do I do that, please? Do I need to switch to “prom config” from “usb config” in my board?




Yes, from the XEM3005 User’s Manual:

— Begin quote from ____

Booting from PROM

In order to boot the XEM3005 from PROM, switch JP2 must be at ?PROM Config?. This allows the PROM to configure the FPGA from power-on. If your FPGA design has MUXSEL=0, the design will still be able to communicate with FrontPanel if it is connected to a PC.

— End quote

Thank you. Flashloader.exe worked.


I’m trying to configure my board to be able to load my FW automatically by PROM (it works fine by USB).
So as the Readme say :

  • i put the JP2 on “PROM Config”
  • i put on a same folder the files : flashloader.exe, okFrontPanel.dll, flashload-xem3005-1200.bit and mybitfile.bit (i rename my bit file like this in order to be sure to not have name problem)
  • i launch the flashloader.exe mybitfile.bit in “Run” command

It looks like working cause LEDs go off (like it’s under configuration). But after, when the FW is loading automatically, it’s still the previous one (manufacturing one i guess).

Please help me cause i cannot found out what’s wrong with this manipulation.
Thank you.

To add new comment on my problem.
This is the message i have by the cmd prompt :
Device firmware version: 3.1
Device serial number: grZIaNTXRm
Device device ID: Opal Kelly XEM3005
XEM found. Using flashload-xem3005-1200.bit
FPGA configuration failed.
FPGA could not be initialized.


Try launching the command from the command-line. First, it means the window won’t disappear as soon as the program exits. Second, it makes sure that your working directory is the same as the application directory. I’m not entirely sure where Windows sets the working directory for the “Run” command unless you specify it somehow.

As you can see in my “UP” message it’s what i tried, and i put the message that i got from it.

I also tried by using the debugger in Visual studio, but i got stuck at this line :
// Download the configuration file.
if [COLOR=“Red”](okCUsbFrontPanel::NoError != xem->ConfigureFPGA(str)) [/COLOR]{
printf(“FPGA configuration failed.\n”);



What is the return code from ConfigureFPGA(…) ?

Keep in mind that, when running from VS, VS typically sets the working directory to the project directory, not the directory where the release binary is.

I suspect you’re still having trouble with a file-not found situation. That’s why it would be helpful if you could run the command from the command-line so that all the files are in the same directory that you are running the application from. This removed any confusion.

For the line command instead the run, i already did it. i run it from the application directory.
I can repost you the message i got :
Device firmware version: 3.1
Device serial number: grZIaNTXRm
Device device ID: Opal Kelly XEM3005
XEM found. Using flashload-xem3005-1200.bit
FPGA configuration failed.
FPGA could not be initialized.

I think files were found cause if i run the command line from c:\ for example (it’s not my application directory), nothing happen on the leds’s board. if it’s from the application directory led’s color change.

Actually i got the same message by the debugger of VS. I set up the project directory as you said but still the same problem.
I think the “flashload-xem3005-1200.bit” is found cause leds on board are changing color.
led0 red, led1 and 2 no color, led3 light red. does it have a special meaning ?

The return error from the ConfigureFPGA(…) is 0xfd, in other word “DoneNotHigh”.


David-- Are you able to configure the FPGA using the FrontPanel Application? Do the other samples such as Counters and First work properly?

Can you help me please …

I m able to load my FW or other as “counter” and “first” by USB (by the frontpanel and by my own SW).
But all FW have the same problem by the EEPROM.

Cause i m in Japan we have a big jet-lag and we are able to speak only few minutes on the morning (for me).
Do you have another branch or someone somewhere that can help me during the day (japan day) ?


Your best bet is to use our email support. We get notifications of activity there whereas we only check the forums as available. Since you were carrying on the conversation in both areas, we picked the public venue (the forums).


It would help if you can do a bit of debugging on your own. The Flash Loader works fine for us, so we’re dependent upon some feedback from you.

For example, you are getting a DONE NOT HIGH response from the device. This may indicate that the bitfile is not valid. What if you use a known-good bitfile such as counters.bit and just rename it flashloader-…bit

What if you use the FrontPanel application to download your bitfile (flashloader…bit). Does this work? If it does, then the bitfile itself is good and there must be something else wrong.

This will determine if you are able to download a bitfile – at least the software would get that far.

Also, I assume (since your counters and other samples are working fine) that the configuration switch on the XEM3005 is in the correct position, but you should verify this. If the switch is in “PROM” mode, you will get a Done not high and configuration will not succeed.

Thanks to your last mail i found the problem. It was just a switch problem.
I misunderstood the manual (Explanations or maybe my English level ??), cause i though that switch should be on the PROM config in order to configure the PROM.
I rewrite my solution clearly if someone else have the same problem :

  • First, Put the switch on USB config to upload the bit file into the PROM.
  • Then, put the swicth on PROM config to load the FW from the PROM.

Thanks for your help and sorry for this stupid error. :smiley:

David-- Glad you found the problem.

It is best to think of the switch as determining how the FPGA boots.

To boot from PROM - switch to the PROM side.
To boot from USB - switch to the USB side.

But the FlashLoader sample must boot the FPGA from USB, first.