I'm using MSP-TS430PN80USB.
What is the system clock in this board ?
Where does it documented ?
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.
the documentation is here http://www.ti.com/lit/pdf/slau278, and the design files are here http://www.ti.com/litv/zip/slac314b (everyting is available on the tools website too http://focus.ti.com/docs/toolsw/folders/print/msp-ts430pn80usb.html).
What do you mean when talking about System Clock? A 4 MHz crystal (Q2) is mounted on the target board which feeds the PLL for generating the 48MHz USB clock.
All other clock settings are up to you!
well, which MSP4305xx are we talking about?
Well, you programmed the device, so the clock settings are up to you! By default (after a PUC) MCLK = SMCLK = 1.048..MHz.
Refer to the users manual for more details (http://focus.ti.com/lit/ug/slau208h/slau208h.pdf).
If you feel uncofortable with the configuration of the UCS, you can use the MSP430F5xx / MPS430F6xx core libraries to ease your life. Find them here http://focus.ti.com/mcu/docs/litabsmultiplefilelist.tsp?sectionId=96&tabId=1502&literatureNumber=slaa448a&docCategoryId=1&familyId=1615
I looked in slau208h.pdf
It is not clear from the PDF how should I set all relevant registers.
Is there another PDF describes how to set all MSP430 registers ?
TI's 28335 for example has a programming manual. Each register is well documented.
1. How can I set the MSP430 to work from XT1 (and not from internal clock).
2. How can I divide XT1 to 1,2,4 in order to lower the MSP430 power ?
According to slau208h.pdf, "XT1 in LF mode is selected as the oscillator source for XT1CL"
1. Does it mean that after power up, the default clock of the MSP430 is XT1 ?
2. What is LF mode ? There is no explanation of LF or HF in the PDF.
3. Can MSP430F5529 use 25MHz crystal clock connected to XT1 ?
4. What is the connection between XT1 frequency to MSP430 power consumption ?
No. YOu missed the onion-like dependency model of the MSP clock system.Zvi Vered said:1. Does it mean that after power up, the default clock of the MSP430 is XT1 ?
On startup, the XT1 ocillator is configured for the use of a low-freuency clock crystal. It can be reconfigured to support a high-frequency crystal (400kHz to 25MHz and more - the limits are in teh device datasheet, not the family users guide) or external digital clock signal.
This does not mean that XT1 oscillator is used for anything at all.
On the MSP, there are oscillators and clocks. An oscillator is an oscillation source. It can be used or not as input signal to one of the three system clocks. MCLK is the clock used for teh CPU and DMA transfers. SMCLK and ACLK are two other system clocks that are used for driving the various modules.
Not all oscillators are available for driving all three system clocks (on older families, e.g. ACLK could be only driven by XT1 while SMCLK couldn't but could be driven by XT2). Also, there are some special modules which can be clocked directly by an oscillator or even an external por tpin independently from the three system clocks. So do the flash module and the ADC have access to a free-running (not configurable) oscillator for their timing. And the watchdog can not only use SMCLK and ACLK but also some of the oscillators directly - this has to do with the low power modes.
After power-on, MCLK and SMCLK are configured to run from XT2 and ACLK runs from XT1. Since there might be no crystals on these inputs at all, there is a failsafe fallback mechanism that switches the SMCLK/MCLK to the internal DCO and ACLK to the internal REFO oscillator unless you configure it otherwise or the crystal finally starts oscillating. THis is explained in the failsafe feature section of the users guide.
It is, bu tonly in general. The specifics are found in the device datasheet. Generally, LF mode supports a 32768ht watch crystal and runs on very low power level. It also provides capacitors typically required for these crystals. HF mode supports HF crystals (consuming much mroe power) or resonators. The physically supported range in written in the datasheet but can be determined too from teh register descriptions (The XT1DRIVE setting description talsk about 4-8Mhz with lowest setting and 24-32MHz with highest)Zvi Vered said:2. What is LF mode ? There is no explanation of LF or HF in the PDF.
Yes. If configured for HF mode and maximum drive strength.Zvi Vered said:3. Can MSP430F5529 use 25MHz crystal clock connected to XT1 ?
usually, power consumption increases quadratically with the clock frequency. But the type of code executed, the use of LPM 8low power mdoes) for idle times and many more things greatly influence this. Also, an external crystal consumes more power than using the internal DCO with the same frequency, ye tthe crystal is more precise and stable than the DCO. And, and, and...Zvi Vered said:4. What is the connection between XT1 frequency to MSP430 power consumption ?
Jens-Michael Gross said:
After power-on, MCLK and SMCLK are configured to run from XT2 and ACLK runs from XT1.
Tiny correction on an excellent post about MSP430 clocking. After power-on, MCLK and SMCLK are sourced by DCOCLKDIV by default on the 5xx series. Fields SELS and SELM of UCSCTL4 (for SCLK and MCLK respectively) are both reset to 100b, which is DCOCLKDIV.
You're completely right. On the other series, there is no DCOCLKDIV (even on the devices which already have an FLL).Jeff Tenney said:After power-on, MCLK and SMCLK are sourced by DCOCLKDIV by default on the 5xx series.
Four eyes are better than two :)
I would like to thank Mr. Gross on the great post about MSP430 clocking.
I tried to run the following code (MSP430F552x_UCS_04.c) on MSP430F5529 installed on MSP430PN80USB.
This board has 32768Hz crystal connected to XT1
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
P1DIR |= BIT0; // ACLK set out to pins
P1SEL |= BIT0;
P7DIR |= BIT7; // MCLK set out to pins
P7SEL |= BIT7;
P5SEL |= BIT4+BIT5; // Port select XT1
UCSCTL6 &= ~(XT1OFF); // XT1 On
UCSCTL6 |= XCAP_3; // Internal load cap
// Loop until XT1 fault flag is cleared
UCSCTL7 &= ~XT1LFOFFG; // Clear XT1 fault flags
}while (UCSCTL7&XT1LFOFFG); // Test XT1 fault flag
When I tried to run the code, the CPU runs the while loop forever.
It seems that it does not manage to calibrate XT1 clock.
Can you help ?
I want to use XT1 as the source for TIMER_A
What is the role of the code colored in Red ?
MCLK can be one of the internal clocks.
**Attention** This is a public forum