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_initClockSignal( UCS_FLLREF, UCS_REFOCLK_SELECT, UCS_CLOCK_DIVIDER_1); UCS_initClockSignal( UCS_ACLK, UCS_REFOCLK_SELECT, UCS_CLOCK_DIVIDER_1); UCS_initFLLSettle( 16000000/1000, 16000000/32768);
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: