1.. zephyr:board:: lpcxpresso54114
2
3Overview
4********
5
6The LPCXpresso54114 board has been developed by NXP to enable evaluation of and
7prototyping with the low-power LPC54110 family of MCUs. LPCXpresso* is a
8low-cost development platform available from NXP supporting NXP's ARM-based
9microcontrollers. LPCXpresso is an end-to-end solution enabling embedded
10engineers to develop their applications from initial evaluation to final
11production.
12
13Hardware
14********
15
16- LPC54114 dual-core (M4F and dual M0) MCU running at up to 100 MHz
17- On-board high-speed USB based debug probe with CMSIS-DAP and J-Link protocol
18  support, can debug the on-board LPC54114 or an external target
19- External debug probe option
20- Tri-color LED, target Reset, ISP & interrupt/user buttons for easy testing of
21  software functionality
22- Expansion options based on Arduino UNO and Pmod™, plus additional expansion
23  port pins
24- On-board 1.8 V and 3.3 V regulators plus external power supply option
25- 8 Mb Macronix MX25R SPI flash
26- Built-in MCU power consumption and supply voltage measurement
27- UART, I²C and SPI port bridging from LPC54114 target to USB via the on-board
28  debug probe
29- FTDI UART connector
30
31For more information about the LPC54114 SoC and LPCXPRESSO54114 board:
32
33- `LPC54114 SoC Website`_
34- `LPC54114 Datasheet`_
35- `LPC54114 Reference Manual`_
36- `LPCXPRESSO54114 Website`_
37- `LPCXPRESSO54114 User Guide`_
38- `LPCXPRESSO54114 Schematics`_
39
40Supported Features
41==================
42
43The lpcxpresso54114 board configuration supports the following hardware
44features:
45
46+-----------+------------+-------------------------------------+
47| Interface | Controller | Driver/Component                    |
48+===========+============+=====================================+
49| NVIC      | on-chip    | nested vector interrupt controller  |
50+-----------+------------+-------------------------------------+
51| SYSTICK   | on-chip    | systick                             |
52+-----------+------------+-------------------------------------+
53| IOCON     | on-chip    | pinmux                              |
54+-----------+------------+-------------------------------------+
55| GPIO      | on-chip    | gpio                                |
56+-----------+------------+-------------------------------------+
57| I2C       | on-chip    | i2c                                 |
58+-----------+------------+-------------------------------------+
59| SPI       | on-chip    | spi                                 |
60+-----------+------------+-------------------------------------+
61| USART     | on-chip    | serial port-polling                 |
62+-----------+------------+-------------------------------------+
63| CLOCK     | on-chip    | clock_control                       |
64+-----------+------------+-------------------------------------+
65| IAP       | on-chip    | flash programming                   |
66+-----------+------------+-------------------------------------+
67
68The default configuration for each core can be found in the defconfig files:
69
70- :zephyr_file:`boards/nxp/lpcxpresso54114/lpcxpresso54114_lpc54114_m4_defconfig`
71- :zephyr_file:`boards/nxp/lpcxpresso54114/lpcxpresso54114_lpc54114_m0_defconfig`
72
73Other hardware features are not currently supported by the port.
74
75Connections and IOs
76===================
77
78The LPC54114 SoC has IOCON registers, which can be used to configure the
79functionality of a pin.
80
81+---------+-----------------+----------------------------+
82| Name    | Function        | Usage                      |
83+=========+=================+============================+
84| PIO0_0  | USART           | USART RX                   |
85+---------+-----------------+----------------------------+
86| PIO0_1  | USART           | USART TX                   |
87+---------+-----------------+----------------------------+
88| PIO0_18 | SPI             | SPI MISO                   |
89+---------+-----------------+----------------------------+
90| PIO0_19 | SPI             | SPI SCK                    |
91+---------+-----------------+----------------------------+
92| PIO0_20 | SPI             | SPI MOSI                   |
93+---------+-----------------+----------------------------+
94| PIO0_25 | I2C             | I2C SCL                    |
95+---------+-----------------+----------------------------+
96| PIO0_26 | I2C             | I2C SDA                    |
97+---------+-----------------+----------------------------+
98| PIO0_29 | GPIO            | RED LED                    |
99+---------+-----------------+----------------------------+
100| PIO1_1  | SPI             | SPI SSEL2                  |
101+---------+-----------------+----------------------------+
102| PIO1_9  | GPIO            | BLUE_LED                   |
103+---------+-----------------+----------------------------+
104| PIO1_10 | GPIO            | GREEN LED                  |
105+---------+-----------------+----------------------------+
106
107System Clock
108============
109
110The LPC54114 SoC is configured to use the internal FRO at 48MHz as a source for
111the system clock. Other sources for the system clock are provided in the SOC,
112depending on your system requirements.
113
114Serial Port
115===========
116
117The LPC54114 SoC has 8 FLEXCOMM interfaces for serial communication.  One is
118configured as USART for the console and the remaining are not used.
119
120Programming and Debugging
121*************************
122
123Build and flash applications as usual (see :ref:`build_an_application` and
124:ref:`application_run` for more details).
125
126Configuring a Debug Probe
127=========================
128
129A debug probe is used for both flashing and debugging the board. This board is
130configured by default to use the LPC-Link2 CMSIS-DAP Onboard Debug Probe,
131however the :ref:`pyocd-debug-host-tools` do not support this probe so you must
132reconfigure the board for one of the following debug probes instead.
133
134:ref:`lpclink2-jlink-onboard-debug-probe`
135-----------------------------------------
136
137Install the :ref:`jlink-debug-host-tools` and make sure they are in your search
138path.
139
140Follow the instructions in :ref:`lpclink2-jlink-onboard-debug-probe` to program
141the J-Link firmware.
142
143Configuring a Console
144=====================
145
146Regardless of your choice in debug probe, we will use the LPC-Link2
147microcontroller as a usb-to-serial adapter for the serial console.
148
149Connect a USB cable from your PC to J5
150
151Use the following settings with your serial terminal of choice (minicom, putty,
152etc.):
153
154- Speed: 115200
155- Data: 8 bits
156- Parity: None
157- Stop bits: 1
158
159Flashing
160========
161
162Here is an example for the :zephyr:code-sample:`hello_world` application.
163
164.. zephyr-app-commands::
165   :zephyr-app: samples/hello_world
166   :board: lpcxpresso54114/lpc54114/m4
167   :goals: flash
168
169Open a serial terminal, reset the board (press the SW4 button), and you should
170see the following message in the terminal:
171
172.. code-block:: console
173
174   ***** Booting Zephyr OS v1.14.0-rc1 *****
175   Hello World! lpcxpresso54114_m4
176
177Debugging
178=========
179
180Here is an example for the :zephyr:code-sample:`hello_world` application.
181
182.. zephyr-app-commands::
183   :zephyr-app: samples/hello_world
184   :board: lpcxpresso54114/lpc54114/m4
185   :goals: debug
186
187Open a serial terminal, step through the application in your debugger, and you
188should see the following message in the terminal:
189
190.. code-block:: console
191
192   ***** Booting Zephyr OS v1.14.0-rc1 *****
193   Hello World! lpcxpresso54114_m4
194
195.. _LPC54114 SoC Website:
196   https://www.nxp.com/products/processors-and-microcontrollers/arm-based-processors-and-mcus/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
197
198.. _LPC54114 Datasheet:
199   https://www.nxp.com/docs/en/data-sheet/LPC5411X.pdf
200
201.. _LPC54114 Reference Manual:
202   https://www.nxp.com/webapp/Download?colCode=UM10914
203
204.. _LPCXPRESSO54114 Website:
205   https://www.nxp.com/support/developer-resources/evaluation-and-development-boards/lpcxpresso-boards/lpcxpresso54114-board:OM13089
206
207.. _LPCXPRESSO54114 User Guide:
208   https://www.nxp.com/webapp/Download?colCode=UM10973
209
210.. _LPCXPRESSO54114 Schematics:
211   https://www.nxp.com/downloads/en/design-support/LPCX5411x_Schematic_Rev_A1.pdf
212