Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
8 years ago

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.

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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's avatar
      hsaee6
      Icon for New Contributor rankNew Contributor

      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?