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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/12/10 10:57
Read: times


 
#174991 - volatile
Responding to: ???'s previous message
Oliver Sedlacek said:
Firstly, I don't think you want to declare the array as volatile. Volatile means you are telling the compiler that it must never make the assumption that the variable hasn't changed, and is therefore appropriate for variables used by ISRs and for SFRs. Your EEPROM variable don't seem to fall into either category.

Actually, there has only today been a post on the STM32 forum where someone found that they did need to use 'volatile' for their PROM constants!

I'm not sure why, but my guess is that, without 'volatile', the compiler may decide not to read the ROM at all, but to use "immediate" data instead...

I'm not sure that links work any more since ST messed-up their forums, but try this:
https://my.st.com...d%20adress



List of 15 messages in thread
TopicAuthorDate
Loading Flash EEPROM with defaults            01/01/70 00:00      
   this seems to work - any improvements            01/01/70 00:00      
      Always a key requirement!            01/01/70 00:00      
         toolchain dependent            01/01/70 00:00      
   A couple of points            01/01/70 00:00      
      volatile            01/01/70 00:00      
         separate source            01/01/70 00:00      
         So subtle            01/01/70 00:00      
      Excel is (also) among your friends            01/01/70 00:00      
         Yes missing initialisers do default to 0            01/01/70 00:00      
   My Method...            01/01/70 00:00      
   an alternate suggestion (which I use)            01/01/70 00:00      
      That uses more memory            01/01/70 00:00      
         Oliver ???            01/01/70 00:00      
         I believe that is what most devices do..            01/01/70 00:00      

Back to Subject List