4 Replies Latest reply on Jul 20, 2016 9:59 AM by user_117827432

    PSoC 4200M Family non-volatile variables

    user_117827432

      Dear all PSoC fans!

         

      I am currently working in a project where a PSoC 4, powered by a battery pack, collects sensor information and sends it via ZigBee to a Central Node that upload the data into a server or the PSoC4 sends the data directly via GPRS to the server (I have two possible configuration). I need to store some data into a non-volatile memory, information like the ID of the last packet sent, the node identification, user configuration and so on. I was using a PSoC4200 device which allowed me to use the EmEEPROM block to store variables into the Flash. Therefore, I need more then 2 SCBs, making me to change to a PSoC 4200M chip. Unfortunately I could not find a way to store variables into the Flash as was doing before. The PSoC 4200M do not support the EmEPPROM block. Do you have ever faced something like that? Could you give me a direction?

         

      My kindest regards.

         

      Nicolas

        • 1. Re: PSoC 4200M Family non-volatile variables
          user_1377889

          Can you please post your complete project, so that we all can have a look at all of your settings. To do so, use
          Creator->File->Create Workspace Bundle (minimal)
          and attach the resulting file.

             

           

             

          Bob

          • 2. Re: PSoC 4200M Family non-volatile variables
            user_117827432

            Dear Bob,

               

            First of all, thank you for your reply.

               

            Unfortunately, due to confidential constrains, I can't upload the entire project here. I did it before as it was in the beginning of the development, but now it is quite advanced, thus I was required not to do so.

               

            But I am quite sure that the project itself would not help much, as it have nothing implemented using non-volatile variables in the PSoC 4200M device. I was using the EmEEPROM in the PSoC 4200 device I was using before, but the project requires 3 SCBs, that is the only reason I moved to the M family.

               

            I can provide some parts of my code here, but not the entire project. Sorry for that.

               

            Do you know why the EmEEPROM block is not supported by the 4200M family but it is for the 4200 only?

               

             

               

            Regards

               

            Nicolas

            • 3. Re: PSoC 4200M Family non-volatile variables
              user_1377889

              Have a look into the "System Reference Guide" (Accessable from Creator Help-menu) and look for the flash APIs. There is explained some clock changing which (I presume) are hindering a normal emEEprom component.

                 

              To write to flash use CySysFlashWriteRow() API. Use some of the topmost flash rows, so you will not run into code area.

                 

              You may use CySysSFlashWriteUserRow() API for PSoC4200M to access supervisory flash.

                 

              Do not forget to unprotect the flash memory area

                 

               

                 

              Bob

              • 4. Re: PSoC 4200M Family non-volatile variables
                user_117827432

                Dear Bob,

                   

                Thank you for your reply, I have read all the System Reference guide (cy_boot Component v5.40), but it is applicapble to all PSoC 4 families (including M family). I have not seen any indication on where the PSoC M only support Flash operation only via System APIs like CySysFlashWriteRow(). I have also gone through the PSoC 4200M famliy architecture TRM to see the memory organization and Flash Programming. As far as I have understood the documents, I did not find any possible reason for what the EmEEPROM is not supported on M family. I did see that the Flash operation requires an IMO and HFCLK change, but it does for all PSoC 4 families.

                   

                I know that I can use the CySys functions but it only allows me to write entire rows of flash. The advantage of the EmEPPROM is that I could use a "static const" variable (which is stored inside the Flash) and update its value using the EmEEPROM API).

                   

                I will open a case with Cypress to discuss this in deeper details, maybe they have "soon to come" component update that adds the support. I will post here any updates.

                   

                If you have any observation, it will be greatly appreciated.

                   

                Kind regards

                   

                Nicolas