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: 
Adventurer
Adventurer
8,532 Views
Registered: ‎05-17-2015

SPI flash test example

Jump to solution

Hello,

 

I am using Xilinx evalution KIT of ARTIX-7.

I've created new application project based on "peripheral test".

It contains spi test for the flash (using device ID XPAR_AXI_QUAD_SPI_0_DEVICE_ID).

But I see that the test only reads spi registers, but does not do any read/write to/from flash.

I would like to do testing of read/write from flash with the evalution kit.

 

Can anyone please direct me how I can start doing it ? Is there an example ?

 

Thank you!

Ran

0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
15,544 Views
Registered: ‎07-31-2012

Re: SPI flash test example

Jump to solution

Hi,

 

Check the example xspi_numonyx_flash_quad_example.c  file in C:\Xilinx\SDK\2014.4\data\embeddedsw\XilinxProcessorIPLib\drivers\spi_v4_1\examples directory.

 

There are few functions like SpiFlashRead(), SpiFlashWriteEnable() and SpiFlashWrite() for your use. 

 

Additionally, refer to http://svenand.blogdrive.com/archive/201.html#.VVxKefmqpBc to know about how to program Spi Flash.

 

Regards

Praveen

----------------------------------------------------------------------------------------------
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.
----------------------------------------------------------------------------------------------


-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
3 Replies
Adventurer
Adventurer
8,521 Views
Registered: ‎05-17-2015

Re: SPI flash test example

Jump to solution
This is the hdf I'm using with the evaluation board:
https://drive.google.com/file/d/0B22GsWueReZTNWlVVG1pTVd6eDA/view?usp=sharing
0 Kudos
Moderator
Moderator
15,545 Views
Registered: ‎07-31-2012

Re: SPI flash test example

Jump to solution

Hi,

 

Check the example xspi_numonyx_flash_quad_example.c  file in C:\Xilinx\SDK\2014.4\data\embeddedsw\XilinxProcessorIPLib\drivers\spi_v4_1\examples directory.

 

There are few functions like SpiFlashRead(), SpiFlashWriteEnable() and SpiFlashWrite() for your use. 

 

Additionally, refer to http://svenand.blogdrive.com/archive/201.html#.VVxKefmqpBc to know about how to program Spi Flash.

 

Regards

Praveen

----------------------------------------------------------------------------------------------
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.
----------------------------------------------------------------------------------------------


-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
Adventurer
Adventurer
8,505 Views
Registered: ‎05-17-2015

Re: SPI flash test example

Jump to solution

Hi,

 

The build fails now on undefined XPAR_INTC_0_SPI_0_VEC_ID.

I guess that the HW missed adding the spi flash interrupt into interrupt vector controller.

I'll add it, and then try again.

 

Thank you very much,

Ran

0 Kudos