Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Valued Contributor III
905 Views

Access QSPI from HPS C code without linux (bare metal)

Hi FPGA experts. 

I need your help for de1-soc. 

In the document http://www.mouser.com/catalog/specsheets/de1-soc_user_manual_v06.pdf it is stated that QSPI Flash can contain user data obious thing for he flash memory. Iwant to read/write data to this memory from c code from HPS. 

I see the pin conection of te FPGA to this memory and can do verilog to access it. But I hope there should be some wise way to solve my task through accessing the memory at some address or so directly from ARM trough this fancy AXI bus.
0 Kudos
3 Replies
Highlighted
Valued Contributor III
46 Views

The HWLib library for bare metal does have some functions for QSPI access: 

https://www.altera.com/support/support-resources/knowledge-base/solutions/rd01072014_376.html
0 Kudos
Highlighted
Valued Contributor III
46 Views

If you want a very easy-to-use driver, supplied with a working demo (verified to be OK on DE0-nano & DE10-nano), don't hesitate to request our free BSP. 

www.code-time.com 

 

The API of the driver has these 4 basic functions calls: 

qspi_init(); 

qpsi_read(); 

qspi_write(); 

qspi_erase(); 

 

It can't be simpler than that. 

Regards
0 Kudos
Highlighted
Beginner
41 Views

Hello i want to do the same.

I am new developer for the Cyclone v SoC.

I want to read and write from the QSPI flash in my HPS baremetal application. I want to write a very simple data in words format.
e.g.
write data 0xABCD, 0xCDEF, 0x1234
and then read it back.

I checked the following functions but they are not working for me.
alt_qspi_write
alt_qspi_read

I think i need to initialize the qspi and do the other initialization etc before using alt_qspi_write or alt_qspi_read.

Is there any one who developed a c program for QSPI of DE0-NANO-SOC?
is there any built application project doing the simple read and write on QSPI?

0 Kudos