NXP LPC3200 CPU Support Package

This package contains project templates and system files for the NXP LPC3200.

CrossWorks Version 4 Installation Instructions

This package can only be installed if you have the following CrossWorks license bolt-ons:

To install this support package
  1. Click the Tools > Package Manager menu option to open the package manager window.
  2. Right click on the NXP LPC3200 CPU Support Package entry and select Install Selected Packages.
  3. Click Next to take you to the summary page.
  4. Click Next to install the package.
  5. Click Finish to close the package manager window.
  6. Click the Tools > Show Installed Packages.
  7. Click on the NXP LPC3200 CPU Support Package link to view the package and its contents.
To manually install this support package
  1. If you have not done so already, follow the CrossWorks Tasking Library Package installation instructions.
  2. Download the file LPC3200.hzq using your web browser.
  3. Click the Tools > Manually Install Packages menu option.
  4. Select the file you have just downloaded to install the package.
  5. Click the Tools > Show Installed Packages.
  6. Click on the NXP LPC3200 CPU Support Package link to view the package and its contents.
To install this support package using other versions

Release Notes

2.4

2.3

2.2

2.1

2.0

Documentation

Creating LPC3200 Projects

To create a new LPC3200 project

This will create a project that will run in the internal RAM (IRAM) of an LPC3200 board running from the main oscillator.

To build and debug an application

LPC3200 Project Specifics

Target Processor

Once a project has been created you can select different target processors from the selected set by right clicking on the project node in the project explorer and selecting the Target Processor entry.

Selecting the target processor will specify the memory map that is used for the build and debug. You can view the selected memory map by right clicking on the project node in the project explorer and selecting View Memory Map or View Memory Map (as text). In the memory map files the memory segments defining the names, sizes and access types of the external memories are specified using macros which can be set using the Memory Map Macros project property.

Section Placement

CrossStudio for ARM supports LPC3200 projects running applications in a number of different memory configurations. You can select the memory configuration you require by right clicking on the project node in the project explorer and selecting the Placement entry.

For LPC3200 projects the set of placements are:

Debug Handler

When you create a LPC3200 project a file is included in the build that implements additional (to JTAG) debug functionality. This file is used to:

The project setup code creates a debug project property Debug Handler that enables you to choose additional (to JTAG) debug capabilities you require:

Target Startup Code

The startup code LPC3200_Startup.s is common to all LPC3200 processors there are a set of preprocessor defines that configure the startup code and are documented in the startup file itself.

Target Reset Script

The reset scripts LPC3200_Target.js to stops the processor and turns off the MMU and caches in case the board has run a program.

LPC3200 NAND Flash Loader Files

The NAND flash loaders are board specific, however the files that are common to all NAND flash loaders are supplied in the LPC3200 CPU support package. The NAND flash loader works by shadowing code memory writes to the IRAM and SDRAM sections into the NAND flash. It also adds the secondary boot loader into the boot block of NAND flash.

Memory Simulator

An LPC3200 memory simulator is provided that simulates the memories of the various LPC3200 devices. The memory simulation parameter (which is set by the Target Processor selection) contains macros that determine the sizes of the simulated memories and can be specified using the Memory Simulation Parameter Macros property.

Interrupt Handling

The file LPC3200.c implements the ctl_set_isr, ctl_unmask_isr and ctl_mask_isr functions by programming the MIC, SIC1 and SIC2 register groups. The number parameter to these functions is as documented in the interrupt enable registers in LPC32x0 user manual with 32 added to the SIC1 interrupts and 64 added to the SIC2 interrupts. Each interrupt handler should be assigned a unique priority number which is supplied as the priority parameter to the ctl_set_isr function. The priority determines the order in which interrupt status registers are checked, lower numbers are checked first. There is no facility to support nested interrupts i.e. re-enabling interrupts while executing an interrupt handler. By default the ARM IRQ interrupt is triggered when an interrupt occurs. However you can select to have the ARM FIQ interrupt triggered by adding the maximum number of interrupts (72) to the priority when you call ctl_set_isr.

The file LPC3200_irq_handler.s implements the irq_handler and fiq_handler exception handlers.

CTL Timer Support

The file LPC3200.c implements the ctl_start_timer function using the millisecond timer.

Header Files

Header files are generated from the memory map files and can be included using the file LPC3200.h this file also provide symbolic names for the interrupt numbers as used in ctl_set_isr. The LPC3200 project setup adds the directory $(TargetsDir)/LPC3200 to the User Include Directories project property so that you can just include targets/LPC3200.h into your source code.