element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Freedom development platform
  • Products
  • Dev Tools
  • Freedom development platform
  • More
  • Cancel
Freedom development platform
Blog Introduction to OM13077 Dual processor cores NXP LPCXpresso development board and demonstrating the existing project using LPCXpresso tool [Importing the example project and executing on NXP LPC54102  board]
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Freedom development platform to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: bheemarao
  • Date Created: 27 May 2016 12:55 PM Date Created
  • Views 876 views
  • Likes 1 like
  • Comments 0 comments
  • om13077
  • lpc54102
  • lpcopen
  • lpcxpresso
  • dual core cortex m4f/m0+
Related
Recommended

Introduction to OM13077 Dual processor cores NXP LPCXpresso development board and demonstrating the existing project using LPCXpresso tool [Importing the example project and executing on NXP LPC54102  board]

bheemarao
bheemarao
27 May 2016

The LPCXpresso family of boards provides a powerful and flexible development system for NXP's Cortex M MCUs The LPCXpresso54102 board has been developed by NXP to enable evaluation of and prototyping with the LPC54100 family of MCUs and features the LPC54102 in its LQFP64 package option The LPCXpresso54102 board has been developed by NXP to enable evaluation of and prototyping with the LPC54100 family of MCUs and is based on the  LPC54102J512BD64LPC54102J512BD64 version of the MCU

 

The LPC5410x are ARM Cortex-M4 based microcontrollers for embedded applications. These devices include an optional ARM Cortex-M0+ coprocessor, 104 kB of on-chip SRAM, up to 512 kB on-chip flash The ARM Cortex-M4 is a 32-bit core that offers system enhancements such as low power consumption, enhanced debug features, and a high level of support block integration. The ARM Cortex-M4 CPU incorporates a 3-stage pipeline, uses Harvard architecture with separate local instruction and data buses as well as a third bus for peripherals, and includes an internal prefetch unit that supports speculative branching. The ARM Cortex-M4 supports single-cycle digital signal processing and SIMD instructions. A hardware floating-point unit is integrated in the core.

 

The ARM Cortex-M0+ coprocessor is an energy-efficient and easy-to-use 32-bit core which is code and tool-compatible with the Cortex-M4 core. The Cortex-M0+ coprocessor offers up to 100 MHz performance with a simple instruction set and reduced code size. In LPC5410x, the Cortex-M0 coprocessor hardware multiply is implemented as a 32-cycle iterative multiplier.

 

Feature summary

The LPCXpresso54102 board includes the following features:

  • Dual processor cores: ARM Cortex-M4 and ARM Cortex-M0+. The M0+ core runs at the same frequency as the M4 core. Both cores operate up to a maximum frequency of 100 MHz.
  • On-board high-speed USB based debug probe with CMSIS-DAP and LPCXpresso IDE Redlink protocol options, can debug on-board LPC54102 or external target
  • Support for external debug probes
  • Tri-color LED
  • Target Reset, ISP and WAKE buttons
  • Expansion options based on Arduino UNO and PmodTm, plus additional expansion port pins
  • On-board 1.8/3.3V or external power supply options
  • Built-in MCU power consumption and supply voltage measurement
  • UART, I2C and SPI port bridging from LPC54102 target to usb via the on-board debug probe
  • FTDI UART connector

image

The board contains the new LPC54102 ultra-low-power dual core ARM Cortex-M4F/M0+microcontroller targetted at always on-sensor processing applications that can run up to 100MHz each core.

The main idea is to use the cortex-M0+ core for sensor listening data collection and aggregation, and then wake up periodically the cortex-M4F to perform complex data processing tasks.

 

LPCOpen:

LPCOpen is an extensive collection of free software libraries (drivers and middleware) and example programs that enable developers to create multifunctional products based on LPC microcontrollers. Access to LPCOpen is free to all LPC developers.

LPCOpen is a set of C libraries for fast development that is compatible across all the range of NXP ARM-based LPC microcontrollers with a common API, and includes graphic libraries (emWin/SWIM), a USB (LPCUSBLib) and networking stack (LWIP), and a FreeRTOS package, among other things.

 

LPCXpresso IDE:

LPCXpresso IDE supports programming and debugging LPCXpresso boards using the on-board CMSISDAP debug interface, or with an external debug probe such as LPC-Link2. LPCXpresso54102 is ready for use with the LPCXpresso IDE. An external debug probe can be used by simply connecting it to the board via the P1 connector and powering the board via the J3 usb connection.

Partner development tools

The LPCXpresso54102 board can be used with development tools from NXP partners including Atollic, Keil, IAR, Mentor Graphics, Rowley and SEGGER. The board is pre-programmed with CMSIS-DAP firmware, so can also be used with these toolchains by setting the on-board debug probe to boot from flash (removing the JP3 jumper). Please refer to our partners for details on using their tools with the board.

 

LPCXpresso V3 Boards

Pioneered by NXP and Embedded Artists, the LPCXpresso development platform includes low-cost LPCXpresso target boards to get you up and running quickly. Designed for simple, rapid prototyping and evaluation, LPCXpresso development boards work with the LPCXpresso IDE or industry leading partner toolchains.

The latest generation of LPCXpresso boards are an evolution of the V2 version, maintaining the Arduino UNO compatible shield connectors on the board top side, and adding additional rows of expansion connectors adjacent to them. As with V2 boards, they include an onboard LPC-Link2 based debug probe, compatible with the LPCXpresso IDE out-of-the-box, and with other toolchains via optional firmware, including ARM CMSIS-DAP. These boards can also be configured to act as a standalone probe to allowing debugging of an external board, and the 10-pin debug connector also allows debugging of target MCU via an external probe.

 

Onboard debugger: LPC-Link and Link2

The onboard JTAG/SWD debug probe portion of an LPCXpresso board is referred to as LPC-Link, or Link2 on later boards (except MAX variants). In early LPC-Link boards, the traces between the LPC-link and the target can be cut to use the LPC-Link as a standalone JTAG debugger. On later LPCXpresso boards this can be accomplished with a simple jumper setting, enabling the LPCXpresso board to be connected to an external target and used to develop for a wide variety of NXP's Cortex-M0, Cortex-M3, and Cortex-M4 based applications. LPC-Link can also support ARM7/9 based applications. LPCXpresso MAX boards have an on-board debug probe that implements the CMSIS-DAP protocol to enable their use with LPCXpresso IDE, mbed and a range of third party tools.

Like all LPCXpresso boards this board also comes with an integrated LPC-Link-2 debugger that can be used to debug the on-board processor as well as an external target. This is the first board of LPCXpresso V3 and the debugger includes two modes: the new standard CMSIS-DAP and the proprietary RedLink protocol. Link2 debug probes can be programmed to support CMSIS-DAP or evaluation versions of SEGGER J-Link using the LPCScrypt DFU utility.

 

To proceed further the below are the prerequisites:

 

1. Installed LPCXpresso IDE tool chain or you can download it from below link:

https://www.lpcware.com/lpcxpresso/download

 

2. LPCOpen examples and libraries:

http://cache.nxp.com/files/microcontrollers/software/LPCWare/lpc5410x_lpcxpresso_54102_lpcxpresso_3.01a.000_11.zip

       or

C:\nxp\LPCXpresso_8.1.4_606\lpcxpresso\Examples\LPCOpen

 

3. LPCXpresso 54102 development board hardware  OM13077OM13077

 

Below are the steps involved in the execution:

  • LPCXpresso project startup
  • Building an example
  • Debugging the example project on hardware

 

LPCXpresso project startup

 

We assume that LPCOpen examples and libraries have been downloaded or can be referred at installed LPCXpresso tool location

“C:\nxp\LPCXpresso_8.1.4_606\lpcxpresso\Examples\LPCOpen“

Open LPCXpresso tool and select the workspace location of your choice:

 

image

image

Select import project from quick start panel as shown in below picture

image

Now you need to point on the location where LPCOpen example for LPC54102 is present i.e

“C:\nxp\LPCXpresso_8.1.4_606\lpcxpresso\Examples\LPCOpen “

image

Below picture shows selecting import project from LPCOpen directory

image

Click on Next button as shown:

image

Now select the libraries required for the project execution (these two libraries has to be selected else your project will not compile)

“lpc_board_lpcxpresso_54102(lpc_board_lpcxpresso_54102)”

and

“lpc_chip_5410x(lpc_chip_5410X)”

 

And select example project “periph_timer” which is LPC5410x Simple timer example

  The selection is as shown below:

image

Now your workspace looks as shown below:

image

Example description:

 

The Timer example uses 2 timers to blink 2 LEDs at different rates. The timers are configured to generate interrupts upon expiration which is when the LEDs are toggled. The first timer is Timer 0 set to expire at 1-second (1Hz) intervals.  The second timer is Timer 1 used with a prescale value to expire at 0.5-second (2Hz) intervals. The LED on/off state should be slightly out of sync.

 

The RGB led on board is connected to port pin as mentioned below:

Red > Port 0-29

Green > Port 0-30

Blue > Port 0-31

 

The flow control inside the main is

  • Initialize Timer 0 and Timer 1
  • Setup prescale value on Timer 0 to PCLK
  • Setup prescale value on Timer 1 for lower resolution
  • Reset timers
  • Enable both timers to generate interrupts when time matches
  • Get rate of timer base clock
  • Setup Timer 0 for a match every 1s
  • Setup Timer 1 for a match twice in a second
  • Setup both timers to restart when match occurs
  • Start both timers
  • Clear both timers of any pending interrupts
  • Enable both timer interrupts
  • Wait for timers to generate interrupts (LEDs toggle in interrupt handlers)

 

Below are the ISR for two timers 32-bit timer-0 and 32-bit timer-1

 

void CT32B0_IRQHandler(void)
{
                if (Chip_TIMER_MatchPending(LPC_TIMER0, 1)) {
                                Chip_TIMER_ClearMatch(LPC_TIMER0, 1);
                                Board_LED_Toggle(0);
                }
}

/* 32-bit timer-1 interrupt handler */
void CT32B1_IRQHandler(void)
{
                if (Chip_TIMER_MatchPending(LPC_TIMER1, 1)) {
                                Chip_TIMER_ClearMatch(LPC_TIMER1, 1);
                                Board_LED_Toggle(1);
                }
  }

 

Main program is show below:

 

int main(void)
{
                int loop = 1;           /* Prevents unreachable statement warning */
                uint32_t timerBaseClock;

                SystemCoreClockUpdate();
                Board_Init();
                Board_LED_Set(0, false);
                Board_LED_Set(1, false);

                /* Initialize Timer 0 and Timer 1 */
                Chip_TIMER_Init(LPC_TIMER0);
                Chip_TIMER_Init(LPC_TIMER1);

                /* Setup prescale value on Timer 0 to PCLK */
                Chip_TIMER_PrescaleSet(LPC_TIMER0, 0);
                /* Setup prescale value on Timer 1 for lower resolution */
                Chip_TIMER_PrescaleSet(LPC_TIMER1, PRESCALE_HZ2);

                /* Reset timers */
                Chip_TIMER_Reset(LPC_TIMER0);
                Chip_TIMER_Reset(LPC_TIMER1);

                /* Enable both timers to generate interrupts when time matches */
                Chip_TIMER_MatchEnableInt(LPC_TIMER0, 1);
                Chip_TIMER_MatchEnableInt(LPC_TIMER1, 1);

                /* Get rate of timer base clock */
                timerBaseClock = Chip_Clock_GetAsyncSyscon_ClockRate();

                /* Setup Timer 0 for a match every 1s */
                Chip_TIMER_SetMatch(LPC_TIMER0, 1, (timerBaseClock / TICKRATE_HZ1));

                /* Setup Timer 1 for a match twice in a second */
                Chip_TIMER_SetMatch(LPC_TIMER1, 1, (timerBaseClock / ((PRESCALE_HZ2 + 1) * TICKRATE_HZ2)) );

                /* Setup both timers to restart when match occurs */
                Chip_TIMER_ResetOnMatchEnable(LPC_TIMER0, 1);
                Chip_TIMER_ResetOnMatchEnable(LPC_TIMER1, 1);

                /* Start both timers */
                Chip_TIMER_Enable(LPC_TIMER0);
                Chip_TIMER_Enable(LPC_TIMER1);

                /* Clear both timers of any pending interrupts */
                NVIC_ClearPendingIRQ(CT32B0_IRQn);
                NVIC_ClearPendingIRQ(CT32B1_IRQn);
                /* Enable both timer interrupts */
                NVIC_EnableIRQ(CT32B0_IRQn);
                NVIC_EnableIRQ(CT32B1_IRQn);
                /* Wait for timers to generate interrupts (LEDs toggle in interrupt handlers) */
                while (loop) {
                                __WFI();
                }
                return 0;
}

 

Building an example

 

Next we will proceed to Build the example project

Click on Build “Periph_timer” from quick start panel as shown below:

image

You can see the build is success as shown below:

image

 

Debugging the example project on hardware

 

Next we will proceed to debug the project

 

By default, the LPCXpresso54102 is configured to use the on-board debug probe (Link2) to debug the on-board target (LPC54102), using the CMSIS-DAP debug protocol pre-programmed into the Link2 Flash memory. The factory default CMSIS-DAP Link2 image includes UART bridge functionality

Default Jumper pin positions

image

Jumper JP1 :

Jumper JP1 is in open (default) the LPC54102 Target SWD interface enabled.

 

Jumper  JP2:

Jumper 1 – 2 (default) when on-board LPC54102 Target is connected to either the on-board Link2 debug probe or an external debug probe.

 

Jumper JP5 :

Link2 (LPC43xx) force DFU boot – 2 position jumper pins.

Jumper JP5 open (default) for Link2 to follow the normal boot sequence. The Link2 will boot from internal flash if image is found there. With the internal flash erased the Link2 normal boot sequence will fall through to DFU boot.

Note that the LPCXpresso IDE can also be used with redlink protocol by booting the Link2 in DFU mode, by installing a jumper on JP5

 

Now connect usb cable to J6 connector which is named as ‘Link’ on your board (refer to above fig) and click on the Debug option in “quick start panel’ as shown below:

image

Once connection is establish You can see below emulator connection wizard to select LPC-Link2 CMSIS DAP driver.

image

As we know this board is dual core architecture one, we get an option to select either Cortex-M4 or Cortex M0+ core in SWD configuration wizard as shown below:

image

We have selected Cortex-M4 and click ok to proceed

Next you can see the debug window now click on ‘Resume’ button to run the project

You can see the Red and green led toggles at 1 sec and 0.5 sec interval

The complete importing and execution of this project is showed in the below video for quick reference:

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

Happy working with LPCXPresso using NXP LPC54102 Development board image image image image

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube