Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
Per Westermark
11/04/08 06:36
Read: 945 times

#159628 - pread and pwrite...
Responding to: Guillaume Vlieghe's previous message
When writing, you initialize a pwrite variable.

When reading, you once more initialize the pwrite variable - shouldn't you initialize the pread variable?

When writing, you end when you get to the zero-termination.

When reading, you end when you get to the zero-termination, but did you write any zero-termination in the first place?

When reading, you are stepping a pread and a pwrite pointer - but you are not using the pwrite pointer. And you are placing all reach characters at the start of the eedata[] array.

After your read test, you have a code line saying:
   FLSCL &= ~0x40;                     // disable FLASH writes/erases from
                                       // user software
Shouldn't you disable flash writes/erases after the write pass instead of waiting until after the read?

Please describe step by step what you have done to verify your code? Have you in your nice IDE checked byte-by-byte what value you read from the flash, and that said value is stored at the exact location where it is expected to be stored?

List of 31 messages in thread
flash memeory reading      Guillaume Vlieghe      11/04/08 06:02      
   How do you know      Per Westermark      11/04/08 06:08      
      flash memory reading      Guillaume Vlieghe      11/04/08 06:21      
   Cross-posted on Keil      Per Westermark      11/04/08 06:11      
   pread and pwrite...      Per Westermark      11/04/08 06:36      
      my problem      Guillaume Vlieghe      11/04/08 06:59      
         No, you ignored my notes in my previous post      Per Westermark      11/04/08 07:17      
            answers      Guillaume Vlieghe      11/04/08 07:38      
               Still no answers      Per Westermark      11/04/08 08:00      
   first      Erik Malund      11/04/08 06:56      
      a quick glance seems to revceal ...      Erik Malund      11/04/08 07:00      
         /      Guillaume Vlieghe      11/04/08 07:13      
         MOVX During FLASH Write      Michael Karas      11/05/08 05:49      
   and now he crossed it on the SILabs forum      Erik Malund      11/04/08 11:23      
   my problem      Guillaume Vlieghe      11/04/08 13:51      
      RTFM      Erik Malund      11/04/08 15:28      
         not xdata      Per Westermark      11/04/08 15:50      
            reding flash      Guillaume Vlieghe      11/05/08 01:01      
               So fix the loop then      Per Westermark      11/05/08 01:07      
            Not ok      Maarten Brock      11/08/08 10:32      
         reading flash problem      Guillaume Vlieghe      11/05/08 01:12      
            Yet one more post with broken read loop      Per Westermark      11/05/08 01:52      
               correcting my code      Guillaume Vlieghe      11/05/08 01:57      
                  Then specify exactly what you don't understand      Per Westermark      11/05/08 02:17      
                     i correct my code      Guillaume Vlieghe      11/05/08 02:33      
                        it's working      Guillaume Vlieghe      11/05/08 02:41      
                           Report feedback      Per Westermark      11/05/08 03:07      
                              write cycle time      Guillaume Vlieghe      11/05/08 03:12      
                                 New Question, New Thread.      Andy Neil      11/05/08 03:53      
                           So what fixed it?      Andy Neil      11/05/08 03:50      
   correct registers ?      Guillaume Vlieghe      11/05/08 01:44      

Back to Subject List