6 Replies Latest reply on Dec 9, 2019 7:33 AM by kagu_4275276

    what soft modification after a flash migration


      Dear Cyprocess developper community,


      i would like to change an old memory flash for my design from S25FL164K0XMFI011 to S25FL064LABMFI011.

      I find the attached document that explain the command change, but i don't know where to make that changement from my Psoc craetor project.

      Sorry it may be easy for software engineer but i am an hardware engineer. Can you please help me ?


      Thank you in advance for your support





        • 1. Re: what soft modification after a flash migration

          Hi Kamel,


          Thank you for contacting Cypress Semiconductor.

          1. The Migration Guide highlights the differences in the features and command set of FL1-K and FL-L device. Since most of the commands are same for both devices and only a very few have changed, I would suggest that you should first go through the PSoC Creator project and check if you are using any of the commands that have changed, in your application.
          2. The Status Register and Configuration Register are different for both devices. hence, if any kind of programming/reading is being done to/from those registers then that part of the code which programs/reads the Status or Configuration Register should be modified accordingly for the FL-L device.
          3. Since you have not shared the PSoC Creator project I am not aware if you are using the SCB-SPI component in your project or the SMIF component. Whichever component is being used, the APIs specific to that component would have been used in your project to transmit the flash commands and receive the data from the flash. You should try to find out where the transmit APIs are being called in the project and check what hex commands are being sent to the flash. If the hex command being sent to the FL1-K has changed for FL-L then you should modify your project with the correct command for FL-L. If you need help with in identifying the transmit and receive APIs, you could share the project with us. Also, could you please let me know if you are using our low level driver for serial flash?


          Best Regards,


          • 2. Re: what soft modification after a flash migration

            Dear Apurva


            Thank you a lot for your reply.

            Please find attached the project fils i just deleted the main.c fil.

            If you can help it can be very cool !

            • 3. Re: what soft modification after a flash migration

              Hi Kamel,


              Thank you for sharing your project with us.


              I can see that the Cypress low level driver for serial NOR flash device has been used in the project. In that case, for migrating from FL1-K to FL-L I would recommend you to do the following things -

              1. Download the latest version of the sLLD from the following link - https://www.cypress.com/documentation/software-and-drivers/low-level-driver-spi-flash?source=search&cat=software_tools
              2. Extract the files. Go to Cypress_SLLD_v16.2.1 >> device_specific >> fll. Replace the slld.c, slld.h, slld_targetspecific.h files in your project with the files from the folder mentioned above.
              3. Go to Cypress_SLLD_v16.2.1 >> Hals >> Generic. Compare the slld_hal.c and slld_hal.h files inside this folder with the slld_hal_Cypress.c and slld_hal.h files in your project for any missing switch cases. If found, define a new case for that particular command.


              The above steps should help in successful migration. Please let me know if you face any issues.


              Best Regards,


              1 of 1 people found this helpful
              • 4. Re: what soft modification after a flash migration

                Dear Apurva,


                Thank you for your reply that permit me to see clearer the slld driver.

                I tried to do as ou mentioned but i'm still facing some problems. First the new command have an additiional parameter witch is device_num.

                As i understand that parameter permit to select the chip in case of multichips. For my design i have only one memory chip.

                So what are the value that i can specify for the device_num parameters ?

                exemple of error message that i get : too few arguments to function 'slld_WRENCmd'

                i also get this kind of error message : implicit declaration of function 'SPI_FLASH_RDBYTE'


                thank you in advance for your reply.


                Best regards


                • 5. Re: what soft modification after a flash migration

                  Hi Kamel,


                  Thank you for your reply.

                  • Your understanding about device_num is correct. This parameter will be used on devices with multiple chip select lines. Since you are using S25FL064L which has a single chip select line, this parameter is not actually used anywhere in the project, however you still need to pass this argument every time any LLD function is called anywhere in the project. Since this parameter is not being used, you can assign any value to it, say you can define BYTE dev_n = 0x01 in your main.c and pass dev_n as the first argument for all LLD functions that expect device_num argument. The error "too few arguments to function 'slld_WRENCmd' " is received when the function expects more number of arguments than already passed. Since the previous version of LLD being used in your project did not have the device_num argument, you will have to modify your main.c accordingly. You will have to add the device_num argument in all LLD function calls that expect this argument.
                  • Regarding the second error "implicit declaration of function 'SPI_FLASH_RDBYTE' ", I went through the slld_targetspecific.h file in the project provided by you and I see that some modifications have been made to that file. Some Generated Sources functions have been # defined with a different function name. Could you please compare the slld_targetspecific.h file of your project with the slld_targetspecific.h file of the new version of the LLD that you downloaded from the website and add all the necessary # defines in the new file and try to build again?


                  Please let me know the updates and if you need any more help.


                  Best Regards,


                  • 6. Re: what soft modification after a flash migration

                    Dear Apurva,


                    I proceed as you said and after building i have no error, but my Flash memory still not save my parameters.

                    Apparently i should specify the flash memory device identifier ? wherre should i specify it ?

                    for information i send my data to store on flash memory with an android application.



                    Thnak you in advance for your reply.


                    Best regards,