Flashing FX3's flash with more than a firmware-image

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
RoKl_290166
Level 4
Level 4
Welcome!

Hi,

   

I want to write an initial .bin-file which contains besides the firmware-image at the beginning more data following after the firmware-image to a flash-device connected via SPI to FX3.

   

Using just the ControlCenter's option "Program" -> "FX3" -> "SPI-Flash" doesn't work (it hangs up)!

   

Now I'm asking what's the reason for that and what do I have to modify to get it run... Obviousely the ControlCenter or the FXBoot-Programmer checks the downloaded data-file for something like the checksum or any other format-item?!

   

The complete source-code of the ControlCenter is not available so I'm not able to see what it does exactly.

   

But what about the boot-programmer which is loaded to FX3's RAM and can be used to access the SPI-Flash via USB vendor-commands? Where can I find the source-code of this boot-programmer? Is it the example-project "USBFlashProg"?

   

Does anybody know what the ControlCenter and the Boot-programmer do exactly with the file-data while programming the SPI-flash?

   

 

   

Best regards,

   

rob

0 Likes
9 Replies
PeWo_291316
Level 1
Level 1

Hi Rob,

   

Although I can't answer most of your questions I had real problems with control center locking up when I was programming flash and it turned out to be a problem relating to intel USB3.0 ports. The solution from my point of view was to use asmedia USB3.0 or just using USB2 (on any port, worked fine).

   

When writing i2c via control center, all it did was to download the entirity of the *.img file I pointed it at regardless of the contents (i.e. an invalid cypress boot or firmware file).

   

I found all the code that I needed from control center in "C:\Cypress\EZ-USB FX3 SDK\1.1.1\application\c_sharp\controlcenter" just incase you didn't find that.

   

Pete

0 Likes
RoKl_290166
Level 4
Level 4
Welcome!

Hi PicoPete,

   

a usual firmware-download works fine with the USB-controller I use on host-side (Renesas PCI-card).

   

But maybe it's worth to try on a USB2.0-port as you mentioned.

   

Yes, I also found the C#-project of the ControlCenter but the critical code of the download-process is hidden in a dll-lib.

   

 

   

Thanks a lot!

   

 

   

Regards,

   

Robert

0 Likes
Anonymous
Not applicable

Hi Rob,

   

Did you change the jumper settings as per your requirement.

   

You need to connect J101,102,103 and 104 between 2 and 3. Please check this once.

   

Control center just calculates the number sectors that it needs to write to the flash. Based on this, it will erase the flash sectors before programming it with the new image file.

   

Regards,

   

sai krishna.

0 Likes
RoKl_290166
Level 4
Level 4
Welcome!

Hi Sai Krishna,

   

sorry, I forgot to mention it in my first post... I'm not using the developement-board but an own hardware-design instead where the SPI-pins are connected to the flash-device directly.

   

 

   

Regards,

   

Rob

0 Likes
RoKl_290166
Level 4
Level 4
Welcome!

Hi Sai Krishna,

   

do you have any more hints for me rgd. this issue?

   

I'm getting an error-message from ControlCenter "Programming of SPI-Flash failed" if I try o program more than the firmware-image to the SPI-flash M25P16 connected to FX3's SPI on our custom-board.

   

 

   

Regards,

   

Rob

0 Likes
Anonymous
Not applicable

Rob,

   

You can programm the image into SPI flash memory.

   

Then using the SPI write API in the firmware, you can write your own data into the SPI flash.

   

Does this meets your application requirement or you want it to be done at the programming time only.

   

Regards,

   

sai krishna.

0 Likes
RoKl_290166
Level 4
Level 4
Welcome!

Hi Sai Krishna,

   

my firmware-application is running in 32bit-GPIF-mode so I haven't available the SPI anymore.

   

The only solution I see is to write my own BootProgrammer which receives data from USB and writes it into flash. This BootProgrammer I'd download into FX3's RAM using the ControlCenter and then I'd send the file to be flashed via USB to the device where it would be written into flash...

   

 

   

Regards,

   

Robert

0 Likes
Anonymous
Not applicable

Otherwise, you can use SPI similar to the way it is shown in the example project USBSpiGpioMode, if you have the enough number of free GPIOs.

   

Thanks,

   

sai krishna.

0 Likes
Anonymous
Not applicable

Hello,

   

I have the same requirement, I want to program an image file into the spi flash with at the beginning the FX3 firmware and after a FPGA firmware. I can generate this "big" file and send it with the control center but what is the format of an image (CRC, separate in differente segment ...)? is there a mean to generate it ?

   

Best regards,

   

paspe

0 Likes