Switch Matrix and generated file Help

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Switch Matrix and generated file Help

985 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by zbandit20 on Sun Feb 09 14:29:42 MST 2014
Hello Friends,

I'm just starting to learn to develop on LPC812 using the LPXpresso board.  I tried to configure SPI on different pins using the Web based Switch Matrix. Two or there files were generated.

My question is what do I need to do with the files that were generated?.

Is there any step by step tutorial on what needs to be done after one configures the pins using Switch Matrix.  Any help will be appreciated.  Thank you.

Siva.
Labels (1)
0 Kudos
Reply
1 Reply

943 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by JoeHale on Mon Feb 10 08:02:00 MST 2014
Hi Siva,

Once you have configured your part in the web based pinmux tool you can hit the download button.

You get a choice of two versions: CMSIS and LPCOpen. These use different libraries to apply your configuration. If you are starting a project from scratch I'd recommend that you use the LPCOpen libraries.

The zip bundle contains three files:
[list]
  [*] LPC810xxxxxx.nxp - the file is just for the web based tool - you can upload to the tool using the Load button in case you want to edit your configuration later
  [*] iocon.c - contains a single function IOCON_Init() that configures the IOCON block
  [*] swm.c - contains a single function SwitchMatrix_Init() that configures the switch matrix.
[/list]

To use these files in LPCXpresso IDE you need to
[list=1]
  [*]import the LPCOpen Library into your workspace (see up to Building the libraries in the LPCOpen 2 QuickStart guide)
  [*]create a new LPCOpen based project for the LPC800
  [*]copy the iocon.c and swm.c files into the src folder of your new project
  [*]optionally you can also copy in the .nxp file so you can find it later - it is ignored by the compiler
  [*]In the main() function of main.c  add the following calls after the call to Board_Init()
IOCON_Init();
SwitchMatrix_Init();

[/list]

Hope that helps.
0 Kudos
Reply