Tip:
Highlight text to annotate it
X
Welcome to this tutorial for the LPC Initialization tool from NXP. In this tutorial
we're going to use the tool to configure pinmuxing for an LPC 812.
LPC initializer is web-based, so we'll start by going to lpcware.com .
From here we'll choose the LPC 800 page and we
scroll down to the software and hardware tools
section and then click on LPC initializer. Then the tool loads and to make best
use of your screen space you can click on the full screen button.
If you want to get it back at anytime you can
just click restore.
In this first view you can choose the package you want to configure. We're going
to be choosing
the FDH20 variant. Once we've chosen our package we're
presented with the workspace view - notice the context-sensitive help
in the right hand half of the page. This workspace you
allows us to easily configure the connections between the pins
and the different peripherals using the switch matrix. We're going to set it up
to match the LPCXpresso board. First we select the element you want to
configure, in this case we're going to configure the
SYSTEM.
We connect the input to the oscillator to pin 14 by clicking on the signal name.
Notice that all pins except for pin 14 are grayed out as pin 14
is the only valid selection for this signal,
so we click on it to make connection. Note that the name beside the pin changes to
reflect the connection we've created. Next we connect the output
from the oscillator amplifier to pin 13.
Next we move on to configure the SPI peripheral
just select SPI0 from the drop-down list
and the representation of the peripheral inside the chip
is change showing us all the signals we can connect from the SPI peripheral.
We want to connect the MOSI to pin 20 so we can click on the green box corresponding
to MOSI and then on to pin 20. But we realize
we've connected the MISO instead of the MOSI so
we need to undo it and we can do that by clicking the X next to the signal name
on the pin and that will reset the pin back to its default.
Note that we can also click the pin first and then the signal we want to connect
- so the MOSI in this case.
We're going to go ahead and connect up the rest of
the SPI signals. You're also going to
notice that in addition to having the X next to
non-default pins, non-default pins are a slightly darker shade of green.
We've now configured the other SPI signals and we are going to move on to configuring
the UART in exactly the same way. So we are
selecting a signal and then choosing the pin that it corresponds to.
The switch matrix on the LPC800 provides us with a great deal of
flexibility, allowing us to connect almost
any signal to almost any pin. Notice that the power pins
are always grayed out and can't be selected. Next we can set up the I2C,
and we're pretty much finished configuring the switch matrix
for the 812 Xpresso board. Let's have a look now at the other
tabs at the bottom of the page. Here we've
selected the pin list. For every pin we get to see
the function name assigned to it and the description of that function.
The next tab is the function list. This view is useful for making sure
that you've assigned all the functions you wanted to to a pin.
Functions which are assigned to no pin will have NULL in the pin column,
otherwise it'll give you their pin number. Here we can see, for instance,
that we have assigned all the SPI functions and we haven't missed any out.
We can also see that we haven't accidentally assigned something over the
reset pin and that we've got all of the UART
connections that we need as well.
The next tab contains the switch matrix
source code. Here the functions that we've mapped to
the pins using the workspace view are converted
to the register settings to configure the switch matrix.
You can copy and paste this code directly into your workspace
or download the zip file containing this entire source file.
You can also choose between the CMSIS libraries and the LPC Open
libraries. The IO Config tab allows you to
configure the electrical properties of the pins. Choose a pin corresponding to
its GPIO name and then click on the triangle to show
the settings available for it. Each setting has a drop down menu
containing all of the valid options for that setting. The code
corresponding to these settings can be found in the iocon.c.
Again we have the option of choosing which library we want it to be configured for.
And now that we've configured everything we can hit the download
to get a zip file containing all the source code. You get offered
two links - one for each library - just click on
the link for the library that you're using and it should
start to download. You can then hit done. Note that your design isn't saved to the cloud.
Inside the archives there's a configuration file
with a .nxp extension. This can be used to reload your design
if you need to edit it at a later date. You can also just download this
configuration file by pressing the Save button and clicking
on the link. Click on the New button to create a new
configuration. Your current configuration will be
lost - ensure that you've downloaded the zip file or the
configuration file before clicking new. To reload a configuration file you've
previously downloaded just hit to load button. This will
overwrite any previous configuration, so you're warned
about that, and then hit browse
and find your file and hit OK once you're done. Your previous
configuration will be loaded up for you. Thanks for watching this tutorial on the
LPC initialization tool from NXP. I hope you've found it useful.
Use the tool to configure the pinmux and IOCON in your project by visiting
lpcware.com or by following the links below
let us know what you think of the tool in the LPCWare forums.