??? 01/15/10 16:02 Read: times |
#172493 - Think about this ... Responding to: ???'s previous message |
Per Westermark said:
You really don't have any big need/use for memory protection with a SPI-connected EEPROM.
If your code contains "unlock, write, lock", then a crashing application that does manage to reach the "write" code will quite likely manage to find the full sequence - including the unlock/lock. Doesn't that require that those be part of the same routine? If your write routine simply checks to see whether it's unlocked, and, if it isn't, then gives up, your NV memory is safer. If those two functions, i.e. write, and unlock, are disconnected, it's safe. If they are always used together, then you might as well not use that lock/unlock function. Memory protection is most important for:
- making sure people doesn't accidentally erase the boot loader, if using programming tools to replace an application. - making sure that a parallel-connected EEPROM with direct writes doesn't get damaged by a random write caused by a pointer error. Just how would you have a "pointer error" in code that's thoroughly debugged? Remember that for SPI, it isn't enough to just manage to toggle the SPI signals.
If you do need protection, you are best off locking the access to the slave-select signal to the EEPROM. Yes, if you do continuously perform EEPROM reads, and have bad signal integrity, then a bit error could convert a read operation into a write operation. But you should obviously make sure that you don't have bad signal integrity. Problems with the signals may convert a good write into a bad write (wrong address, or wrong data) or a good read into a bad read. None of which will be covered by any unlock/lock. Yes, if the cells for protection are non-volatile, then it is likely that they support the same amount of write cycles as the rest of the memory cycles. |
Topic | Author | Date |
EEPROM Protection | 01/01/70 00:00 | |
No much use | 01/01/70 00:00 | |
Think about this ... | 01/01/70 00:00 | |
Robust better than correct | 01/01/70 00:00 | |
You'll get no argument from me | 01/01/70 00:00 | |
Always a balance between cost and gains/losses | 01/01/70 00:00 | |
No argument here ... | 01/01/70 00:00 | |
Shielding will not solve? | 01/01/70 00:00 | |
Magnetic fields are tricky to shield from![]() | 01/01/70 00:00 | |
Reset performance of micro is important!!! | 01/01/70 00:00 |