3 Replies Latest reply on Oct 5, 2017 1:26 AM by gsns

    Low-level driver for Serial NOR Flash of PSoC4

    user_483038750

      Hello,

       

      Do you have the Low-level driver for Serial NOR Flash or sample code of PSoC4?

       

      Best regards,

      Yocchi

        • 1. Re: Low-level driver for Serial NOR Flash of PSoC4
          gsns

          Hello Yocchi,

           

          I am attaching the latest Low driver driver and example code of Interfacing Serial Flash S25FL512S with PSoC 4. Please check the attached files and let us know if you need any clarifications.

           

          Thanks,

          Krishna.

          • 2. Re: Low-level driver for Serial NOR Flash of PSoC4
            ntan

            Krishna,

             

            The Low-Level-Drivers contained in the Project.zip and the slld_v16.2.1.zip are different each other.

             

            For example, the file slld_v16.2.1\src\slld.c in the slld_v16.2.1.zip has an API function like following.  The first argument of the function slld_ReadSecurityCmd() is device_num.

            /******************************************************************************
             * slld_READ_SECURITY_Cmd - Read Security Register
             * This function issues the Read Security Register command to SPI Flash.
             * RETURNS: SLLD_OK, SLLD_E_DEVICE_SOFTWARE_PROTECTED or SLLD_E_HAL_ERROR
             */
            SLLD_STATUS slld_ReadSecurityCmd 
            (
                    BYTE      device_num,                     //device number
                    ADDRESS   sys_addr,                      // device address given by system
                    BYTE     *read_buf,                      // data buffer
                    BYTECOUNT len_in_bytes                   // number of bytes
            )
            {
                SLLD_STATUS status = SLLD_OK;
            

             

            On the other hands the file Project\Design03.cydsn\slld.c in the Project.zip has following API function.  There is no argument device_num.

            /******************************************************************************
             * slld_READ_SECURITY_Cmd - Read Security Register
             * This function issues the Read Security Register command to SPI Flash.
             * RETURNS: SLLD_OK, SLLD_E_DEVICE_SOFTWARE_PROTECTED or SLLD_E_HAL_ERROR
             */
            SLLD_STATUS slld_ReadSecurityCmd 
            (
                    ADDRESS   sys_addr,                      // device address given by system
                    BYTE     *read_buf,                      // data buffer
                    BYTECOUNT len_in_bytes                   // number of bytes
            )
            {
                SLLD_STATUS status = SLLD_OK;
            

             

            Which driver software is recommended for users?

             

            Regards,

            Noriaki

            • 3. Re: Low-level driver for Serial NOR Flash of PSoC4
              gsns

              Hello Tanaka San,

               

              The one which is attached is the latest one. I recommend the users to use the LLD attached in my previous response.  The one used in the project is older version. Version no is 13.2.1. Customer can use the code as reference. Only some functions might have changed in the newer version.

               

              Thanks,

              Krishna.