Switching Processor Package in Processor Expert

When I create a new project for the KL05Z with Processor Expert, then it shows up as 48 pin LQFP package in the project:

48pin LQFP Package in Components View

48pin LQFP Package in Components View

However, when I look at my board, it has a KL05Z32 in a LQFP package with 32 pins:

FRDM-KL05Z Board

FRDM-KL05Z Board

Looking at the Processor View, it shows me the package as with 48 pins too:

48pin LQFP Package in Processor View

48pin LQFP Package in Processor View

So how can I change things so Processor Expert is using a different package?

Note: I’m using here the CodeWarrior for MCU10.3 release from December 2013. See the note at the end if you are using a different version of CodeWarrior.

Why do I care about the package? In many cases, different packages contain the same silicon (die), but depending on the package some pins are not bonded to the outside. So it makes sense to select the proper package, so Processor Expert knows what pins and registers are available.

The first place to check if I can switch the package would be in the CPU component properties, but in MCU10.3 I only can check the FLASH size variant (16 KByte or 32 KByte), but not the package:

CPU Type in CPU Properties

CPU Type in CPU Properties

The next place would be the list of supported CPUs in the Components Library view:

KL05Z32 in Components Library View

KL05Z32 in Components Library View

The trick here is: that tooltip actually does not tell everything: there *are* different packages supported beside of the one shown. And here is how to get it:

I double click on the CPU component to add it to my project. This will open a dialog where I can select the package supported, and here it lists all the packages:

Add Processor Component Wizard

Add Processor Component Wizard

Pressing next, and it offers me to select the compiler:

Selecting Compiler

Selecting Compiler

Now here I need to be careful: for the Kinetis-L family, only GNU gcc is supported. So I better select GNU C Compiler here. But if I screwed up, I can change it in the CPU component properties under the ‘Build options’ tab:

Changing Compiler in CPU Properties

Changing Compiler in CPU Properties

Now I have added a KL05Z in 32-pin LQFP package to my project:

KL05Z with 32pin LQFP Package

KL05Z with 32pin LQFP Package

The other CPU package/variant is still in the project, but disabled. If I want, I can switch  between the packaging variants. But usually I remove the ones I’m not using:

Removing Component from Project

Removing Component from Project

I do the same for the orphaned configuration:

Delete Configuration

Delete Configuration

And if I rename the remaining configuration back to FLASH, I have it nice and clean:

Cleaned up Project

Cleaned up Project

And a last look at the picture in the Processor View shows me that I have now the 32 pin package :-):

KL05Z with 32 pins in Processor View

KL05Z with 32 pins in Processor View

Summary

Changing the processor package is important as not every package has all the registers/ports mapped to the outside world. Processor Expert creates you a project with maybe a widely used package, and it is easy to change the package type later in the project (if I know how to do it :-). Changing or switching packages is important as well if I develop a project which has to be used with different packaging variants.

Update

While writing this article, I had a sneak preview of the upcoming update of MCU10.3. In that update things are changed a lbit to make things easier. For example, the tooltip in the Components Library view shows now all supported packages:

Tooltip showing all packages

Tooltip showing all packages

And I can switch the CPU package in the CPU properties directly:

Switching Packages in the CPU Type

Switching Packages in the CPU Type

Happy Packaging 🙂

3 thoughts on “Switching Processor Package in Processor Expert

  1. Nice to read this. I took me a while to figure this out on my own. BTW, do you have any idea how I could reach at least 32MHz from internal/external clock on the board?
    Thanks

    Like

  2. Pingback: Switching Processor Package – Simplified in MCU10.4 | MCU on Eclipse

What do you think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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