UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor chadgentry
Visitor
5,916 Views
Registered: ‎06-09-2014

Booting from a large QSPI

For my zynq, I'm trying to fit the fsbl, bit file, u-boot, linux kernel, and rootfs all in QSPI, but the cumulative size of everything is about 34 MB, so it won't quite fit in the 32 MB that is addressable by the zynq bootrom.  However, I know that the fsb, u-boot and Linux can support the higher addresses, so my plan was to keep the fsbl, bit file, and u-boot in the first 32 MB so it can be properly loaded into the zynq on boot, then u-boot takes over and fetches all the linux files from the higher memory locations.

 

My plan sounded good, and I switched out the 2 16 MB QSPI memories for 2 64MB QSPI memories (s25fl512s which are listed as compatible by xilinx).  But now I seem unable to write data to the memories and verify it successfully.

In vivado, I can take the same file that worked with the 2 16 MB QSPI memories (I have a test one I created that's <32MB) and program it, but when Vivado tries to verify the data on the QSPI, it fails.  The zynq is also unable to boot from the QSPI.  

 

I don't think it's a problem with the size of the memories because at the very least, data less than 32 MB should work.  There are really no status messages or anything to go off of.  All I know is that data I write to the QSPI memory is no good.

 

Is there anything special I need to do when moving to QSPI memories larger than 32 MB?  

 

Thanks,

Chad

Tags (4)
0 Kudos
3 Replies
Scholar trenz-al
Scholar
5,897 Views
Registered: ‎11-09-2013

Re: Booting from a large QSPI

https://wiki.trenz-electronic.de/display/PD/SPI+32+Bit+Addressing

 

yes and no.

 

to have true fail safe spi boot, some extra care must be taken..

0 Kudos
Visitor leslieyang
Visitor
5,858 Views
Registered: ‎10-12-2014

Re: Booting from a large QSPI

Hi Chadgentry,

 

In my personal experience, the Xilinx SDK do not support programming S25FL512S flash.

Because the the Xilinx SDK/zynq_flash.bat do not erase flash properly.

 

I write a simple/tiny firmware to erase the flash before use Xilinx SDK/zynq_flash.bat.

It works.

 

For the FSBL, I modify it and force QSPI using DUAL_QSPI_IO_CONFIG_QUAD_READ, you can try in on demo board first.

 

Leslie

 

0 Kudos
Visitor chadgentry
Visitor
5,800 Views
Registered: ‎06-09-2014

Re: Booting from a large QSPI

Thanks for the responses.  As an experiment I tried using QSPI in single mode and (after recompiling the bit file and bsp sources) was able to program to the single QSPI chip using xmd via SDK.  With that working, I was suspicious that either my second QSPI was bad or installed improperly so I modified another board and was able to program and boot from the QSPI in dual mode.  Although I could never get Vivado's HW server to program the memories, xmd works well enough.

 

Here is the procedure that worked for me:

In xmd while connected to zynq via JTAG

1.  connect arm hw

2.  cd <directory with ps7_init.tcl script, u-boot.elf, and boot.bin file>

3.  source ps7_init.tcl

4.  ps7_init

5.  dow u-boot.elf

6.  dow -data BOOT.bin 0x03000000

7.  run

<interrupt u-boot>

U-boot commands via UART

8.  sf probe 0 0 0

9.  sf erase 0 0x4000000

10.  sf write 0x03000000 0 0x3FFFFFF

<power cycle the device>

 

I also found it helpful to use the debug mode for the FSBL.  You can enable that by adding "FSBL_DEBUG" and "FSBL_DEBUG_INFO" symbols to the ARM gcc compiler in the FSBL project.

Tags (4)
0 Kudos