The development environment of the NXP microcontroller(MCU) has been redesigned recently.
The development environment of LPC and Kinetis which are the MCU of NXP and former Freescale are integrated and finally became the form.
Configuration tools and SDK builders that can graphically configure the clock and pin assignment using GUI, and development integrated environment (IDE) that can be used without license fee are prepared. In addition, tools like you can simulate power consumption are also provided.
Since IDE can be used free of charge without restriction on code size limit, it can be used from hobby user to enterprise development purpose and the range is wide. However, the trace function seems to be supported by MCUXpresso IDE pro (charged).
Let’s see how to use the MCUXpresso Clock Tool this time.
Contents
- 1 TUTORIAL : MCUXpresso Config tool
- 1.1 Things to do in Config tool
- 1.2 First, the points are…
- 1.3 Advance preparation
- 1.4 Launch Config Tool
- 1.5 Basic operation
- 1.6 Global setting
- 1.7 Automatic calculation from clock source to peripheral module
- 1.8 Check out the clock tree, and select clock path
- 1.9 Register settings can be reviewed after the all settings have done
- 1.10 Automatically the source code generation
- 2 Summarize
TUTORIAL : MCUXpresso Config tool
Things to do in Config tool
The MCUXpresso Config tool allows you to specify the pin function (multiplex) setting and pin assignment to be used. It is also a tool that makes it easy to configure the clock configuration by GUI setting.
You can set clocks and pins with Config Tool.
And after that you select the OS and middleware of the device with using MCUXpresso SDK, and automatically generate your own SDK using SDK Builder.
You can make your own project based on the SDK and the configuration of pins and clocks you have set in config tool.
There are two types of environments of MCUXpresso Config Tool, Web-based and a desktop version to be installed on PC. So you can download the application or work on the cloud environment anywhere.
This time the desktop version of MacOS to be used to explain how to use it, but basically it is the same as the other desktop versions (Windows version / Linux version) and web-based version.
It can be downloaded from here. (NXP MCUXpresso Config tool – Download link)
Well, let’s go.
First, the points are…
In Config tool,
- SDK installation required beforehand
- Launching Config Tool
- Basic operation is a single click and double-click
- Global settings
- Automatic calculation from clock source to peripheral module
- Check clock tree, select clock
- Register settings can be reviewed after the all settings have done
- Automatically the source code can be generated for your own clock configuration
Advance preparation
Before launching Clock Tool, it is necessary to download the SDK of the MCU to be used and generate SDK using MCUXpresso SDK in advance.
About the setting and downloading of the SDK, It is posted in another article, please refer to it. (Tutorial of MCUXpresso SDK)
Launch Config Tool
When launching Clock Tool, you will see a screen to set the folder’s path to the SDK. The SDK can be saved in anywhere you want.
Specify the saved SDK folder path.
Specify Create new configuration and click Next.
Since this time we will use FRDM-K64F, select “New FRDM-K64F configuration” and click Finish.
The main screen of Config Tool opens here.
Click “Tool – Clocks” in the menu bar to open the clock setting screen.

Basic operation
On each clock setting element in the clock table (Clock Table tab) and clock diagram (Clock Diagram tab) view,
1)Move the cursor over the clock element
As you move the cursor over that clock element, the configuration hint for that element is displayed.
2)Single-click
The setting value or pull-down menu for that setting element is displayed.
3)Double-click
The pop-up window of the setting element is displayed.
The following icons may be displayed when setting.
LOCK :
When the clock frequency is specified, it is automatically calculated by the tool, but you may want some items be locked so as not to calculate automatically. To lock it, you can lock it by double clicking the Lock column at the item you want to lock. Or, the item will be locked right after you modified a value.
INVALID VALUE :
If you entered beyond the input range, an error occurs. Recommended values are displayed in key brackets [].
LATEST(RECENTLY) CHANGED :
When it is modified and changed automatically, highlights the changes with a yellow background.
Global setting
You can have multiple clock settings. For example, it is possible to have multiple configurations as multiple frequency clock modes.
First, set the RUN mode and MCG mode as shown below.
RUN (normal operation) and VLPR (Very Low Power RUN) mode are available for K64 operation modes. In the MCG mode, you can specify the frequencies and select clock sources.
This time we will use PEE mode (using external clock source and using PLL).
The clock configuration is already preset as default in the RUN mode and VLPR mode. To create your own configurations, you can add it by pressing the “+” button on the right side of the tab.
Automatic calculation from clock source to peripheral module
The Clock tool has a Clock Table and a Clock Diagram tab.
All you have to set frequencies are only a clock source and the target output clock for core, system, bus or Flash and so on. If the clock source and the output clock is specified, the rest of things are calculated automatically such as PLL dividers or so.
In the Clock table (Clock Table), set the target frequency to be used on the board. Check the box of “Available” if e,g, an external clock source presence, or uncheck if it is absence.
Set the target frequency of each clock source or the clock output. To change, click and enter the value with unit (e,g, MHz).
In this example, since FRDM – K64F is used, OSC external reference clock is used and set to 50MHz. Or, it is already set 50MHz as default.

Changing the frequency of the output clock (Core, system, bus etc.) automatically calculates and sets the proper clock frequency from the clock source frequency you set.
When using an external crystal oscillator for OSC, set the frequency range and OSC mode to External crystal you are using (Low Power or High gain: It could be affected to start time, power consumption, stability, normally set to “Low power” setting).
Check out the clock tree, and select clock path
In the “Clock Diagram” tab, it is possible to see the clock tree (clock path and clock supply output to each module) how it is like .
In addition, it is possible to select by selecting each clock source (multiplex setting). In the figure below, PLLS (selection of PLL or FLL output) is shown.
Register settings can be reviewed after the all settings have done
It is also possible to check the actual register setting value as to how the set contents are reflected on the actual device.
It is shown by clicking “View-Register” in the menu bar.
Automatically the source code generation
By setting up to this point, you just click and generate the source code.
You can check the source code (clock_config.c, clock_config.h) by clicking “View-Sources” in the menu bar, and it shows up the source code view window on the right side.
In MCUXpresso Config tool, the source code generation is supported and converts your own configurations into a source code.
You just click the button placed at right upper corner of the Source code view window. You can see it in the below picture.
Summarize
As a workflow, prepare the global setting (clock configuration), and set the clock source and the target clock.
In the clock diagram, check the clock path. It is also possible to determine the route of the clock path to the target circuit block by clock-selecting (multiplexing).
Depending on the input clock source and the target clock output, it automatically calculates the other clocks and settings.
It is possible to check the register value of the actual microcomputer to be set.
Furthermore, it is possible to automatically generate the source code of your own configurations.
This is just Tutorial of MCUXpresso. So, you can do more than this.
I would be pleased if this helps your development even a bit.
First of all, please download it and just use it!
Thank you very much for your reading to the end.
If you think this article is good, please share it!