cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
291 Views
Registered: ‎10-05-2010

Field Update Zynq Boot Flash

Jump to solution

I am porting a design from Artix to Zynq, prototyping with a Zedboard, using Vivado 2018.3 on Windows 10.

One of the final problems is deciding on how to do field updates of the boot flash. The Artix design has an FX3 USB3.0 bridge, and we use it along with some transmission gates to mux the QSPI signals between the FPGA and FX3. 

For the Zynq design, I'd like to reprogram the flash directly from the PS.

I have searched extensively through the forum and documentation. I've found articles and videos claiming to explain field updates, but instead they explain fallback (which I do have working). Others talk about u-boot. I have a bare-metal design and haven't set up a Linux development environment, and I don't want to go through the trouble of building a u-boot if there are easier approaches. Some have hinted that STARTUPE2 is the answer. I have instantiated an AXI Quad SPI with STARTUPE2 enabled, but it doesn't act like its talking to the boot flash (hangs when reading the flash ID).

So, how do I write the Zynq boot flash in the field with my bare metal application?

---

Joe Samson

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Moderator
Moderator
262 Views
Registered: ‎10-30-2017

Hi @josephsamson ,

Zynq has its own hard QSPI controller and it does not required AXI QSPI IP to communicate with the flash device. we have set of APIs to read and write the data to the QSPI Flash from baremetal example. https://github.com/Xilinx/embeddedsw/blob/master/XilinxProcessorIPLib/drivers/qspips/examples/xqspips_flash_polled_example.c

The above example illustrates read and write to QSPI flash in polled mode. please use the multi boot method which will help to boot the device properly using second image / golden image when the actual image is gets corrupted (assume if the power is off while writing the new image to flash, then the device is booted using second image or golden image as first image is corrupted
).

Best Regards,
Srikanth
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.

View solution in original post

3 Replies
Highlighted
Moderator
Moderator
263 Views
Registered: ‎10-30-2017

Hi @josephsamson ,

Zynq has its own hard QSPI controller and it does not required AXI QSPI IP to communicate with the flash device. we have set of APIs to read and write the data to the QSPI Flash from baremetal example. https://github.com/Xilinx/embeddedsw/blob/master/XilinxProcessorIPLib/drivers/qspips/examples/xqspips_flash_polled_example.c

The above example illustrates read and write to QSPI flash in polled mode. please use the multi boot method which will help to boot the device properly using second image / golden image when the actual image is gets corrupted (assume if the power is off while writing the new image to flash, then the device is booted using second image or golden image as first image is corrupted
).

Best Regards,
Srikanth
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.

View solution in original post

Highlighted
Xilinx Employee
Xilinx Employee
252 Views
Registered: ‎10-11-2011

Take a look at the examples for the standalone driver for QSPI.

C:\Xilinx\2019.2\Vitis\2019.2\data\embeddedsw\XilinxProcessorIPLib\drivers\qspips_v3_6\examples

You can erase specific area of the flash and write images from DDR into flash.

The overall flow is up to you.

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
Highlighted
Explorer
Explorer
198 Views
Registered: ‎10-05-2010

As always happens, I finally find some good references after I post to the forum. Here is a good article:

 

https://blog.asset-intertech.com/test_data_out/2017/04/zedboard-chronicles-episode-3-sourcepoint-debugging-the-zedboard-with-the-zynq-7000-soc-from-xilinx.html

 

And thanks to the mods for their replies.

---

Joe

0 Kudos