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.

MSP432E411Y: How do I change the core clock frequency

Part Number: MSP432E411Y

I'm using an MSP432P411V, not the E part.  To reduce power consumption, I want to run the CPU at a rate slower than the default 48MHz - perhaps 24 MHz or even 14MHz.  How do I do this?

  • As far as I know, the P411x series (like the P401R) start up with MCLK=DCO=3MHz (DCORSEL=1).

  • I needed to change initialPerfLevel

    PowerMSP432_PerfLevel myPerfLevels[] =
    {
       {
          .activeState = PCM_AM_DCDC_VCORE0,
          .VCORE = 0,
          .clockSource = CS_DCOCLK_SELECT,
          .DCORESEL = CS_DCO_TUNE_FREQ,
          .tuneFreqDCO = 8000000,
          .SELM = CS_DCOCLK_SELECT,
          .DIVM = CS_CLOCK_DIVIDER_1,
          .SELS = CS_DCOCLK_SELECT,
          .DIVHS = CS_CLOCK_DIVIDER_1,
          .DIVS = CS_CLOCK_DIVIDER_1,
          .SELB = CS_REFOCLK_SELECT,
          .SELA = CS_REFOCLK_SELECT,
          .DIVA = CS_CLOCK_DIVIDER_1,
          .flashWaitStates = 0,
          .enableFlashBuffer = true,
          .MCLK = 8000000,
          .HSMCLK = 8000000,
          .SMCLK = 8000000,
          .BCLK = 32768,
          .ACLK = 32768,
       }
    };

    #if 1
    const PowerMSP432_ConfigV1 PowerMSP432_config = {
        .policyInitFxn = &PowerMSP432_initPolicy,
        .policyFxn = &PowerMSP432_deepSleepPolicy,
        .initialPerfLevel = 4,
        .enablePolicy = true,
        .enablePerf = true,
        .enableParking = true,
        .customPerfLevels = myPerfLevels,
        .numCustom = sizeof(myPerfLevels) / sizeof(PowerMSP432_PerfLevel),
        .useExtendedPerf = true,
        .enableInterruptsCS = true,
        .priorityInterruptsCS = ~0,
        .isrCS = 0,
    };

    #else

    const PowerMSP432_ConfigV1 PowerMSP432_config =
    {
       .policyInitFxn = &PowerMSP432_initPolicy,
       .policyFxn = &PowerMSP432_deepSleepPolicy,
       .initialPerfLevel = 0,
       .enablePolicy = true,
       .enablePerf = true,
       .enableParking = true
    };
    #endif