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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/05/09 15:06
Read: times


 
#169439 - Knowing if initial contents is initialized or not.
Responding to: ???'s previous message
A processor that is using dynamic memory stores the data in capacitors. On initial power-up, all these capacitors will be empty, so the memory cells will start in a known state. Either 0x00 or 0xff depending on if there is an inverter in there somewhere.

But a processor that is using static RAM has memory cells created from flip flops. The tolerances of the components in the flip flop will affect if it will always power-up as a 0, always as a 1, or is so symmetrical that it may randomly take either state. With a good enough checksum, you can make an educated guess on power-up if the contents of the RAM is random data or if it is valid data since the previous run.

Also note that if the voltage gets just a tiny bit below the required, you may get RAM contents that is to 99.9% correct. But just one or a few bits have toggled.

It is better if a user gets a LED indication that they need to reconfigure the unit instead of the unit starting to do strange things because it assumes that it has already received a configuration.

Your checksum may be just a sum over all bytes.
Or it may be an Adler32 sum.
Or a CRC16, CRC32, ...
Or a MD5 or SHA160.

The amount of code, RAM and CPU power to compute the checksum will increase with the quality of the checksumming algorithm. You will probably not need cryptographically strong algorithms, so maybe you should consider Adler32. The gode is easy to implement and Google will help out.

List of 22 messages in thread
TopicAuthorDate
A few questions about internal RAM            01/01/70 00:00      
   questions            01/01/70 00:00      
      through everything            01/01/70 00:00      
   oops            01/01/70 00:00      
      maybe            01/01/70 00:00      
         I'm writing in asm            01/01/70 00:00      
            EEPROM            01/01/70 00:00      
            then RAM is NOT cleared on reset            01/01/70 00:00      
               RE: RAM is NOT cleared on reset.            01/01/70 00:00      
                  nothing in the code            01/01/70 00:00      
                     RAM indeterminate after a hardware reset            01/01/70 00:00      
                        Great            01/01/70 00:00      
                           Good checksumming            01/01/70 00:00      
                              Please pardon my ignorance            01/01/70 00:00      
                                 Knowing if initial contents is initialized or not.            01/01/70 00:00      
                              Battery-backed microcontroller            01/01/70 00:00      
            Just use an 8051 with eeprom            01/01/70 00:00      
               Thanks            01/01/70 00:00      
                  alternatives            01/01/70 00:00      
                     Not just "alternative" - but "superior"!            01/01/70 00:00      
                        Great suggestions            01/01/70 00:00      
                           that depends            01/01/70 00:00      

Back to Subject List