Jump to content
Sign in to follow this  
ealdaz

Are MSP430 wake up times clock source dependent?

Recommended Posts

Dear All

 

I am evaluation the MSP430 for a low power application. One of the key points for the application is a quick wake up time from deep sleep mode, where the CPU clock is stopped.

I have seen the MSP430 seems to have very fast wake up time from deep sleep, in the order of us, I have not been able to ascertain if this is only when running the DCO as the source of CPU clock, or if it is applicable also when the CPU clock source is an external crystal.

Other architectures can also wake up relatively quickly when using the internal RC oscillator as a clock source, but take in the order of ms when using an external xtal. I am quite keen to know if this applies also for the MSP430.

 

Any feedback welcome

Share this post


Link to post
Share on other sites

Could you be a bit more forthcoming please?

I have read the datasheet and i don't doubt it is there, but i haven't been able to find it, so any indication such as keyword, title of topic that I should be looking for would be much appreciated.

Thx

Share this post


Link to post
Share on other sites

It depends on how "deep" is the sleep.

If only the CPUOFF is set, it only takes n cycle of MCLK to start the CUP.

If the source of MCLK is off, extra time is needed to start up that clock.

If DCO is off but its current source is on, it only takes a few usecs.

If the current source is off, extra usecs are needed.

Share this post


Link to post
Share on other sites

In other words, the spec sheet and family user guides are like Wise Guys - they know everything that you want to know but it's sometimes hard to get them to tell you stuff. Especially if you don't phrase your question just right.

 

It would be good for you to sit down with the Wise Guys in front of you and order a couple of Wobbley Pops and have a long, intense interaction with them. They will then reveal to you all of their golden knowledge and wisdom.

 

The day after you recover from all your Wobbley Pops, you will develop a superiority complex because all the mysteries of the MSP430 have been revealed to you. You are now the Chosen One. You are now able to program an MSP430 with the shear force of your will and the static electricity generated by your wiggling in your office chair. You can increase the joules with a can of beans :lol:

 

You will read our little forum here and declare your new found super powers with panache and pomp:

 

"Stand Back everyone! For I am now BITBLASTER! I can solve all your code challenges and program your MSP430 over the internet

 

"What Mom?!"

"Take out the garbage, Zeke."

"BITBLASTER! MY NAME IS NOW BITBLASTER!"

"Okay Dust Buster, Mache Schnell with the garbage!"

"NOW?!"

"Yes! Do it now Dark Lard of the Laboratory."

"Awe Maaaan! I was just going to blow the protection fuse on that guys micro."

 

 

Not to be an ass but read the manual dude! Yes, it's tough reading sometimes but they are full of cool stuff. :mrgreen:

 

If you don't want to read the manual then read this book first. It's a reeeeealy good book. It tackles the timers and clocks very well. You'll be having fun in no time after that!

 

Man, we should contact Elsevier and try to get a group discount for the forum members. That's a damn good book.

Share this post


Link to post
Share on other sites
Not to be an ass but read the manual dude! Yes, it's tough reading sometimes but they are full of cool stuff. :mrgreen:
@zeke;

Sorry, too late.

 

In less time than it took to post that snide remark you probably could have answered his question, made yourself look intelligent and win some respect. Obviously you went a different route. I wish I could answer his question but I am very new to these micro-controllers and not very knowledgeable yet.

 

@ealdaz

Hang in there I think someone here will get to you.

Share this post


Link to post
Share on other sites

Sorry, it wasn't intended as a snide remark but yeah, it appears that I was an ass last night. :oops:

 

I could delete my post if you'd like.

 

 

It would be good for the original poster to specify the processor that he is working with.

 

To quote John H. Davies in MSP430 Microcontroller Basics, page 164:

 

Up to four sources are available for the clock, depending on the family and variant:

 

Low- or high-frequency crystal oscillator, LFXT1: Available in all devices. It is

usually used with a low-frequency watch crystal (32 KHz) but can also run with a

high-frequency crystal (typically a few MHz) in most devices. An external clock signal

can be used instead of a crystal if it is important to synchronize the MSP430 with other

devices in the system.

 

High-frequency crystal oscillator, XT2: Similar to LFXT1 except that it is restricted

to high frequencies. It is available in only a few devices and LFXT1 (or VLO) is used

instead if XT2 is missing.

 

Internal very low-power, low-frequency oscillator, VLO: Available in only the more

recent MSP430F2xx devices. It provides an alternative to LFXT1 when the accuracy of

a crystal is not needed.

 

Digitally controlled oscillator, DCO: Available in all devices and one of the highlights

of the MSP430. It is basically a highly controllable RC oscillator that starts in less than

1 us in newer devices.

 

I suspect that the OP is working with a new device (ie: no x1xx or x3xx devices) therefore the answer is one of the four options above. Otherwise I advise the OP to kindly read the datasheet.

Share this post


Link to post
Share on other sites

In this datasheet on page 33, it gives a table of startup times based upon the DCO configuration. The slowest time is 2us when the DCO is set to 1MHz.

 

What the datasheet doesn't tell you is the startup times for any other configurations - only when MCLK = DCO.

 

I can tell you that if you use an external crystal (ie 16MHz) then the startup time is completely dependent upon the accuracy of that crystal.

 

Here's another quote from John H. Davies in MSP430 Microcontroller Basics, page 165:

Crystal Oscillators, LFXT1 and XT2

 

Crystals are used when an accurate, stable frequency is needed:

 

 

Share this post


Link to post
Share on other sites
But, back on topic, the answer is truely dependent upon the type of msp430 and the configuration of the msp430. But generally speaking, the answer is 1usec. 2usec at the worst.

Now that is the answer the OP was looking for. ;)

Share this post


Link to post
Share on other sites

One of the great things of these technical forums is that eventually you can get very helpful answers, however unfortunately very often one has to put up with a fair few thoughtless replies in the process, many on the lines of read the f... manual... which obviously is a very enlightened hint... it's a shame when we do not give people the benefit of the doubt and assume they are stupid and/or lazy... and at the same time we don't bother to try to understand the question...

 

On the other hand Kudos to those that have kept the thread positive and useful, much appreciated, this is what makes forums worth while...

 

Anyway, moving on..

 

I don't have a particular MSP430 in mind, in fact i suspect that the start up times are probably much the same for all the members of the family... so if anyone is familiar with a particular model and can share the startup up times i'd be happy to hear about it.

 

I had established from the datasheet that the startup times when using DCO was in the order of us, and what i was hoping to find out was what the startup times were when using other clock sources.

 

Again, the purpose of my question is not to find out what clock sources are available for the MSP430, but to know the relationship between wakeup times (after being sent into the different sleep modes) and clock sources.

 

Accuracy and startup times are not really related, the startup time is dependent on how long it takes for the oscillator to stabilise, that's why in principle one would expect an RC oscillator to be much faster starting up than a crystal... but maybe the MSP430 has some tricks up its sleeve and somehow accelerates the process... which is what I'm hoping to establish.

 

OCY, could let me know in what datasheet or application note you've found that information please? i think it could be a very useful starting point.

 

Again, thanks to those that have given positive feedback

Share this post


Link to post
Share on other sites
One of the great things of these technical forums is that eventually you can get very helpful answers, however unfortunately very often one has to put up with a fair few thoughtless replies in the process, many on the lines of read the f... manual... which obviously is a very enlightened hint... it's a shame when we do not give people the benefit of the doubt and assume they are stupid and/or lazy... and at the same time we don't bother to try to understand the question...

I was simply telling you the quickest way to find an answer and believe me, I have seen so many post like "what pin is timer out connected to?"

 

Quick search of User's Guide for "crystal" yields the following:

Note:

Low-frequency crystals often require hundreds of milliseconds to start up, depending on the crystal.

 

The sequence to switch the MCLK source from the DCO clock to the crystal clock (LFXT1CLK or XT2CLK) is:

1. Switch on the crystal oscillator and select appropriate mode

2. Clear the OFIFG flag

3. Wait at least 50 ?s

4. Test OFIFG, and repeat steps 1-4 until OFIFG remains cleared.

Meaning it must be a lot longer than 50us.

 

And Google...

Since crystals take a relatively long time to start up (several to many milliseconds), one shouldn't power them down for short periods of inactivity. And do the necessary steps and delays when starting them again (e.g. awaking from LPM4).

Share this post


Link to post
Share on other sites

The data-sheets only show the wake-up time from LPM3 or LPM4. That is, when the DCO dc generator is turned off and the DCO oscillator is stopped. When an external signal tries to wake up the chip, first the dc generator is turned on, and then the DCO oscillator is started. After that clock is running, and one MCLK later, the CPU is running.

 

For example, on page 24 of the 25cent MSP430G2001 data-sheet slas695c.pdf, you can find a section

Share this post


Link to post
Share on other sites

It seems, to my inexperienced understanding, that we have some good data on the DCO wake-up times and how to calculate them. But when using a crystal, it's difficult to nail down due to different crystals and their subjectivity to external influence (temp, capacitors, etc.). At any rate, waiting for a crystal can take orders of magnitude longer than the DCO.

 

Am I following, or still lost? :?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...