5 Replies Latest reply on Jul 12, 2017 4:58 AM by userc_38508

    Emulated EEPROM Problem

      Hi,

         

      may somebody can help me. I try to use the Emulated EEPROM component (V1.20)

         

      If I use the component directly at the beginning of the program code everything works as expected. But if I try to use the component within an interrupt it do nothing and I get as result "unknown error" No change if I disable the interrupts before writing. What do I miss?

         

       

         

      Best Regards!

         

      Michael

        • 1. Re: Emulated EEPROM Problem
          AnkitaS_51

          Have you debugged the code and checked whether the interrupt is getting triggered or not.

             

          Please post your project if possible

          • 2. Re: Emulated EEPROM Problem
            JoMe_264151

            Apart from your problem: Writing to flash using  emeeprom takes a considerable amount of time to finish. During that time your interrupt handler might stall your system for some ms. Might be safer to write to emeeprom from main-loop.

               

             

               

            Bob

            • 3. Re: Emulated EEPROM Problem

              Thanks for the quick answer!

                 

              Yes interrupts are triggered. I prepared a small demo example and this project is working?  Write to the flash is in my case only used in a special mode where no real time is required therefore it is no problem. But you are right the final position of that peace of code will not be an interrupt. I just tested out different positions where it should work. All the stuff is within a function. If I call the function at the very beginning at main it worked but in the interrupts it is failing. And even worse not always failing. The original project I'm not allowed to publish and publishing a working demo example make also not really sense. At the moment I have no real idea what's going on. The original project is huge and use nearly all what the PSoC5 have so maybe a DMA or other bus transfers are influencing the flash write? I will go into more detail by myself and as soon as I know more I will post the results.

              • 4. Re: Emulated EEPROM Problem
                JoMe_264151

                A question: Why are you using emulated  eeprom when in the PSoC5 chip is real eeprom?

                   

                 

                   

                Bob

                • 5. Re: Emulated EEPROM Problem

                  Because real eeprom is to small for this data set and second problem is that the real eeprom is already used for an other data set. 

                     

                   

                     

                  Best Regards!

                     

                  Michael