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.

MSP430x2xx time source

Hi folks,

just wanting to make sure I read the manuals correctly. The MSP430F2xx and MSP430G2xx controllers both support using the time signal from a 32kHz quartz, but don't have their own on their IC, right? So I need an additional quartz if I want to use ACLK?

Thanks in advance,

Kai

  • Yes, the MSP4302xxx family does not have an internal 32,768 Hz clock source and requires an external crystal (LFXT1) for this purpose. ACLK can be sourced from either the 32,768  Hz LFXT1 crystal or can also be sourced from the 12 kHz VLO which is internal to the chip. So, if the precision of a 32,768 Hz crystal is not important, then ACLK can be sourced from the internal VLO source.

  • Ah, I forgot about the VLO. I'm planning to use the controller to drive a servo with a 20ms pulse-width modulation, so anything in the kHz range is sufficient for me. Thanks for the advice.

  • Unfortunately the VLO is veeery inaccurate and can range from 6 to 14 kHz and has a drift of 0.5%/°C At least on the 5428, bt I remember the values for teh 2x series similar,

    a 20ms PWM can easily be done with the DCO too. Put DCO to 1MHz (or a multiple, if required for MCLK), feed TimerA with 1MHz through SMCLK, then set TimerA to up mode and TACCR0 to 19999. With TACCR1 and TACCR2, you can control the duty cycle of the TA1 and TA2 output pins. 9999 gives 50%, 999 gives 10% (or 90%, depending on the outmod setting set/reset or reset/set). Additionally, you can use the TA= pin for a 50% 40ms(250Hz) output signal by selecting the toggle outmode.

    No software interactin is required then, the hardware will maintain the PWM. You can change the duty cycle at every time by changing the CCR1/CCR2 register. (and if you want to avoid jitter during a change, you can do the change synchronized in the TAR or CCR0 interrupt)

     

  • I take this post over on MSP430 timers to comment my problem.  We are using the MSP430x1xx series with an external 32.768 kHz crystal, but for our application the times given by this crystal are not enough. We need a timer that triggers every 16us. 
    We have seen that with the MSP430x2xx series is possible to change the clock source of 32.768 kHz with another in the 400kHz to 16 MHz range using the LFXT1CLK with the HF mode enabled, is it correct? Are there some test with different clock sources like http://www.ti.com/lit/pdf/slaa225 for the 32.768 kHz?
    Thanks in advance
  • Yes, all MSPs can use either a 32kHz crystal or a high-frequency crystal as XT1.
    The difference is that the driver requirements are different for both types of crystal and so is the power consumption. To trim the power down, the high frequency modes usually require a frequency band selection, so the driver can be configured to the lowest possible driving strength for this frequency (more shouldn't hurt functionality).

    MSPs with an FLL module are designed to generate high-frequency DCO output from the clock crystal. If a high-frequency crystal is used, the whole clock system should be switched to not use the FLL/DCO anymore but derive all frequencies from the crystal. Which reduces power consumption again sicne the DCo can be disabled, and results in a more stable, way more precise and also jitter-free timing.

    I don't think there are any test for crystals other than these for 32kHz. The reason is that the 32kHz circuitry on the MSP as well as the crystals themselves are optimized for ultra-low power consumtion while the high-frequency crystals are optimized for performance. Also, whil in LF mdoe the operation capacitance is provided by the MSP, in HF mdoe you have to provide it by yourself externally and matching the crystal datasheet.
    So making a test with any meaning is difficult.

     

  • Hi, thanks for your recommendations! I take care of these things.

**Attention** This is a public forum