Welcome to MSPM0 Smart Robot Car repository
4.External crystal oscillator configuration
MSPM0 Clock Configuration
If MSPM0 uses the internal crystal oscillator, the maximum CPU clock frequency can only be set to (32MHz). We have added a 40MHz high-frequency clock on the board. In this section, we will configure the clock tree to make MSPM0 work at 80MHz clock frequency.
Copy the empty project from the SDK to the SDK path


Double-click empty.syscfg to open the file, then click on the sysconfig tool under tool in the toolbar

After opening the sysconfig tool, we enable the clock tree under SYSCTL



From the schematic, we can see that our crystal is connected to PA5 and PA6 pins

The configuration can refer to the figure below and can be modified according to your actual situation


After saving, we return to Keil and compile directly. We will see two errors, which are caused by incorrect header file paths.


We need to modify the relative paths of these two folders as shown below

After modification, we need to change the path of the sysconfig.bat file below as shown below
Compile again


Delete this part of the content

After compiling again, the following error is reported

We create a new ti folder in the project path, then copy all source files and header files from the driverlib directory in the SDK path to the ti folder as shown below


Then we need to enter this folder in the SDK directory: mspm0_sdk_2_02_00_05\source\ti\driverlib\m0p\sysctl and copy the two selected files below to the ti directory

As shown below

We create a new directory in the project to store these files. We name it Driverlib and then add all source files from the ti folder in the previous step to this directory


Compile again

At this point, our configuration is successful
