You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 22 Next »

 

 

Method ZynqZynq MPSoCFPGANotes
SDK GUI YESNONO 
program_flash YESNONOnew command, used to be "zynq_flash"
Vivado YESNOYES 
Vivado Labtools YESNOYES 
u-boot YESYESYES 
linux YESYESYES 
bare-metal YESYESYES 
ISF libraryYESYESYESS256 support needs patch for ISF 5.4
ToolZNONOYESneeds XCS3SPROG bitfile for given FPGA

 Flash programming support for tools and devices as of Xilinx tools version 2015.4.1

 

program_flash

This is command line tool to program the Flash on Zynq and FPGA devices.

Usage:  program_flash   <FLASH OPTIONS>   <CABLE & DEVICE OPTIONS>
 [FLASH OPTIONS]:
    -f <image file>       : Image to be written onto the flash memory
    -offset <address>     : Offset within the flash memory at which the image should be written
    -no_erase             : Do not erase the flash memory before programming
    -erase_only           : Only erases the flash as per size of the image file
    -blank_check          : Check if the flash memory is erased
    -verify               : Check if the flash memory is programmed correctly
    -fsbl <fsbl file>     : For NAND & NOR flash types only (Zynq only)
    -erase_sector <size>  : For flashes whose erase sector is other than 64KB (size in bytes)
   -flash_type <type>    : Supported flash memory types
For Zynq Devices
                                   1. qspi_single
                                   2. qspi_dual_parallel
                            For Non-Zynq Devices
                                 Please use the command line option -partlist to list all the flash types
    -partlist <bpi|spi> <micron|spansion> : List all the flash parts for Non-Zynq devices
                                List all flashes          - program_flash -partlist
                                List Spansion SPI flashes - program_flash -partlist spi spansion
[CABLE & DEVICE OPTIONS]:
    -cable type xilinx_tcf esn <cable_esn> url <URL of the TCF agent>
    -debugdevice deviceNr <jtag chain no>
 EXAMPLE:
  1. Zynq (QSPI Single)
    program_flash -f BOOT.bin -flash_type qspi_single -blank_check -verify -cable type xilinx_tcf url tcp:localhost:3121

 

 

Flash Programming, Zynq

SPI Boot Flash on Zynq is connected to PS only and is not directly accessible from PL or over JTAG. Whenever SPI Flash is programmed on Zynq following actions take place:

  1. OCM RAM is re-mapped as single linear memory at high address range, giving 256KByte continuous memory
  2. mini-version of u-boot.elf is loaded to this OCM RAM and executed
  3. data for programming is copied to Zynq OCM RAM
  4. flash tool communicates with u-boot over JTAG using ARM DCC channel

The same process takes place no matter what method is used to flash the SPI on Zynq.

 

 

Flash Programming, Zynq UltraScale+

Flash Programming for Zynq UltraScale+ MPSoC is currently only supported from u-boot and linux, SDK, Vivado and command line tools can not be used.

Flash Programming, FPGA

Flash programming over JTAG for Xilinx FPGA devices is done using "SPI indirect" method - FPGA is loaded with JTAG to SPI gateway bit stream, and then JTAG is used to talk to the SPI flash.

 

 

 

Quad Enable Bit

For SPI Flash use in x4 mode Quad Enable bit must be set in nonvolatile Status Register. The commands for this depend the SPI Flash Vendor and/or Flash type. Vivado Flash Programmer when programming bit file generated with X4 option would set this bit automatically. All Trenz SoM's that need the Quad Enable bit set for proper operation are delivered with this bit set.

Spansion S256

Checking if the Quad Enable bit is set is possible from u-boot

> sspi 0 16 35

if result is 0002 then the nonvolatile Quad Enable bit is set

It is also possible to write the Quad Enable bit, 2 commands are needed

> sspi 0 8 06
> sspi 0 24 010002

The above will set Quad Enable bit in non volatile status register

References

1

 

  • No labels