Forum Discussion

RReth's avatar
RReth
Icon for New Contributor rankNew Contributor
6 years ago

Hi, I am trying to read flash device ID from our Arria 10 SoC based board. (Flash device is EPCQL512). I have used Intel FPGA Serial Flash Controller 2 and clock used for IPcore is10 MHz.

After setting read enable=1 , I am getting csr_rdata_valid =1. But the data corresponding to csr_rdata_valid high is “10000000”. I have attached screenshot of data captured in Signal Tap Logic Analyzer and source code.

Could you please help on this?

Thank you,

Remya

11 Replies

  • ShafiqY_Intel's avatar
    ShafiqY_Intel
    Icon for Frequent Contributor rankFrequent Contributor

    Hi RReth,

    May I know how do you perform the FLASH_RD_RDID operation? Is it via NIOS or sysctem Console?

    My current practice, I use system console to interact with register.

    This is my design csr address:

    And below is my command to read FLASH_RD_RDID (I used Cyclone 10 LP with Serial Flash Controller II IP):

    Thanks

  • RReth's avatar
    RReth
    Icon for New Contributor rankNew Contributor

    Hi Wolfgang,

    I have attached the source code used for reading Device ID. I didn't used the NIOS or System console. I captured the signal in Signal Tap Analyzer and from there I got the value "10000000".

    Also I couldn't find the exact data sheet for serial controller 2 . Can share me if you have?

    Thank you,

    Remya

  • RReth's avatar
    RReth
    Icon for New Contributor rankNew Contributor

    Hi Wolfgang,

    I can successfully read back FLASH_RD_RDID. I got value 20h.

    But when I tried to read back DEVICE_ID_DATA_x value, all give me value 00h .

    Thank you,

    Remya

    • ShafiqY_Intel's avatar
      ShafiqY_Intel
      Icon for Frequent Contributor rankFrequent Contributor

      Hi Remya,

      The default value of DEVICE_ID_DATA_x is 0x00.

      Thus, it is expected behavior.

      Below is my Cyclone 10 LP DEVICE_ID_DATA_x:

      Thanks

  • RReth's avatar
    RReth
    Icon for New Contributor rankNew Contributor

    Hi Wolfgang,

    Now I am trying to write a sector of Flash. From my understanding, first step is unprotect desired flash sector, then erase the sector and finally write the data. Is that correct?

    Is there any documentation for the steps involved in each process?

    Thank you,

    Remya

    • ShafiqY_Intel's avatar
      ShafiqY_Intel
      Icon for Frequent Contributor rankFrequent Contributor

      Hi Remya,

      You may refer to my step to write with Serial Controller II IP core:

      I hope this will help.

      Cheers

      • RReth's avatar
        RReth
        Icon for New Contributor rankNew Contributor

        Hi Wolfgang,

        I tried the steps you given above. But when I read back, I got only 0xFFFFFFFF .

        Please find the commands I passed to write 0x4 to Flash_MEM_OP_register.

        mem_write <= 1'b1;

        mem_wrdata <= 32'h00000004;

        mem_addr <= 24'h80000C;

        Could you please correct me?

        Thank you,

        Remya

  • RReth's avatar
    RReth
    Icon for New Contributor rankNew Contributor

    Hi Wolfgang,

    I would like to test from NIOS approach. Could you please share the source code for the flash interface? (I have less experience in software coding)

    Thank you,

    Remya

    • ShafiqY_Intel's avatar
      ShafiqY_Intel
      Icon for Frequent Contributor rankFrequent Contributor

      Hi Remya,

      I'll email to you the code.(I have your email)

      Thanks.