Shop OBEX P1 Docs P2 Docs Learn Events
What's a simple way to know the Propeller has turned off? — Parallax Forums

What's a simple way to know the Propeller has turned off?

Don MDon M Posts: 1,652
edited 2013-03-15 21:04 in Propeller 1
I'm trying to do some power fail time measurements with the logic analyzer on the SPI pins for the SD card and want to look at the time relationship between the card file close, unmount and when the prop finally dies from not enough power.

Could I just set a pin high and when it finally goes low assume that is when the prop has shut off? Is there any better or more sure way of knowing?

Comments

  • jmgjmg Posts: 15,173
    edited 2013-03-15 15:26
    Don M wrote: »
    I'm trying to do some power fail time measurements with the logic analyzer on the SPI pins for the SD card and want to look at the time relationship between the card file close, unmount and when the prop finally dies from not enough power.

    Could I just set a pin high and when it finally goes low assume that is when the prop has shut off? Is there any better or more sure way of knowing?

    The Prop is simple CMOS, and likely to work quite low in Vcc, especially at lower CLK speeds.

    That means an IO pin, will hold state to probably well under 2V - your weakest link is going to be the SD card itself, and those will be highly variable.

    If it used Multi-level Flash cells, I'd say Vcc would matter a lot, so you are best to just use a Std VCC reset generator, at 3.3V-10% or 3.3V-5%
    ( or do your own at -8% or -4% for example)
  • Don MDon M Posts: 1,652
    edited 2013-03-15 15:58
    I am succesfully saving and closing the file once power fail is detected. What I'm trying to gauge is from the point that the SD card is done closing the file how much time is left until the Prop is considered dead or below the threshold of operation.

    What I'm doing presently is setting a pin high after the SD routines are finished and measuring the time between when the pin went high until it goes low assuming Prop is off. Measuring this way I see a window of 53mS after the SD card is done.

    I somewhat understand what you are saying that when the logic threshold level is low or false may be after the time the Prop is actually non functional.
  • David CarrierDavid Carrier Posts: 294
    edited 2013-03-15 16:17
    Don M,
    If you have the BOEn pin connected to VSS, the Propeller will hold itself in reset when the voltage is below a specific point. You can monitor the RESn pin to determine when this happens.

    — David Carrier
    Parallax inc.
  • KyeKye Posts: 2,200
    edited 2013-03-15 16:18
    Try making the pin pulled low by a strong drive... as in put a 100 ohm resistor on it to ground.

    This would get rid of any capacitive effects.
  • jmgjmg Posts: 15,173
    edited 2013-03-15 21:04
    Don M wrote: »
    What I'm trying to gauge is from the point that the SD card is done closing the file how much time is left until the Prop is considered dead or below the threshold of operation.
    but why do you need to know that, it will be well below the SD level anyway ?

    If you really want to guage Prop Core operation, rather than a static Pin level, try toggling the pin, or even doing some clacs where the overflow is fed to a pin to toggle it. (ie exercise some opcodes)

    The rate of pin toggle will confirm the core speed, and that is it still 'working'.
    If that is not easy to probe, you could attach a charge pump detector, which turns the toggle rate, into a DC voltage, or use a re-trigger monostable, which will cease re-trigger-> H soon as the toggle stops, or falls below the time constant.


    Or you could probably drop the toggle speed to Sound Card regions (5-10Khz) and still have the precision in time you are looking for ?
Sign In or Register to comment.