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.

MSP-TS430PZ5X100: How to Setting External XT1?

Part Number: MSP-TS430PZ5X100
Other Parts Discussed in Thread: MSP430F5438A

Hi~

I want to use external clock XT1 on TS430PZ5X100.

The XT1 is 32,768Hz. 

I was setting XT1. But My code didn't work. What's the problems in my code?

First, This is problem

Second, This is my code.

1. Setting XIN, XOUT  (XT1)

GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P7, GPIO_PIN0);
GPIO_setAsPeripheralModuleFunctionOutputPin(GPIO_PORT_P7, GPIO_PIN1);
GPIO_setAsInputPinWithPullUpResistor(GPIO_PORT_P7, GPIO_PIN0);

2. Setting Turn ON(XT1DRIVE, XCAP), BYPASS.

void initClock(void)
{
//Configure Core
PMM_setVCore(PMMCOREV_3);

UCS_setExternalClockSource(XT1CLKHZ, XT2CLKHZ);
UCS_turnOnLFXT1(XT1DRIVE_0, XCAP_3);
UCS_bypassXT1(UCS_XT1_LOW_FREQUENCY);

UCS_initClockSignal(UCS_ACLK, UCS_XT1CLK_SELECT, UCS_CLOCK_DIVIDER_1);

UCS_initClockSignal(UCS_FLLREF, UCS_XT1CLK_SELECT, UCS_CLOCK_DIVIDER_1);
UCS_initFLLSettle(MCLKDESIREDKHZ, MCLKXT1CLKRATIO);
}

  • Hi Dahun Kim

    May I know which part number of MCU you are using?

    it is strange that all UCSCTLx register is unable to read.

    Could you please download the simple code example on the product page and check if you can debug (for example, step in or set breakpoint) on ccs IDE debug system?

    Thanks!

  • Hi Xiaodong LI

    My MCU is MSP430F5438A. But I could solve my problem.

    Because Your Suggestion helped me.

    I saw simple code example in CCS IDE. And then I compared my code with example code.

    As a result, I could solve my problem.

    Thank you for helping me.

**Attention** This is a public forum