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
Observer alberto_p
Observer
323 Views
Registered: ‎05-18-2018

AC701 SPI bus on flash error

Dear all,

I am having problem in using the SPI bus to read the flash on the AC701 board.

My design is shown on the picture attached : I use the jtag-to-axi to talk with the axi-quad-spi working in standard mode (no FIFO).

The code I use on the TCL console is here:

 

# ##########################################

# Create and object reset AXI QUAD SPI CORE
create_hw_axi_txn -address 44A00040 -data 0000000A -type write RST_QSPI [get_hw_axis hw_axi_1]
# SPI Control reg SET
create_hw_axi_txn -address 44A00060 -data 000001FE -type write SET_CTRL_QSPI [get_hw_axis hw_axi_1] -force
# SPI Control reg GET
create_hw_axi_txn -address 44A00060                -type read  GET_CTRL_QSPI [get_hw_axis hw_axi_1] -force
# SPI Read Status
create_hw_axi_txn -address 44A00064                -type read STATUS_QSPI [get_hw_axis hw_axi_1] -force
# SPI Write data READ ID COMMAND
create_hw_axi_txn -address 44A00068 -data 9E000000 -type write READID_QSPI [get_hw_axis hw_axi_1] -force
# SPI CS @ 0
create_hw_axi_txn -address 44A00070 -data 00000000 -type write CS_QSPI [get_hw_axis hw_axi_1] -force
#Remove Ihibit
create_hw_axi_txn -address 44A00060 -data 0000009E -type write RM_INH_QSPI [get_hw_axis hw_axi_1] -force
# SPI CS @ 1
create_hw_axi_txn -address 44A00070 -data 00000001 -type write RM_CS_QSPI [get_hw_axis hw_axi_1] -force
# SPI READ DATA
create_hw_axi_txn -address 44A0006C                -type read READ_QSPI [get_hw_axis hw_axi_1] -force
# TX FIFO
create_hw_axi_txn -address 44A00074                -type read TX_QSPI [get_hw_axis hw_axi_1] -force
# RX FIFO
create_hw_axi_txn -address 44A00078                -type read RX_QSPI [get_hw_axis hw_axi_1] -force


# ##########################################
# RUN reset
run_hw_axi RST_QSPI
# RUN ctrl
run_hw_axi SET_CTRL_QSPI
# RUN ctrl
run_hw_axi GET_CTRL_QSPI
# ##########################################
# RUN status
run_hw_axi STATUS_QSPI
# ##########################################
# RUN read id
run_hw_axi READID_QSPI
# RUN cs
run_hw_axi CS_QSPI
#Remove inhibit
run_hw_axi RM_INH_QSPI
# RUN cs
run_hw_axi RM_CS_QSPI
# Inhibit transition again
run_hw_axi SET_CTRL_QSPI
# RUN read data
run_hw_axi READ_QSPI

##########################################

 

 

 

If I run it the first time, I obtain on the oscilloscope what is shown on Fig. run0: it looks like the data out (pink signal) starts before spi_CLK (yellow); but if I run it again (immediately after, with no switch-off, switch-on, just the same code again), I obtain what is shown on run1 (which is correct: in the second case, the I can read the flash ID).

 

Do you know what is going on?

 

Thanks for your help.

 

Regards.

Block_Diagram.png
run0.png
run1.png
0 Kudos