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.

MSP432E401Y: clock frequency setting

Part Number: MSP432E401Y
Other Parts Discussed in Thread: SYSCONFIG,

Hello Team,

I am using MSP432E401Y controller in My new project and I am Using external crystal 16 Mhz. for configuration GPIO I am using Sysconfig file of MSP432E401Y Launchpad, but launchpad working on 25Mhz therefor my sleep function not generate proper delay of 1 sec, could you tell me how to configure clock of 16 Mhz using syscfg file.

  • Hi,

      I will suggest you import a simple MSP432E example such as timers from CCS Resource Explorer. See below. In this example it configures the timer for an 1 second delay. 

      If you look at the source file timers.c on  how the clock is configured, the MAP_SysCtlClockFreqSet returns the current frequency of the clock to the variable g_ui32SysClock . The example is based on 25Mhz for the crystal but once the clock is configured, the returned value is 120000000 for 120Mhz System clock. If you were to replace the SYSCTL_XTAL_25MHZ with SYSCTL_XTAL_16MHZ, the returned value would have been the same since you specify the final System clock frequency for 120Mhz. 

    g_ui32SysClock = MAP_SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ |
    SYSCTL_CFG_VCO_480), 120000000);

    If you want to create a simple software delay of 1 second you can use the below API. The reason to divide by 3 is because it takes 3 cycles to execute the SysCtlDelay function. 

    SysCtlDelay(g_ui32SysClock / 3);