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.

MSP430 time-critical question

Other Parts Discussed in Thread: MSP430F2272

Hi Guys

I am working on MSP430F2272. Now I am trying to figure out how much time consumption when DCO starts until reach highest frequency (16MHz).  In another word, what is the rising time of MSP430 osillator . In addition, how much time delay for DCO output to the pin.

I tried to find on datasheet, but only have information about "Gating time : 5 ms". I am not sure which this "Gating time" indicates. Hope someone could help me to clear about it.

Thanks in advance.

Kebin

  • During LPM3 or LPM4, the DCO is completely disabled. That is, even the DCO’s dc-generator is disabled. The DCO clock wake-up time is measured from the edge of an external wake-up signal (e.g., port interrupt) to the first clock edge observable externally on a clock pin (MCLK or SMCLK). If the DCO was setup (prior to going into LPM) to 16 MHz, this wake-up time is 1 usec (that is, 1/1000000 of one second)..

    The Gating time in the Test Condition colon is the amount of time they used to measure (that is, test)  the frequency listed in the Min Typ Max colon of the same table.

  • A helpful FYI if you're trying to calculate the startup time... make sure to take erratum BCL12 into account.

    Module: BasicClock, Function: Switching RSEL can cause DCO dead time

    After switching RSELx bits (located in register BCSCTL1) from a value of >13 to a value of <12
    OR from a value of <12 to a value of >13, the resulting clock delivered by the DCO can stop for a
    certain time before the new clock frequency is applied. This dead time is approximately 20 μs. In
    some instances the DCO may completely stop requiring a power cycle.

    Workaround:

    1) In case of switching RSEL from >13 to <12, use an intermediate frequency step. The
    intermediate RSEL value should be 13.

    CURRENT RSEL   TARGET RSEL   RECOMMENDED TRANSITION SEQUENCE
    15                               14                         Switch directly to target RSEL
    14 or 15                     13                         Switch directly to target RSEL
    14 or 15                     0 to 12                 Switch to 13 first, and then to target RSEL (two step sequence)
    0 to 13                        0 to 12                Switch directly to target RSEL

    2) In case of switching RSEL from <12 to >13, ensure that the maximum system frequency is not
    exceeded during the transition. This can be achieved by clearing the DCO bits first (DCOCTL
    control register, bits 7-5), then increasing the RSEL value, and finally applying the target
    frequency DCO bit values. For more details, refer to the examples in the “TLV Structure”
    chapter in the MSP430x2xx Family User’s Guide (SLAU144).

    It affects all 2xx devices and has a straightforward workaround, but it should definitely be included in systems that operate at 16MHz.

    Regards, ~Miguel

  • Thanks for your answer.  

    With your kind explain of gating time, i think this one maybe not i want. And I also do not doubt about the wake-up time (1usec from low-power modes to active mode). However, i think after DCO wake up (to active mode) then it should start to rise up to a certain frequency (like 16MHz). I am interested in what is the time after  DCO wake up until DCO stabilized at 16MHz.  [:)]

  • Thanks for your suggestion about calculation. But currently, i just want to know directly  DCO startup time. And also i am afraid if this startup time varies in different MSP430 products (i think they have different clock module in different types ). So i just wonder if there is direct answer. i cannot find on data sheet. do you know anywhere has these information? Otherwise i have to follow your suggestion to measure by myself. But in that way i need to try several types of MSP430 then figure out which one perform better.

    Best

    Kebin

  • As far as I know, when the DCO wakes up, it oscillates right away with the frequency it was set up before it went to sleep. The wake up time includes what you called startup time.

    That is, you can (a) set up the DCO to run at 16MHz, (b) roughing DCO-clock to one of the pins, (c) set up another pin for external interrupt, (d) go to LPM3 or LPM4 to sleep.

    After that, the DCO is completely disabled and stopped. Now if you trigger the external interrupt, DCO will be oscillating at 16MHz within 1 usec.

    One the other hand, if DCO was set up for 1MHz, it will take 2 usec instead. (Does this tell you something?)

    The wake up time is in the data-sheet of each type of device. Some earlier types are slower.

  • Old cow yellow is right. The wakeup time that is specified in the datasheet is the time from DCO off to DCO running at the speed that was set when the processor entered the low power mode.

    Regards, ~Miguel

  • Thanks for your information. that's exactly what i need to know. Before i guess it still cost another time after DCO wake up until drive up to a certain high frequency. Seems there is no such a time when DCO wake up again.

    Kebin

**Attention** This is a public forum