NXP MCUXpresso Software and Tools with Clocks Tool

About a year ago, on December 7th 2015, Freescale and NXP have announced the completion of their merger.  Now it is Qualcomm which wants to acquire NXP? It looks like these mergers are happening faster and faster. The reality is that merging products take more time than anticipated, and nearly one year later I can see the outcome of what comes out of the marriage between Freescale and NXP or between Kinetis and LPC: NXP has announced the MCUXpresso software and tools for Kinetis and LPC microcontroller:

Introducing MCUXpresso

Introducing MCUXpresso (Source: NXP video)

MCUXpresso Software and Tools

The MCUXpresso suite of software and tools (see http://www.nxp.com/mcuxpresso) is targeting Kinetis and LPC microcontroller. It has three parts:

  • MCUXpresso IDE: From the set of features and capabilities it looks like a combination of the former Freescale Kinetis Design Studio and the NXP LPCXpresso IDE. I have used the LPCXpresso IDE with Processor Expert for several projects (see “Merging NXP LPCXpresso IDE with Freescale Kinetis Design Studio, Processor Expert and Kinetis SDK“). There is no word about Processor Expert, so based on that information the new IDE will not have that ability. From a Kinetis Design Studio user perspective it finally re-adds hardware trace and multicore capabilities, from a LPCXpresso user perspective it adds unlimited code size. I’m looking forward to that Eclipse based IDE which is supposed to be released March next year. With this looks like the one and common Eclipse based IDE for all NXP microcontroller.
  • MCUXpresso SDK: This is basically the Kinetis SDK V2 (see “First NXP Kinetis SDK Release: SDK V2.0 with Online On-Demand Package Builder“), re-branded and now finally targeting LPC devices in addition to Kinetis. With this, that SDK is getting the standard for all NXP microcontroller. Before using a device, make sure to check the list of supported devices at https://community.nxp.com/docs/DOC-333073.
  • MCUXpresso Config Tools: This is now going to be re-branded what Freescale had as ‘Kinetis Expert Tools’ (see “Tutorial: Muxing with the New NXP Pins Tool“). These set of tools are supposed to be the set of tools after Processor Expert which already had a SDK builder and a pin muxing tool. With the announcement of the MCUXpresso brand, NXP has added and released a tool for system clock configuration (more about this below). The clocks tool is part of the version 2 of the configuration tools (version 1 included the pins tool only).

    MCUXpresso Config Tools

    MCUXpresso Config Tools (Source: NXP web site)

Because the V2 version of the configuration tools is the real new thing, here are some items I think are worth to mention (more details are in the release notes):

New in V2

As noted in the about box, the ‘Kinetis Expert Version 2.0’ includes two tools (icons): Pins and Clocks:

Version 2

Version 2

In the Pins Tool there are now two extra columns with ‘Label’ and ‘Identifier’: with the label I can give the pin a description label, and with the identifier I can name #define’s which are generated in the source code:

Pins with Labels and Identifiers

Pins with Labels and Identifiers

Using the define in my application code I can use a symbolic way to use the pin port/pin/label/etc now.

The Pins (and Clocks) tool are downloading the needed data from the internet on demand. Now it is possible to specify and download the data on demand: I use the menu File > Export and I have a menu to download the data:

Exporting Data

Exporting Data

Then I can select the data files for the selected architectures:

Download Data Files

Download Data Files

That way I can get the data before I have to disconnect from the network. Or to download upfront all the data needed for class labs instead having all the students to get the data.

I can now export a configuration as template with the menu File > Export:

Export Configuration as Template

Export Configuration as Template

This creates a template I can use to create new projects which is useful for passing templates in classes for labs:

New Project based on Template

New Project based on Template

As an added bonus, it is now possible to import the Processor Expert for i.MX Pin Muxing files. I had a configuration for a i.MX device which never ended up in a project, so now I can migrate that work it to the new pins tool.

New: Clocks Tool

The big new plus is the Clocks Tool. I can switch between the Pins and Clocks tool using a menu:

Clocks Tool

Clocks Tool

Similar to the Pins tool I can configure now the system clocks of the microcontroller. The real cool part is a graphical view of the clock tree:

Clocks Tool User Interface

Clocks Tool User Interface

In the upper part of the view I get the details (e.g. which clocks are enabled), and in the graphical view on the bottom I can follow and edit the settings of the clock path. The functionality is about the same what I’m using in the Processor Expert CPU component and the clock settings there (so it is about the core clock and the clock outputs to the peripherals, not about e.g. the prescalers inside the UART peripheral).

The tool tries to find the best match, and I can lock or unlock settings in the clocks:

Lock and Unlock Clock Settings

Lock and Unlock Clock Settings

I still need to have a fundamental understanding of the clocking of the device, but that graphical view makes it easier to understand the blocks and how they depend on each other:

Changing Clock Divider

Changing Clock Divider

The generated configuration code is for the Kinetis (sorry: now MCUXpresso) SDK V2. To use it in a Kinetis Design Studio project, the files can be put into a SDK project like below:

Configuration Files in Kinetis Design Studio

Configuration Files in Kinetis Design Studio

Because they are normal source/text files, I can have them in a version control system without any problems. I put the .mex file under version control only for convenience, as I can import the .c files as they already contain all the needed information.

Summary

NXP shows with the MCUXpresso software and tools that they are combining the Kinetis and LPC ARM microcontroller software enablement and tools under one umbrella. But this applies to the non-automotive parts (see https://community.nxp.com/docs/DOC-333073): the automotive parts in NXP have their own IDE (S32 Design Studio) and a special SDK. It will be interesting if that will continue or eventually get merged too.

The V2 release of the configuration tools adds the clocks tool which closes the gap left in the SDK version 2. There are more things scheduled to come in 2017 (see http://www.nxp.com/products/software-and-tools/run-time-software/mcuxpresso-software-and-tools/mcuxpresso-config-tools:MCUXpresso-Config-Tools#overviewExpand):

configuration-tools-and-features

I’m looking forward especially to the Peripherals Tool and of course to the MCUXpresso IDE. I’m using now the Pins and Clocks tool together in several projects and plan to roll it out in the next semester course targeting Kinetis K22 and potentially a LPC device.

Happy Xpressing 🙂

Links

17 thoughts on “NXP MCUXpresso Software and Tools with Clocks Tool

  1. Thank you Erich! Any hope of the SDK actually supporting the KE0x micros? I for one, would just like NXP to leave the toolset alone long enough for me to complete a project. 🙂

    Like

    • Yes, change is one of the constants going on in the industry :-(. There is a table publised on https://community.nxp.com/docs/DOC-333073 which lists the KE0x devices as not supported and listed as ‘not planned’ as of today. And this is the reason why I have not used any KE0 devices for several university and research projects, even if they looked like a perfect fit: without the software and tools, they did not make any sense to be used. At least there is Processor Expert support for KE02.

      Liked by 1 person

  2. Great to see this progress and the results of the merge. I have several development boards for the LPC series that I may pull out of storage next year once their MCU’s are supported by MCUXpresso and the peripheral config tools. I just completed phase 1 development for a product range utilizing K64F, K24F and KL17 devices in what I would call “record time” thanks to the new tools and the Kinetis SDK.

    Like

  3. Erich, I was wondering what your thoughts were on a true replacement for Processor Expert ? When NXP dropped PE from KSDK v2, they indicated a replacement would be available sometime later in 2016. That didn’t happen but instead they’ve rolled out the clock tool and pins tool. I don’t get the feeling that they ever intend to offer a replacement for PE. Do you have any news you can share ?

    Like

    • Hi Geoff,
      I think things take longer than expected. With the MCUXpresso configuration tools announcement made a few months ago, there should be a peripheral tools available somewhere in 2017 which can be used to configure the device drivers. I think we have to wait and see how much this will cover what Processor Expert is able to do.

      Like

  4. Pingback: Embedded World Nürnberg 2017 Impressions: MCUXpresso, Hexiwear, NTAG, LPC800-DIP and Alan Hawse | MCU on Eclipse

  5. Pingback: Tutorial: Using Eclipse with NXP MCUXpresso SDK v2 and Processor Expert | MCU on Eclipse

  6. Hi,
    Just installed the offline version of the Config Tool, when used the first time it ask me for the location of the SDK directory, didn’t find any documentation of the Config Tool so i don’t know what it expects, should i indicate the location of the .zip file i download from the SDK Builder or should i unzip it first?

    Thanks in advance

    Like

  7. I thought I’d give the MCUXpresso tools a try with a simple project for my FRDM-KL46Z. Several of my existing KDS designs run at ~48MHz using FEI mode. With the MCUXpresso config tools I can’t seem to create this clock setting in FEI mode. The only options are 21 and 42MHz. It looks like the DMX32 bit in MCG_C4 needs to be set to enable the 24 and 48MHz clock options but I can’t find a way to do this in the new config tools. I tried both the desktop and online versions. Am I overlooking something?

    Like

  8. Hi Eric, thank you for the article. On the MK20DX256ZVLL10, and the MK60DN512VLL10 the clock generation tool with SDK2.2 is generating/using code in the fsl_clock.c
    status_t CLOCK_SetExternalRefClkConfig(mcg_oscsel_t oscsel)
    that accesses MCG->C7, however there is no MCG->C7 when then results in a hard fault. If I comment out the line
    //**rwl MCG->C7 = (MCG->C7 & ~MCG_C7_OSCSEL_MASK) | MCG_C7_OSCSEL(oscsel);
    there is no trap, but the system hangs at
    while ((MCG->S & (MCG_S_IREFST_MASK | MCG_S_CLKST_MASK)) !=
    (MCG_S_IREFST(kMCG_FllSrcExternal) | MCG_S_CLKST(kMCG_ClkOutStatExt)))
    {
    }

    Do you or anyone else know of a workaround, solution or any advice? This makes the system unusable. Any advice would be greatly appreciated. Thank you.

    Robert

    Like

  9. I found the problem and others might find this of help. The problem is the mask set we have is a pre-production version. The MK20DX256ZVLL10, is the pre-production version of the MK20DX256VLL10. Note the absence of the ‘Z’… it turns out that the MCG->C6, MCG->C7 registers where an add-on to the final mask set. Hence the bus-fault, trap, when accessed in the clock setup. Simply commenting out the code for that register (C7) allowed the system to function normally.

    Robert

    Like

  10. Pingback: Eclipse MCUXpresso IDE 10.1 with integrated MCUXpresso Configuration Tools | MCU on Eclipse

What do you think?

This site uses Akismet to reduce spam. Learn how your comment data is processed.