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.

MSP430F5510: Need help confirming FLL frequency is correct

Part Number: MSP430F5510

We are using driverlib to program the UCS and Timer1_A3 to generate a PWM output. We are expecting a PWM period of 200uS, but when we check the PWM frequency with an oscilloscope we measure 100uS. This suggests that the timer is being clocked twice as fast as we expect can you please check the driverlib calls below. If these seem correct, please let me know if there is a way to observe SMCLK at a pin to verify its frequency.

UCS Setup Code:




UCS Registers from CCS:

PWM Setup Code:

    Timer_A_outputPWMParam initPwmParam = {0};
    initPwmParam.clockSource = TIMER_A_CLOCKSOURCE_SMCLK; 
    initPwmParam.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
    initPwmParam.compareOutputMode = TIMER_A_OUTPUTMODE_RESET_SET;
    initPwmParam.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_1;
    initPwmParam.dutyCycle = 1600U; //default to 50% duty cycle
    initPwmParam.timerPeriod = 3200U; //200uS

    Timer_A_outputPWM(TIMER_A1_BASE, &initPwmParam);

TimerA1 Registers from CCS:

  • I see that SMCLK can be brought out on P2.2 which is not available on our design but IS available on the RGC evaluation kit. We will measure this with a scope tomorrow to help narrow down the problem. Please do let us know if we have used the listed driverlib functions incorrectly.

  • Hi

    It seems ok with the library and I have checked the register. You can check the SMCLK waveform.

  • I configured P2.2 as SMCLK on the evaluation board and I am measuring 32MHz which explains why the timer period is wrong. Now the question is why is my driverlib configuration of UCS not programming the DCO to 16MHz? Please help.

  • Ok I have resolved this problem. The doubling of the DCO clock frequency was caused by a later call to USB_setup(), after the UCS was configured. To eliminate the problem I reversed the order of these operations such that I first call USB_setup() and next I call the UCS driverlib calls. I didn't see anything in the USB library programmers guide about this dependency so I'm posting this here incase anyone else runs into a similar problem.

**Attention** This is a public forum