Dear all,
I'm trying to write a frequency output on my P1.4 pin on the MSP430F529, with the following code :
#define TIMER_PERIOD 511
#define DUTY_CYCLE 350
void main(void)
{
//Stop WDT
WDT_A_hold(WDT_A_BASE);
//P1.4 as PWM output
GPIO_setAsPeripheralModuleFunctionOutputPin(
GPIO_PORT_P1,
GPIO_PIN4
);
//Generate PWM - Timer runs in Up mode
TIMER_A_outputPWMParam param = {0};
param.clockSource = TIMER_A_CLOCKSOURCE_SMCLK;
param.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
param.timerPeriod = TIMER_PERIOD;
param.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_1;
param.compareOutputMode = TIMER_A_OUTPUTMODE_RESET_SET;
param.dutyCycle = DUTY_CYCLE;
TIMER_A_outputPWM(TIMER_A1_BASE, ¶m);
//Enter LPM0
__bis_SR_register(LPM0_bits);
//For debugger
__no_operation();
}
Using the code with pin 2.0, works pretty well, but with pin 1.4 we have no signal. Looking at the datasheet, should work.
Could you please help me?
Thank you in advance
ip