Jump to content
  • 0

How to read from SPI Flash on Nexys A7 (previously Nexys 4 DDR)


yildizabdullah

Question

I need to read from Quad-SPI Flash device on Nexys A7. Reference manual has the following statements:

All signals in the SPI bus except SCK are general-purpose user I/O pins after FPGA configuration. SCK is an exception because it remains a dedicated pin even after configuration. Access to this pin is provided through a special FPGA primitive called STARTUPE2.

How can I utilize the STARTUPE2 primitive in order to drive SCK pin properly during a read operation?

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

@D@n @jpeyron

Do I have to include a pin constraint for spi_clk in .ucf file? I suppose I have to, but get an error during Implement Design step in Xilinx ISE as 

ERROR:MapLib:30 - LOC constraint E9 on spi_clk is invalid: No such site on the
   device. To bypass this error set the environment variable 'XIL_MAP_LOCWARN'.

Link to comment
Share on other sites

@yildizabdullah,

Are you using ISE or Vivado?  I would've expected Vivado if you are working with the Nexys A7.  ISE uses UCF files, Vivado uses XDC files--that's why I'm asking.  Either way, you don't need to declare the SPI SCK pin in the constraints file.  However, getting access to it is a bit more involved.  To get access to the spi_clk pin you need to use a special primitive, either STARTUP_SPARTAN6 for the S6 (not the Nexys A7) or the STARTUPE2.  You can find an example of using the STARTUPE2 primitive to get access to the SPI clock pin here, and more general instructions here.

Dan

Link to comment
Share on other sites

On 4/5/2019 at 6:34 PM, D@n said:

@yildizabdullah,

Are you using ISE or Vivado?  I would've expected Vivado if you are working with the Nexys A7.  ISE uses UCF files, Vivado uses XDC files--that's why I'm asking.  Either way, you don't need to declare the SPI SCK pin in the constraints file.  However, getting access to it is a bit more involved.  To get access to the spi_clk pin you need to use a special primitive, either STARTUP_SPARTAN6 for the S6 (not the Nexys A7) or the STARTUPE2.  You can find an example of using the STARTUPE2 primitive to get access to the SPI clock pin here, and more general instructions here.

Dan

@D@n I work on ISE and possibly I am doing something wrong in my SPI Flash controller. Thanks for your suggestions.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...