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.

CCS/MSP432P401R: Setting INCLK clock source problem in MSP432

Part Number: MSP432P401R

Tool/software: Code Composer Studio

Hello

I have a following problem : when i try to use pin oscillator with conjunction with pwm then nothing happen on pwm output

Timer_A_PWMConfig pwm1 = {0};
    pwm1.clockSource = TIMER_A_CLOCKSOURCE_INVERTED_EXTERNAL_TXCLK; // when i put here SMCLK or ACLK all work fine 
    pwm1.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_64;
    pwm1.compareRegister=TIMER_A_CAPTURECOMPARE_REGISTER_1;
    pwm1.compareOutputMode=TIMER_A_OUTPUTMODE_TOGGLE;

    P3REN |= 1<<7;  // pu&pd
    P3SELC |= 1<<7; // additional port function
    CAPTIO0->CTL |= 3<<4 | 7<<1 | 1<<8; //captio function

    GPIO_setAsPeripheralModuleFunctionOutputPin(GPIO_PORT_P2, GPIO_PIN4, GPIO_PRIMARY_MODULE_FUNCTION); // p2.4 as pwm

printf("timer period (write below) ? \n");

    while(1)
    {
       
        if (scanf("%d",&max)) {   // if something entered then do
            pwm1.timerPeriod=max;
            pwm1.dutyCycle=pwm1.timerPeriod/2;
            
            Timer_A_generatePWM(TIMER_A0_BASE, &pwm1);
            printf("timer period equals now %d and duty %d \n",max,pwm1.dutyCycle);
            printf("timer period (write below) ? \n");
        }


    }

Please understand that this code is incomplete just essence.

I have noticed that during debugging clock source of TIMERA0 is different from what i have programmed. Simply don't understand. So how can i run this code?

**Attention** This is a public forum