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.

SIMPLELINK-MSP432-SDK: PWM frequency inaccuracy in timer_a_pwm_mode driverlib

Part Number: SIMPLELINK-MSP432-SDK
Other Parts Discussed in Thread: MSP430FR5994, IWR1443, TIDEP-0091

We use timer_a_pwm_mode in driverlib simplelink_msp432p4_sdk_3_40_01_02 to do the testing。

We use 

CS_setDCOCenteredFrequency(CS_DCO_FREQUENCY_12);

delete

//MAP_CS_setReferenceOscillatorFrequency(CS_REFO_128KHZ);
// MAP_CS_initClockSignal(CS_MCLK, CS_REFOCLK_SELECT, CS_CLOCK_DIVIDER_1);
//MAP_CS_initClockSignal(CS_SMCLK, CS_REFOCLK_SELECT, CS_CLOCK_DIVIDER_2);
//MAP_PCM_setPowerState(PCM_AM_LF_VCORE0);

We modify the pwmConfig as follows:

Timer_A_PWMConfig pwmConfig =
{
TIMER_A_CLOCKSOURCE_SMCLK,
TIMER_A_CLOCKSOURCE_DIVIDER_4,
3000000/1000-1,
TIMER_A_CAPTURECOMPARE_REGISTER_1,
TIMER_A_OUTPUTMODE_RESET_SET,
3000000/1000/2
};

The PWM at P2.4 should be 1000Hz, but we get 1004Hz. Please help us.

timer_a_pwm_mode_MSP_EXP432P401R_nortos_ccs.zip