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.