1 Reply Latest reply on Dec 16, 2014 12:57 AM by shashank.rebbapragada

    Clarification on CY_FX_RQT_SPI_FLASH_WRITE  function

    pietro.troi

      Hi 

         

      I would like to send data to SPI flash (N25Q128A by Micron) via FX3 using control center and programming FX3 with USBFlashProg. I've tested this program writing, reading and erasing bytes to flash and it seems that all works as expected!

         

      My goal is to send a file generated with ISE that is 978KB big using transfer data button on Control Center.  

         

       

         

      Questions:

         

      1) what is the correct extension of the file to be sent to flash memory .bin   .bit   .mcs or a different one ? 

         

      2) Reading the cyfxflashprog.h file that comes with the USBFlashProg example it says that "The maximum allowed request length is     4KB" how can i get round this value to be able to send a bigger file ?

         

       

         

      Thanks to all

         

      TB

        • 1. Re: Clarification on CY_FX_RQT_SPI_FLASH_WRITE  function
          shashank.rebbapragada

          I'm not sure about the file extension. Wouldn't this depend on what the FPGA would want to read from the SPI flash?

             

          The Fx3's function here is only to transfer the file from the PC to the SPI flash. So as far as the Fx3/USB_interface is concerned, the file type does not really matter.

             

           

             

          The 4kB limit for control transfers is because of a lack of buffer availability in Fx3 for EP0.

             

          If you want to transfer the whole file in one shot, you could first send a vendor request to setup the SPI etc. in Fx3 firmware, and then send out the whole file through a bulk out endpoint. In firmware, once you get a buffer of data, you can start the Spi writes and continue until you have no more data coming in from that endpoint.