Skip to content

Commit ff730a4

Browse files
Shiksha Patelgalak
authored andcommitted
lpc: Add lpcxpresso54114 board based on its architecture
Add default drivers, pinmux configurations, and other board level configuration parameters in respective Kconfigs. Add board dts, fixup, and docs. Samples tested include: - hello_world - sychronization - basic/blinky - basic/threads Signed-off-by: Shiksha Patel <[email protected]> Signed-off-by: Maureen Helm <[email protected]>
1 parent 1d358c0 commit ff730a4

File tree

12 files changed

+451
-0
lines changed

12 files changed

+451
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#
2+
# Copyright (c) 2017, NXP
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
if(CONFIG_PINMUX_MCUX_LPC)
8+
zephyr_library()
9+
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
10+
zephyr_library_sources(pinmux.c)
11+
endif()
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Kconfig - LPCXpresso54114 board
2+
#
3+
# Copyright (c) 2017, NXP
4+
#
5+
# SPDX-License-Identifier: Apache-2.0
6+
#
7+
8+
config BOARD_LPCXPRESSO54114
9+
bool "NXP LPCXPRESSO-54114"
10+
depends on SOC_SERIES_LPC54XXX
11+
select SOC_PART_NUMBER_LPC54114J256BD64
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Kconfig - LPCXpresso54114 board
2+
#
3+
# Copyright (c) 2017, NXP
4+
#
5+
# SPDX-License-Identifier: Apache-2.0
6+
#
7+
8+
if BOARD_LPCXPRESSO54114
9+
10+
config BOARD
11+
default lpcxpresso54114
12+
13+
if USART_MCUX_LPC
14+
15+
config USART_MCUX_LPC_0
16+
def_bool y if UART_CONSOLE
17+
18+
endif # USART_MCUX_LPC
19+
20+
if PINMUX_MCUX_LPC
21+
22+
config PINMUX_MCUX_LPC_PORT0
23+
def_bool y
24+
25+
config PINMUX_MCUX_LPC_PORT1
26+
def_bool y
27+
28+
endif # PINMUX_MCUX_LPC
29+
30+
if GPIO_MCUX_LPC
31+
32+
config GPIO_MCUX_LPC_PORT0
33+
def_bool y
34+
35+
config GPIO_MCUX_LPC_PORT1
36+
def_bool y
37+
38+
endif # GPIO_MCUX_LPC
39+
40+
endif # BOARD_LPCXPRESSO54114
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#
2+
# Copyright (c) 2017, NXP
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
set_ifndef(LPCLINK_FW jlink)
8+
9+
if(LPCLINK_FW STREQUAL jlink)
10+
set_ifndef(BOARD_DEBUG_RUNNER jlink)
11+
endif()
12+
13+
board_runner_args(jlink "--device=LPC54114J256_M4")
14+
15+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

boards/arm/lpcxpresso54114/board.h

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* Copyright (c) 2017, NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#ifndef __INC_BOARD_H
8+
#define __INC_BOARD_H
9+
10+
#include <soc.h>
11+
12+
/* Red LED */
13+
#define RED_GPIO_NAME CONFIG_GPIO_MCUX_LPC_PORT0_NAME
14+
#define RED_GPIO_PIN 29
15+
16+
/* Green LED */
17+
#define GREEN_GPIO_NAME CONFIG_GPIO_MCUX_LPC_PORT1_NAME
18+
#define GREEN_GPIO_PIN 10
19+
20+
/* Blue LED */
21+
#define BLUE_GPIO_NAME CONFIG_GPIO_MCUX_LPC_PORT1_NAME
22+
#define BLUE_GPIO_PIN 9
23+
24+
/* LED0. There is no physical LED on the board with this name, so create an
25+
* alias to the green LED to make various samples work.
26+
*/
27+
#define LED0_GPIO_PORT GREEN_GPIO_NAME
28+
#define LED0_GPIO_PIN GREEN_GPIO_PIN
29+
30+
/* LED1. There is no physical LED on the board with this name, so create an
31+
* alias to the blue LED to make various samples work.
32+
*/
33+
#define LED1_GPIO_PORT BLUE_GPIO_NAME
34+
#define LED1_GPIO_PIN BLUE_GPIO_PIN
35+
36+
#endif /* __INC_BOARD_H */
149 KB
Loading
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
.. _lpcxpresso54114:
2+
3+
NXP LPCXPRESSO54114
4+
#####################
5+
6+
Overview
7+
********
8+
9+
The LPCXpresso54114 board has been developed by NXP to enable evaluation of and
10+
prototyping with the LPC54110 family of MCUs and with the low-power LPC54110
11+
family of MCUs. LPCXpresso* is a low-cost development platform available from
12+
NXP supporting NXP's ARM-based microcontrollers. LPCXpresso is an end-to-end
13+
solution enabling embedded engineers to develop their applications from initial
14+
evaluation to final production.
15+
16+
.. image:: lpcxpresso54114.png
17+
:width: 720px
18+
:align: center
19+
:alt: LPCXPRESSO54114
20+
21+
Hardware
22+
********
23+
24+
- LPC54114 dual-core (M4F and dual M0) MCU running at up to 100 MHz
25+
- On-board high-speed USB based debug probe with CMSIS-DAP and J-Link protocol
26+
support, can debug the on-board LPC54114 or an external target
27+
- External debug probe option
28+
- Tri-color LED, target Reset, ISP & interrupt/user buttons for easy testing of
29+
software functionality
30+
- Expansion options based on Arduino UNO and Pmod™, plus additional expansion
31+
port pins
32+
- On-board 1.8 V and 3.3 V regulators plus external power supply option
33+
- 8 Mb Macronix MX25R SPI flash
34+
- Built-in MCU power consumption and supply voltage measurement
35+
- UART, I²C and SPI port bridging from LPC54114 target to USB via the on-board
36+
debug probe
37+
- FTDI UART connector
38+
39+
For more information about the LPC54114 SoC and LPCXPRESSO54114 board:
40+
41+
- `LPC54114 SoC Website`_
42+
- `LPC54114 Datasheet`_
43+
- `LPC54114 Reference Manual`_
44+
- `LPCXPRESSO54114 Website`_
45+
- `LPCXPRESSO54114 User Guide`_
46+
- `LPCXPRESSO54114 Schematics`_
47+
48+
Supported Features
49+
==================
50+
51+
The lpcxpresso54114 board configuration supports the following hardware
52+
features:
53+
54+
+-----------+------------+-------------------------------------+
55+
| Interface | Controller | Driver/Component |
56+
+===========+============+=====================================+
57+
| NVIC | on-chip | nested vector interrupt controller |
58+
+-----------+------------+-------------------------------------+
59+
| SYSTICK | on-chip | systick |
60+
+-----------+------------+-------------------------------------+
61+
| IOCON | on-chip | pinmux |
62+
+-----------+------------+-------------------------------------+
63+
| GPIO | on-chip | gpio |
64+
+-----------+------------+-------------------------------------+
65+
| USART | on-chip | serial port-polling |
66+
+-----------+------------+-------------------------------------+
67+
68+
The default configuration can be found in the defconfig file:
69+
70+
``boards/arm/lpcxpresso54114/lpcxpresso54114_defconfig``
71+
72+
Other hardware features are not currently supported by the port.
73+
74+
Connections and IOs
75+
===================
76+
77+
The LPC54114 SoC has IOCON registers, which can be used to configure the
78+
functionality of a pin.
79+
80+
+---------+-----------------+----------------------------+
81+
| Name | Function | Usage |
82+
+=========+=================+============================+
83+
| PIO0_0 | USART | USART RX |
84+
+---------+-----------------+----------------------------+
85+
| PIO0_1 | USART | USART TX |
86+
+---------+-----------------+----------------------------+
87+
| PIO0_29 | GPIO | RED LED |
88+
+---------+-----------------+----------------------------+
89+
| PIO1_9 | GPIO | BLUE_LED |
90+
+---------+-----------------+----------------------------+
91+
| PIO1_10 | GPIO | GREEN LED |
92+
+---------+-----------------+----------------------------+
93+
94+
System Clock
95+
============
96+
97+
The LPC54114 SoC is configured to use the internal FRO at 48MHz as a source for
98+
the system clock. Other sources for the system clock are provided in the SOC,
99+
depending on your system requirements.
100+
101+
Serial Port
102+
===========
103+
104+
The LPC54114 SoC has 8 FLEXCOMM interfaces for serial communication. One is
105+
configured as USART for the console and the remaining are not used.
106+
107+
Programming and Debugging
108+
*************************
109+
110+
The LPCXpresso54114 includes the LPC-Link2 serial and debug adapter built into
111+
the board to provide debugging, flash programming, and serial communication
112+
over USB. LPC-Link2 can be configured with Segger J-Link or CMSIS-DAP firmware
113+
variants to support corresponding debug tools. Currently only the Segger J-Link
114+
tools are supported for this board in Zephyr, therefore you should use the
115+
Segger J-Link firmware variant.
116+
117+
Before you start using Zephyr on the LPCXpresso54114, download and run
118+
`LPCScrypt`_ to update the LPC-Link2 firmware to the latest version, currently
119+
``Firmware_JLink_LPC-Link2_20160923.bin``. Serial communication problems, such
120+
as dropping characters, have been observed with older versions of the firmware.
121+
122+
Debugging
123+
=========
124+
125+
You can debug an application in the usual way. Here is an example for the
126+
:ref:`hello_world` application.
127+
128+
.. zephyr-app-commands::
129+
:zephyr-app: samples/hello_world
130+
:board: lpcxpresso54114
131+
:goals: debug
132+
133+
Open a serial terminal (minicom, putty, etc.) and connect the board with the
134+
following settings:
135+
136+
- Speed: 115200
137+
- Data: 8 bits
138+
- Parity: None
139+
- Stop bits: 1
140+
141+
Reset the board and the following message will appear on the corresponding
142+
serial port:
143+
144+
.. code-block:: console
145+
146+
Hello World! arm
147+
148+
149+
.. _LPC54114 SoC Website:
150+
http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/lpc-cortex-m-mcus/lpc54000-series-cortex-m4-mcus/low-power-microcontrollers-mcus-based-on-arm-cortex-m4-cores-with-optional-cortex-m0-plus-co-processor:LPC541XX
151+
152+
.. _LPC54114 Datasheet:
153+
http://www.nxp.com/docs/en/data-sheet/LPC5411X.pdf
154+
155+
.. _LPC54114 Reference Manual:
156+
http://www.nxp.com/docs/en/user-guide/UM10914.pdf
157+
158+
.. _LPCXPRESSO54114 Website:
159+
http://www.nxp.com/products/developer-resources/software-development-tools/software-tools/lpcxpresso-boards/lpcxpresso54114-board:OM13089
160+
161+
.. _LPCXPRESSO54114 User Guide:
162+
http://www.nxp.com/docs/en/user-guide/UM10973.pdf
163+
164+
.. _LPCXPRESSO54114 Schematics:
165+
http://www.nxp.com/downloads/en/design-support/LPCX5411x_Schematic_Rev_A1.pdf
166+
167+
.. _LPCScrypt:
168+
https://www.nxp.com/support/developer-resources/software-development-tools/lpc-developer-resources-/lpc-microcontroller-utilities/lpcscrypt-v1.8.2:LPCSCRYPT?&tab=Design_Tools_Tab
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/*
2+
* Copyright (c) 2017, NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#define CONFIG_NUM_IRQ_PRIO_BITS ARM_V7M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS
8+
9+
#define CONFIG_USART_MCUX_LPC_0_BASE_ADDRESS NXP_LPC_USART_40086000_BASE_ADDRESS_0
10+
#define CONFIG_USART_MCUX_LPC_0_BAUD_RATE NXP_LPC_USART_40086000_CURRENT_SPEED
11+
#define CONFIG_USART_MCUX_LPC_0_IRQ_PRI NXP_LPC_USART_40086000_IRQ_0_PRIORITY
12+
#define CONFIG_USART_MCUX_LPC_0_NAME NXP_LPC_USART_40086000_LABEL
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* Copyright (c) 2017, NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include <nxp/nxp_lpc54xxx.dtsi>
10+
11+
/ {
12+
model = "NXP LPCXpresso54114 board";
13+
compatible = "nxp,lpc54xxx", "nxp,lpc";
14+
15+
aliases{
16+
usart_0 = &usart0;
17+
};
18+
19+
chosen {
20+
zephyr,sram = &sram1;
21+
zephyr,flash = &flash0;
22+
zephyr,console = &usart0;
23+
};
24+
25+
};
26+
27+
&usart0 {
28+
status = "ok";
29+
current-speed = <115200>;
30+
};
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#
2+
# Copyright (c) 2017, NXP
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
identifier: lpcxpresso54114
8+
name: NXP LPCXpresso54114
9+
type: mcu
10+
arch: arm
11+
ram: 64
12+
flash: 256
13+
toolchain:
14+
- zephyr
15+
- gccarmemb
16+
supported:
17+
- gpio

0 commit comments

Comments
 (0)