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.

MSP430F5529: Enable REFCLOCK

Part Number: MSP430F5529


Hi 

Iam trying to enable the Refclock by disabling the XT1 and XT2. The following is the function i have used for it.

Here Iam having doubt like, if the refclock is enabled and XT1 is disabled. Then the MCU will operate with the 16Mhz which have been enabled by REFO. Is my understanding right? Also XT1 is connected to 32678Hz crystal and XT2 is to connect any crystal between 4-32Mhz. In that case does REFO also connected to the same crystal connected which is connected to XT1 or is that a different crystal. Iam bit confused here. Kindly guide me over this

Regards

Kokila K

  • Hi Kokila,

    Sorry for the delay in my response.

    After power on and before XT1 is enabled, REFO is typically selected as the default clock source for the FLL, which I see you are doing in your code.  REFO clock does not connect to XT1.  It is an internal 32kHz clock that does not require a crystal.  Does this help answer your question?

  • Hi Dennis

    Thanks for the reply.

    Yeah, i now understood.

    Now consider this scenario where iam operating my MCU with 24Mhz Xt2 crystal. On run time iam turning off the XT2. In this case XT2OFG will set or not. when i observed this flag is not set. UCSCTL7 register was in its default state itself. When turned off also the MCU was working fine. couldn't understand it how?

  • Good question.

    If you disable (turn off) XT2, XT2OFG will not be set.

    But if XT2 is enabled and fails (does not start or stops running), then XT2OFG will be set.

    Does this answer your question?

  • Yeah, Thanks a lot. So regarding the working of MCU. If I turned off the XT2, then its working on REF clock right? or Am i wrong?

  • Hi Kokila,

    Yes, you are correct, provided you select the REFO clock as the clock source described in the bullet points in previous posting.  My recommendation is set it up as the ACLK and the DCO ref clock.

**Attention** This is a public forum