AnsweredAssumed Answered

LPC18xx / LPC43xx support in LPCXpresso

Question asked by LPCware Support on Mar 31, 2016

Introduction

 

This FAQ examines some of the factors to be taken into account when using the LPCXpresso IDE (v6) to target the LPC18 and LPC43 families of MCUs.

 

LPC18xx / LPC43xx Variants

 

Variants of the LPC18xx and LPC43xx families are available with and without internal flash. For more details, please see NXP's website and documentation:

 

 

Parts containing Internal Flash

 

For parts which contain internal flash, such as LPC1857 and LPC4357, LPCXpresso provides direct support for programming the flash. For more details please see the FAQ "LPC18/LPC43 Internal Flash Drivers".

 

Parts supporting only External flash

 

The LPC18x0/43x0 parts do not have integrated flash within the MCU. However they can be connected to external flash, which Code Red IDE projects can be configured to make use of. For more details please see the FAQ "LPC18 / LPC43 External Flash Drivers".

 

Silicon and board revisions

 

Silicon revisons

 

The initial LPC18xx and LPC43xx parts with no internal flash (LPC1850/LPC4350) went through a rather long gestation period, with several pre-production silicon revisions, which some customers have acquired. LPCXpresso IDE only supports the use of production silicon - which is marked "AY". For example, the full markings on the LPC4350 chip that we currently have here are:

NXP

LPC4350FET256

P6G566.04

ESD11460AY

Hitex eval board revisions

 

LPCXpresso IDE only supports the use of revision A4 (or later) of the Hitex LPC1850/4350 eval boards. Earlier revisions (for example A2) were typically fitted with preproduction LPC18/LPC43 silicon which is also not supported by LPCXpresso IDE. The easy ways to tell if your Hitex eval board is rev A4 are to…

  • Look at the text on the underside of the board. If it says "LPC1850EVA-A4, then you have an A4 board. (Earlier revisions may say, for example, "LPC1850EVA-A2.) Or…

  • Look at the JTAG connector, which is just below the long LCD connector. A small 10 pin connector means a rev A4 board. A large "traditional ARM" 20pin connector means an earlier variant.

 

Other boards

 

Now that production LPC18 / LPC43 silicon is available, vendors other than Hitex are now also making LPC18/43 boards available, some mounting parts with internal flash, others relying on external flash. For example:

 

  • We have done some development work for the LPCXpresso IDE with the NGX LPC4330-Xplorer board (works with the SPIFI flash driver supplied with the LPCXpresso IDE). Versions of the NGX Xplorer boards fitted with LPC1837 / LPC4337 have also been tested (with internal flash drivers)

  • We have done some development work for the LPCXpresso IDE with the Keil MCB1800 board mounted with LPC1857 and Keil MCB4300 board mounted with LPC4357 silicon, both with internal flash.

  • A flash driver for use with external flash fitted to the Diolan LPC4350-DB1 or Diolan LPC1850-DB1 boards is also supplied with LPCXpresso IDE.

  • The LPC-Link2 can be used as an evaluation board for the LPC4370. For more details, please see the FAQ "Using an LPC-Link2 as an LPC4370 evaluation board".

 

Existing code and projects

 

Code taken from examples, or generated by the project wizard in versions of the Code Red IDE prior to v4.30 should not be used with the latest LPC18/LPC43 silicon/boards. Use the examples provided with latest version of the LPCXpresso IDE. This includes startup code generated by the project wizard. Replace any existing startup code with that created by the current version of the LPCXpresso IDE.

 

Debug connections

 

Debug probes

 

You can use a Red Probe+ (or original Red Probe), the LPC-Link probe from an LPCXpresso board, or an LPC-Link2 to debug your LPC18xx/LPC43xx. Depending upon the connections on your board, you may also want a 10-20pin adapter. These can be purchased from a number of sources. Note that debugging LPC18xx/43xx LPC-Link2 was not supported in LPCxpresso IDE v5 and earlier.

 

JTAG vs SWD

 

Unlike most other Cortex-M based MCU's (including LPC18xx), when you start a debug connection to an LPC43xx, you will by default connect using JTAG. This is because of the multicore nature of the LPC43xx parts (SWD only supports connections to a one core system).

 

The first time that you start a debug session to the LPC43xx using a JTAG connection, you will receive a pop up dialog offering you a choice of which of the two cores on the LPC43xx to connect to. Normally you should ensure that you select the device with the TAP Id = 0x4ba00477 - which is the Cortex-M4. This selection is then stored in the *.jtag file that will be placed in the Debug/Release directory. Note that you can cause the pop up dialog to reappear again by deleting the *.jtag file.

 

Note that it is possible to reconfigure an LPC43xx project so that an SWD connection is used instead. To do this you need to change the "Debugger Configuration" setting in the Launch Configuration from "NXP LPC43xx (JTAG)" to "NXP LPC43xx (SWD)".

 

Boot pins

 

When programming and running code from the external flash, it is particularly important to make sure that you have the boot pins P2_9, P2_8, P1_2, and P1_1 are correctly connected so that the MCU starts execution from the correct memory address. For more details, please see the NXP documentation for your specific part.

 

If the boot pins are incorrectly set, then this will typically result in the initial default breakpoint set by the debugger on main() not been reached. You can confirm if this is the case by clicking on suspend icon to pause execution (when you fail to hit the initial breakpoint) and then looking at the address of the PC. If you built for SPIFI, then the address of the PC should be 0x14xx xxxx, whereas if you built for EMC (SST), then the address of the PC should be 0x1Cxx xxxx.

 

Note : A power on reset is definitely required after changing the BOOT pin settings.

Boot pins example (Hitex LPC1850/4350 board)

 

For example, for the Hitex LPC1850/4350 board, you need to have the BOOT jumpers configued as follows :

  • For SPIFI flash

    • BOOT1 connected across pins 1 and 2

    • BOOT2, BOOT3, BOOT4 connected across pins 2 and 3

  • For EMC SST flash

    • BOOT1, BOOT2 connected across pins 1 and 2

    • BOOT3, BOOT4 connected across pins 2 and 3

For more details see section 7.1 "Boot options" of the Hitex Quickstart Guide LPC1850/LPC4350 Board (version 1.20).

 

Boot pins for other boards

 

Similar principles will apply to the setting of boot pins for other board which make use of flashless LPC18 / LPC43 parts. However many other boards are only supplied with a single type of external flash device, which means that the boot pins will normally be configured correctly.

 

However you should check for full details in the documentation for the board.

 

LPC43xx Multicore development

 

For details of how to develop applications that make use of both Cortex-M4 and M0 cpus on the LPC43 family, please see the FAQ "LPC43xx Cortex-M4 / M0 Multicore Applications".

Outcomes