EmbeddedRelated.com
Forums

SMCLK vs. ACLK

Started by SoneR December 14, 2008
Hello,

I am using 430F2471 and I am getting the clock from a front end. While I am
working with SPI, if I use SMCLK instead of DCO or ACLK I cannot
communicate. I couldn't fix the problem... Now I am compulsorily using ACLK
but I want to use SMCLK. Can you please help me??

Thank you...

--
Soner Isiksal

Beginning Microcontrollers with the MSP430

What do you mean by "getting the clock from a front end"? Which
"clock"? What is a "front end"?

There are more than half a dozen of clocks in MSP430. If you are
talking about the clock that is used in the SPI interface, it is
called UCxCLK. This clock is an output from the SPI master and an
input to the SPI slave. Thus if you use the MSP430F2471 as a SPI
slave, then it gets UCxCLK from the SPI master, which is probably
external to the MSP430F2741. On the other hand, if you use the
MSP430F2741 as the SPI master, then you need to program it to generate
UCxCLK. In this case, you have two choices; you either derive it from
ACLK or from SMCLK. DCO is not one of the two options. However, SMCLK
can be derived from DCO.

You also need to pay attention to the frequency limits of UCxCLK
imposed by both the SPI master and SPI slave.

SMCLK is derived from (a) DCO generator, (b) XT2 oscillator controlled
by an external crystal, or (c) external clock connected to the XT2IN
pin. If not properly setup, you may have no SMCLK at all or end up
with a UCxCLK outside the frequency limits of the SPI devices.

--- In m..., SoneR wrote:
>
> Hello,
>
> I am using 430F2471 and I am getting the clock from a front end.
While I am
> working with SPI, if I use SMCLK instead of DCO or ACLK I cannot
> communicate. I couldn't fix the problem... Now I am compulsorily
using ACLK
> but I want to use SMCLK. Can you please help me??
>
> Thank you...
>
> --
> Soner Isiksal
>
>

Hi,

I mean I didn't connect the oscillator directly to the msp. I connect the
osc to another IC and I am getting clk from the sys_clk output pin of that
IC.

By the way, I have referred from your last paragraph that I can not use
SMCLK unless I use XT2. I am using not XT1. Does it change anything?

Thank you for your interest.

--
Soner Isal

> I mean I didn't connect the oscillator directly to the msp.
> I connect the osc to another IC and I am getting clk from
> the sys_clk output pin of that IC.

But which pin of the msp chip gets this signal?

> By the way, I have referred from your last paragraph that I
> can not use SMCLK unless I use XT2. I am using not XT1. Does
> it change anything?

SMCLK can be derived from any one of the following three sources:

1) from the DCO oscillator inside the msp chip

2) from the XT2 oscillator inside the msp chip but with the help of a
proper external crystal (and capacitors) connected to XT2IN and XT2OUT
pins.

3) from an external clock source connected to the XT2IN pin.
Hi again,

The information you have given was quite helpful for me to fix the problem.
I was using XT1 instead of XT2 and XT2 was not in use. After you warned me,
I also saw that info from the datasheet. Thanks..
--
Soner Isal