Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12409 Discussions

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

Altera_Forum
Honored Contributor II
1,105 Views

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
Altera_Forum
Honored Contributor II
246 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
Altera_Forum
Honored Contributor II
246 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
hsaee6
Beginner
241 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?

Reply