1 Reply Latest reply on Jun 22, 2018 7:09 AM by ZhiF_31

    S25FL256L for Active Configuration and Remote Update

      I am attempting to use the S25FL256L flash chip for active configuration on a Cyclone V. Importantly, remote update needs to work as well.

      This is being done on a Terasic development board that came with a EPCQ256. I have verified that everything I want to do works with that chip.

       

      I followed AN98558 to get started after replacing the chip with the S25FL256L:

      http://www.cypress.com/file/202476/download

       

      And initially it went smoothly. The FPGA loads the factory configuration file correctly. But when trying to reconfigure to the application configuration file, it fails.

      The only solution I found was to set the Remote Update IP to be in 3 byte addressing mode. Then the application configuration file works correctly. But this isn't a viable option since in the production version I am going to need the entire chip to store the configurations.

       

      I can read and write in 4 byte addressing mode using the SPI IP that works through the active serial configuration port.

       

      In my search for a solution I found this documentation from Altera:

      How do I enable Micron's MT25Q support for EOL of EPCQ(>=256Mb) and EPCQ-L devices?

       

      It has a table showing that the number of dummy cycles needs to be changed depending on the configuration settings and device. Assuming I am reading it correctly, this table is wrong. It says that the Cyclone V, when set to ASx1 and 3 byte addressing needs 12 dummy clock cycles for fast reads. The FL256L defaults to 8 dummy clock cycles and as I mentioned above, it works. To confirm, setting it to 12 dummy clock cycles prevents loading the factory configuration. Also, I tried the other modes mentioned in the table and nothing worked even with the dummy clock cycles set as the table suggests.

       

      I suppose the next step is to talk to Altera, but I thought I'd bring it up here first to see if any of you have encountered this issue and found a solution.

        • 1. Re: S25FL256L for Active Configuration and Remote Update
          ZhiF_31

          Hi Anthony,

           

          Thanks for describing the issue in details here. It helps everyone who may have the same issue.

           

          Good to see that normal configuration works for you. Does your factory configuration need 4-byte addressing? I guess not. Even if the configuration requires > 128Mb, you may still be using 3-byte addressing to start the read, then the burst read can continue to the upper half of the device.

           

          For Remote Update, perhaps the IP uses 4-byte addressing so it did not work. To find out exactly what is not working, dummy cycle, 4-byte mode, or specific command, it would be nice if you can hook up a logic analyzer to the SPI bus and capture the first read of the Remote Update. In that case, you know exactly what data the flash is outputting at which cycle. If the dummy cycle is not set up correctly, you may be able to set it before the Remote Update read starts.

           

          Contacting Altera is definitely helpful is they give you support. You should contact them to see if they can give you suggestions too.

           

          Thanks,

          Zhi