6 Replies Latest reply on Feb 19, 2015 6:34 PM by user_14586677

    EEPROM writes,  temperature, CySetTemp(), general questions

    user_463759797

        OK. I wish to write to the eeprom.  I'll figure out how to do it with the api, I'm sure, but I do have some question based on what I've read.

         

       1) Is there a maximum temperature at which you would NOT want to write to the EEPROM?  I couldn't find any info.

         

       2) Is the CySetTemp() call embedded into the EEPROM API write calls?   I've looked at the code, and found *something* that could be associated with it, but it was "Greek to Me," since it was a bunch of macros.

         

        3) If CySetTemp() it isn't embedded into the EEPROM API, then should I call this before every write?

         

        4) If you only use blocking calls, could you power down the EEPROM between uses?  I understand it takes 5 microseconds to start, so a CyDelayUS(10); should give enough time for it to power up, with a safety margin, correct?

         

         5) Does the EEPROM API write a byte at a time, or only a row?  I see the Byte Write, but it appears to work in rows in the API, unless I misunderstand the call naming conventions.

         

      THANKS!!!!

        • 1. Re: EEPROM writes,  temperature, CySetTemp(), general questions
          user_1377889

          1) The guaranteed temperature range is valid for the eeprom, too. Writing at higher values reduces the number of writ cycles.

             

          2+3) From datasheet: "It is necessary to acquire the die temperature by calling the CySetTemp() before a series of EEPROM write operations."

             

          4) Yes, that's correct.

             

          5) The Write-APIs always write a row, ByteWrite uses a read-modify-write of a row

             

           

             

          Bob

          • 2. Re: EEPROM writes,  temperature, CySetTemp(), general questions
            user_14586677

            System Reference Guide discusses EE AND FLASH -

               


               

             PSoC devices have an on-chip temperature sensor that is used to measure the internal die temperature.
            You must acquire the temperature at least once to use Flash and EEPROM write functions. If the
            application will be used in an environment where the die temperature changes 10 °C or more, the
            temperature should be refreshed to adjust the write times to the Flash for optimal performance. The die
            temperature is obtained by calling the CySetTemp() function. This function queries SPC for the die
            temperature and stores it in a global variable, which is used implicitly while performing Flash and
            EEPROM write operations.

               


               

            Regards, Dana.

            • 3. Re: EEPROM writes,  temperature, CySetTemp(), general questions
              user_463759797

                Thanks for all the answers!

                 

                 Dumb question #1:  If CySetTemp() should be called before every write, shouldn't that be embedded into the API itself (perhaps in the future)?  If not, any ideas why?  Since writes are so slow, I'd expect that it shouldn't extend time that much to put it into blocking API.  In addition, writing to the EEPROM generates heat, so I would expect you'd want to measure die temp between writes for part lifetime reasons.

                 

                Dumb question #2:  Is there any info on the temperature at write vs EEPROM life from any sources?

                 

                We tend to use devices *past* their limits.  The penalty we pay is that we purchase more of them for replacements.  That is ok, is part of the business model.  I'm just curious if it there is any curves in existence that could be extrapolated to destruction.

                 

                 Dumb question #3:  If an eeprom row dies, does it affect subsequent rows?  (I'm hoping for someone out there that did an OOPS and found this out).

              • 4. Re: EEPROM writes,  temperature, CySetTemp(), general questions
                user_463759797

                  Re Dana's reply:  The data sheet says 5 degrees C, not 10.  Is there some updated information that hasn't made it to the data sheets in the latest PSoC Creator?

                   

                  UPDATE: I was wrong, the PSoc Creator data sheet does say 10.  The downloaded document from your Website, CyEEPROM_V_2.10_001-85001.pdf, says 5 degrees.  It also says you have to acquire the temp before a "series" of write operations.

                   

                  I'm assuming that for one write, it is not big deal.  If it is a big deal, I guess I dramatically shortened a parts life today.

                • 5. Re: EEPROM writes,  temperature, CySetTemp(), general questions
                  user_14586677

                  Just a part of your routine, call the temp API. In general if

                     

                  you are at room temp no harm has been done, and even

                     

                  if you werent no major damage to FLASH, it would just not

                     

                  be optimal write that allows chip to program its FLASH properly,

                     

                  the data that you wrote that is.

                     

                   

                     

                  Regards, Dana.

                  • 6. Re: EEPROM writes,  temperature, CySetTemp(), general questions
                    user_342122993

                     @wsm,

                       

                    A while ago I posted custom component to read/write data to EEPROM

                       

                     http://www.cypress.com/?app=forum&id=2492&rID=105370

                       

                     

                       

                    See if it serves your  needs or use as  code example.

                       

                    odissey1