Shop OBEX P1 Docs P2 Docs Learn Events
Is the Propeller program in EEPROM secure and safe? — Parallax Forums

Is the Propeller program in EEPROM secure and safe?

william chanwilliam chan Posts: 1,326
edited 2008-09-11 15:58 in Propeller 1
Hi,

I am concerned that the 24LC256 EEPROM only needs 2v to program unlike the SX which may need 10volts.

Does this mean a that jitter or crash on the Propeller chip or a power supply spike can inadvertently overwrite the EEPROM program?

If we write some data to the higher addresses on the EEPROM, what's to prevent a communication error or jitter from making it write into a lower address
which the program is residing?

What is the best way to preserve the program for long term.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-09-11 08:22
    For maximum security, you can tie the WP pin to Vdd. This will prevent any writes. Then, if you need writable EEPROM for data, use another IC.

    -Phil

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Still some PropSTICK Kit bare PCBs left!
  • AnubisbotAnubisbot Posts: 112
    edited 2008-09-11 13:46
    yes use the WP pin 7 and tie it to VDD with a switch, then u can set the WP after uploading.
    I have had some customers with my propeller Product where static and noise have caused the epprom to get corrupted.

    Since i have now switches for write protect it works great.

    Best regards
    Anubisbot
  • DroneDrone Posts: 433
    edited 2008-09-11 15:58
    Hi Anubisbot, A long answer - off the top of my head...

    If having a user throw a switch to allow safe writes to EEPROM is unacceptable, then the simplest method to ensure data integrity no matter what happens to the input power is to add "reserve" power for safe writes given your application. Simple methods employ a battery (with charging circuit perhaps) or a super-capacitor across the power supply diode OR'ed with regulated DC power, there are even little low-forward-drop diode OR parts out there specifically for this purpose. Taking it to the next level, you might employ a little "power-management" chip that ensures proper power up and/or down sequencing over time to guarantee your data transfer integrity. There are lots of little parts out there that do this as well, some accept "watchdog" inputs to make sure certain bus activity has stopped before sequencing power, some even mange reserve battery or super-capacitors too. Do a search across the major semiconductor manufacturers for micro-controller "power management" or "power supervision", you'll find LOTS of options. Some micro-controllers have these functions built-in. Propeller doesn't, and that's not a bad thing; there are lots of low-cost third-party power management options out there from manufacturers that specialize in this - so you can optimize for your particular design. Stating the obvious: You should have in-mind the times required for safe writes (etc.), voltages, currents etc. when selecting a solution.

    Also keep in-mind I think the propeller is able to dynamically change clock modes under program control to save power. This is important to consider when writing programs that preserve data integrity during reserve power shut-down, but be careful. Also, at the start of a reserve power shutdown you may want to design your programs to stop unneeded cogs first to reduce power. Given a fixed amount of reserve power when main power fails, there is nothing stopping you from writing a nice bit of code in a cog (perhaps) to supervise and manage power cycling. Given propeller capabilities in this respect, IMHO I haven't seen enough discussion about power management and data integrity in this forum; but then again I'm a relative newbie.

    Regards, David

    Post Edited (Drone) : 9/11/2008 4:10:48 PM GMT
Sign In or Register to comment.