2 Replies Latest reply on Jan 10, 2020 12:30 AM by FlPi_1580126

    user sflash configuration/settings - PSoC 4100S (CY8C4125LQI-S422)

    FlPi_1580126

      Hi guys,

      I'm working on storing config data in user supervisory flash on a 4100S.

      I've already implemented user flash config storage in a CYBLE Module based on the sflash_example but I don't get it running on the 4100S MCU.

       

      I copied the WriteUserSFlash.c & .h from my working CYBLE project and changed settings like this:

      Block Size: 128

      Adress: 0x0FFFF200

      Number of Blocks: 4

       

      Write function (from sflash example) returns success, reading sflash addresses returns zeros.

       

      Any ideas what's going wrong here?

      Thanks for your help,

       

      Florian

        • 1. Re: user sflash configuration/settings - PSoC 4100S (CY8C4125LQI-S422)
          XiaoweiZ_71

          You called uint32 CySysSFlashWriteUserRow(uint32 rowNum, const uint8 rowData[]) API to write the SFLASH row, right? If this API returns success, there has no reason the SFLASH ROW is still empty.  Are you sure you read from the correct address?

           

          If you have a Miniprog3, i recommend you run the "PSoC4-BLE-SFLASH-Update.exe" tool locate in path C:\Program Files (x86)\Cypress\Programmer\Examples\Misc\PSoC4-BLE-SFLASH-Update\Executable,  write some bytes into SFLASH of PSOC4100S(this tool can be used for PSOC 4000S/4100S SFLASH update also), then read the SFLASH content out use your own code, if the result still empty, maybe you don't read from correct address i think.

           

          • 2. Re: user sflash configuration/settings - PSoC 4100S (CY8C4125LQI-S422)
            FlPi_1580126

            thanks for the answer, I'll check that out.

             

            Update:

            I updated the file WriteUserSFlash.c with the one from the example (not the one from my other project).

            Difference: number of bytes written (changed from 0xFF to 0x7F ... of course, 128 Bytes Row Size)

             

            checked addresses (seemed to be ok)

             

            Watched memory blocks in debugger and the rows were updated.

             

            So, seems to work, thanks you for your help.