This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430F5529: Time stamping whenever an Input GPIO is Low

Part Number: MSP430F5529

Hello,

I'm using the MSP430F5529 and would like to time stamp an event whenever an Input GPIO is Low.  

I'm using the MSP430 to communicate to the MC3672 accelerometer.  Whenever the MC3672 INTERRUPTS, I need to time stamp it and store this value somewhere in memory for later access. The INTERRUPT happens every 5ms, so time stamping needs to have low resolution.

Has anyone done this before?  Any helpful hints would be appreciated. Thanks. 

  • You have to decide a number of things:
    1. how accurate you need the time stamp. The 5529 has an RTC that you can use, but it is probably wrist-watch accurate. If you dead dead on accuracy, you might need WWV or GPS.

    2. How precise you need to be. Nearest second? Nearest minute? Nanosecond?

    3. How much data do you need to store?
    4. How much time do you have between interrupts?
    5. How often can you pull the data off the 5529?

    All these go hand in hand. An obvious solution here is an SD card.
  • Hello, thanks for the great questions. I would like about 500ns accuracy, which seems like the 5529 cannot achieve, is that correct?

    I'm also more curious about how to implement RTC for the 5529, regardless of its accuracy. Does anyone know how to do this? Thanks.
  • 500 ns *accuracy* or 500 ns *resolution* ?
  • The application requires 500ns accuracy (which might be too much for the 5529 it seems).
  • It is more than almost any MCU, it will require one of these:
    orcatechnologies.com/.../
  • Amy, Keith,

    1. An interrupt each 5 ms. I would expect a time stamp resolution at 5-100 us.

    According to the LaunchPad BOM list XT2OSC is:

    It gives us 3.6 x 24 = 86.4 seconds error per 24h.
    Plus temp. drift and aging.

    Doing RTC_A calibration a 4 ppm can be achieved which is equal to 346 ms per 24/h.

    What a level of time accuracy is needed?

    A time stamp can be combined as an RTC value and a counter value of any timer with resolution 5, 10us or more.
    At resolution of 20 us the counter could be easily zeroed at each second change.

    How many bytes to be stored during with each interrupt?
    How long the measurement would last?
    10 bytes means 2kB per second.

  • 1. Set up a free running timer. May need to use an overflow counter.

    2. Set up capture on the interrupt pin.

    3. Configure input capture on that interrupt pin.

    BTW you need to tinestamp the pin when it goes low, not when it is low.

  • If she really needs an absolute accuracy to GMT of 500 ns , an MCU solution is right out.
  • Measurements arrive at 5 ms intervals.
    500 ns is 0.01% of the interval.
    Could you put a few words about a physical processes behind your accuracy requirements?

  • I'm trying to track motion with an accelerometer (MC3672), this means that time stamping accuracy is really important. Whenever the MC3672 interrupts (meaning new data is available), then we need to time stamp this event as accurately as possible. Our motion actually moves every 1ms, but our sensors network (there are actually multiple MC3672 and other sensors on the bus) has a 200Hz (or 5ms) sampling rate.

    We were able to successfully time stamp using the OpalKelly FPGA (absolute error ~500ns), and I'm trying to figure out if this is doable with MSP430, but it seems like the answer is no.

  • I am a bit surprised that using a sensor with:
    - a nonlinearity @ 1%,
    - a substantial temp. drift
    - an interrupt period depending on an acquisition, conversion time and a RC oscillator
    sow high accuracy is a must.

    Thanks for reply!

**Attention** This is a public forum