ahgan84 0 Posted September 15, 2011 Share Posted September 15, 2011 Hi guys, I'm just a beginner regarding the MSP430 MCU and I'm currently following the workshop tutorial for the MSP430G2231 LaunchPad Development Tool. I notice that there is many clock that can be use inside: a) VLO DCO c) External crystal d) ACLK e) MCLK f) SMCLK How do I know which to choose from for which application? Quote Link to post Share on other sites
gordon 229 Posted September 15, 2011 Share Posted September 15, 2011 In a big way, it all comes down to power consumption. [tipdf]SLAU144[/tipdf] 2.3 (or the appropriate guide for your ICs if you are using a family other than the Gs) has a nice diagram detailing which clocks are active in which low power mode -- generally, you want to use whichever allows you for staying in the lowest possible power mode for the longest possible time. In case of XT there's also that it's generally more accurate, slow (in case of the G series which only accept 32768Hz ones IIRC) but also consumes more power -- on the other hand, if the application is designed right, the more infrequent wake-ups may well compensate for this. If power consumption doesn't matter, the choice of clocks is generally less important (but there may be other constraints like if a particular peripheral can only use a limited set of clocks, or if a particular clock can't provide what you need, but these conditions are a given anyway). Quote Link to post Share on other sites
Alan 11 Posted February 24, 2012 Share Posted February 24, 2012 There aren't as many clocks as that per-say. The DCO, VLO and LFX (ext. crystal) are the actual hardware clock sources. ACLK, MCLK and SMCLK are clock signals which are sourced from the DCO, VLO and LFX. You generally setup which signal uses which clock source at the start of the program, and from then on identify the clocks via the signals. The user guide goes into more detail on this, and http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&ved=0CCoQFjAB&url=http%3A%2F%2Fwww.ccs.neu.edu%2Fhome%2Fnoubir%2FCourses%2FCSU610%2FS07%2FMSP430-Clock-Timers.pdf&ei=PhdIT4GUFoaf8gPnzKixDg&usg=AFQjCNG3qbaODjBAmoYOfGMcgWblWWB_Qg&sig2=-FIaptUpqsviofiIrBKZgQ provides a brief overview and some code examples. GeekDoc 1 Quote Link to post Share on other sites
tonesenna 20 Posted November 3, 2012 Share Posted November 3, 2012 VLO , DCO and External crystal are all clock generatores. Which one to use depends on your needs in terms of clock speed, accuracy and power consumption. VLO is a very low power clock that runs in the 10s kHz. While speed is very limited, it provides you a means of having a clock driving some system logic with minimal power consumption. This clock generator isn't accurate at all IIRC. DCO is a high speed clock generator that runs in MHz range. Is requires more power but allows clock speeds magnitudes higher than VLO. Accuracy is tipical in the range of 1 ~2% so it should be ok for applications that don't rely heavilly on clock accuracy. Crystal oscilators are the most accurate clock source and probably the most power hungry (except the 32k768 crystal LFXT oscillator). They may provide veri accurate timings and also high clock speeds. On the other hand, crystal oscillators, may require more power than the DCO and probably take longer to wake up from a low power mode than a VLO or DCO oscillator. MCLK, SMCLK and ACLK ate clocks sourced from each of the above clock generators. The MSP430 may allow you to independently source each clock from each available clock generator and also divide the clock frequency by some desired factor. By using different clocks you gain flexibility to, for inastance, put the device into a low power mode where MCLK clock source is disabled (power savings yay!!), but VLO may be kept running, driving ACLK which in turn drives a timer that will wake the device some time later. The MSP430 manual goes into great detail explaining the possible combinations of clock generators and clock signals. The datasheed for each device gives you a pretty reasonable figure of power consumption of the chip with each of the clocks running. -- to thanhtran 1 Quote Link to post Share on other sites
jpnorair 340 Posted November 11, 2012 Share Posted November 11, 2012 I don't use the G-series devices, but generally I like to use a 32768Hz crystal to drive ACLK, DCO (or FLL*XT) to drive MCLK, and then SMCLK a division of MCLK. Then you need to pick which clock to drive each peripheral. Always use the lowest frequency clock that can work properly for the application. Quote Link to post Share on other sites
G0XAR 19 Posted November 11, 2012 Share Posted November 11, 2012 What is the highest frequency the external clock can be? Quote Link to post Share on other sites
tonesenna 20 Posted November 11, 2012 Share Posted November 11, 2012 What is the highest frequency the external clock can be? It depends on the device and the supply voltage applied to them. Typical maximum frequencies are 8, 16 and 25 MHz. The best to do is actually check the datasheet for the particular device that you're interested in. G0XAR 1 Quote Link to post Share on other sites
G0XAR 19 Posted November 12, 2012 Share Posted November 12, 2012 whilst we are on the subject of clocks has anyone carried out measurements on how accurate and stable the 32K768 crystal included with the MSP Launchpad kit is? I have a need for a fairly precise clock for an application. An option I have used with an AVR is to derive the time from a GPS board with a 1 pulse per second output. But if the 32k768 crystal is accurate enough and stable enough may be I don't need to do this. Regards, Steve Quote Link to post Share on other sites
MattTheGeek 99 Posted November 13, 2012 Share Posted November 13, 2012 whilst we are on the subject of clocks has anyone carried out measurements on how accurate and stable the 32K768 crystal included with the MSP Launchpad kit is? I have a need for a fairly precise clock for an application. An option I have used with an AVR is to derive the time from a GPS board with a 1 pulse per second output. But if the 32k768 crystal is accurate enough and stable enough may be I don't need to do this. Regards, Steve The tolerance of the crystal provided with the launchpad is +/-20ppm (or 0.002%). It's not the best, but it works. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.