FX3 boot from SPI and configure FPGA.

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

cross mob
MaAr_2545856
Level 4
Level 4
5 sign-ins 5 solutions authored First solution authored

I want to store the multiple FX3 firmware and one FPGA bitstream in the same SPI flash. I would like to choose which firmware to be loaded .The FX3 should then boot from SPI then allow the FPGA to configure. I would also like to be able to store the data in the flash using a host app. For example , the user gives one byte data as input using host app. The data should be stored in SPI flash. Then The firmware uses this value for some calculation and then perform I2C communication with FPGA to send the result to FPGA .

How should I separate the SPI Flash memory for my requirements?

What modification I should do in firmware and boot loader to achieve my requirements?

How does the FX3 and bootloader knows where the firmware and bitstream starts and ends?

0 Likes
3 Replies
SudheerG_41
Employee
Employee
5 sign-ins Welcome! 25 comments on KBA

Hi Maheswari,

The first level of information that I have now is:

Please refer the following two URLs: AN76405 - EZ-USB® FX3™/FX3S™ Boot Options | Cypress Semiconductor  and FX3 Programmer's manual: http://www.cypress.com/file/124386/download 

AN76405 says that SPI Boot supports only one Firmware Image and no redundant image is allowed.

From the programmer's reference manual: On reset the ROM Bootloader identifies the boot mode based on PMODE[2:0]. When the boot loader identifies that the SPI is the boot mode, then it tries to read address 0 from SPI Flash. When a valid header is found the ROM BOOTLOADER continues.

The valid header information is available as part of AN76405 Application Note.

When you are referring to bootloader are you referring to a custom boot-loader (which might be running from SPI Flash) or ROM Boot-loader.

This post will be updated when have more information from my end.

Thank You & Regards,

Sudheer

0 Likes

Thanks for the reply.

I am referring to the custom boot-loader. What will happen in case of bitstream. How does FX3 takes bitstream from SPI location and configure the FPGA. How should I notify bitstream stored location to FX3 . So that every time when FX3 enumerates , it will configure the FPGA before it starts the main application .

For example.

I have UVC application. I will store the UVC firmware and FPGA  Bitstream in SPI Flash memory. I want the FX3 to configure the FPGA before it starts streaming the image.

0 Likes

You can use the second stage bootloader. The second stage bootloader will start from a SPI address 0x00. You can then fix the main firmware image address and the secondary firmware image address where the second stage bootloader will look for the firmware to boot from. And then you can store your FPGA bitstream  to fixed address in the SPI flash which the FX3 application firmware will read and load it into the FPGA..

For example:

0 to 32 KB: Second Stage bootloader

64 KB to 320 KB: first copy of firmware

320 KB to 576 KB: Second Copy of firmware

576 KB to 1576 KB: FPGA bitstream (Assuming the bitstream file size to be around 1 MB)

1576 KB onwards: Your custom data

0 Likes