1.. _lpcxpresso51u68:
2
3NXP LPCXPRESSO51U68
4###################
5
6Overview
7********
8
9The LPCXpresso51u68 development board uses an NXP LPC51U68 MCU based
10on an ARM CORTEX-M0+ core.
11
12.. figure:: lpcxpresso51u68.jpg
13   :align: center
14   :alt: LPCXpresso51U68
15
16Hardware
17********
18
19- LPC51U68 M0+ running at up to 150 MHz
20- Memory
21
22  - 256KB of flash memory
23  - 96KB of SRAM
24- On-board high-speed USB based debug probe with CMSIS-DAP and J-Link protocol
25  support, can debug the on-board LPC51U68 or an external target
26- External debug probe option
27- Tri-color LED, target reset, ISP & interrupt/user buttons for easy testing of
28  software functionality
29- Expansion options based on Arduino UNO and PMOD™, plus additional expansion
30  port pins
31- FTDI UART Connector
32
33More information can be found here:
34
35- `LPC51U68 SoC Website`_
36- `LPC51U68 Datasheet`_
37
38Supported Features
39==================
40
41The lpcxpresso51u68 support the following features:
42
43+-----------+------------+-------------------------------------+
44| Interface | Controller | Driver/Component                    |
45+===========+============+=====================================+
46| NVIC      | on-chip    | nested vector interrupt controller  |
47+-----------+------------+-------------------------------------+
48| SYSTICK   | on-chip    | systick                             |
49+-----------+------------+-------------------------------------+
50| IOCON     | on-chip    | pinmux                              |
51+-----------+------------+-------------------------------------+
52| CLOCK     | on-chip    | clock and reset control             |
53+-----------+------------+-------------------------------------+
54| GPIO      | on-chip    | gpio                                |
55+-----------+------------+-------------------------------------+
56| I2C       | on-chip    | i2c master/slave controller         |
57+-----------+------------+-------------------------------------+
58| UART      | on-chip    | serial port-polling;                |
59|           |            | serial port interrupt               |
60+-----------+------------+-------------------------------------+
61| SPI       | on-chip    | SPI master                          |
62+-----------+------------+-------------------------------------+
63
64Other hardware is not yet supported on Zephyr.
65
66Connections and IOs
67===================
68
69The IOCON controller can be used to configure the LPC51U68 pins.
70
71+---------+-----------------+----------------------------+
72| Name    | Function        | Usage                      |
73+=========+=================+============================+
74| PIO0_0  | UART            | USART RX                   |
75+---------+-----------------+----------------------------+
76| PIO0_1  | UART            | USART TX                   |
77+---------+-----------------+----------------------------+
78| PIO1_10 | GPIO            | GREEN LED                  |
79+---------+-----------------+----------------------------+
80| PIO0_29 | GPIO            | RED LED                    |
81+---------+-----------------+----------------------------+
82| PIO1_9  | GPIO            | BLUE_LED                   |
83+---------+-----------------+----------------------------+
84| PIO0_25 | I2C             | I2C SCL                    |
85+---------+-----------------+----------------------------+
86| PIO0_26 | I2C             | I2C SDA                    |
87+---------+-----------------+----------------------------+
88| PIO0_18 | SPI             | SPI MISO                   |
89+---------+-----------------+----------------------------+
90| PIO0_19 | SPI             | SPI SCK                    |
91+---------+-----------------+----------------------------+
92| PIO0_20 | SPI             | SPI MOSI                   |
93+---------+-----------------+----------------------------+
94| PIO1_1  | SPI             | SPI SSEL2                  |
95+---------+-----------------+----------------------------+
96
97Programming and Debugging
98*************************
99
100Build and flash applications as usual (see :ref:`build_an_application` and
101:ref:`application_run` for more details).
102
103Configuring a Debug Probe
104=========================
105
106A debug probe is used for both flashing and debugging the board. This board is
107configured by default to use the LPC-Link2 CMSIS-DAP Onboard Debug Probe,
108however the :ref:`pyocd-debug-host-tools` do not support this probe so you must
109reconfigure the board for one of the following debug probes instead.
110
111:ref:`lpclink2-jlink-onboard-debug-probe`
112-----------------------------------------
113
114Install the :ref:`jlink-debug-host-tools` and make sure they are in your search
115path.
116
117Follow the instructions in :ref:`lpclink2-jlink-onboard-debug-probe` to program
118the J-Link firmware.
119
120Configuring a Console
121=====================
122
123Connect a USB to FTDI RX, TX & GND pins to P3 Connector.
124
125Use the following settings with your serial terminal of choice (minicom, putty,
126etc.):
127
128- Speed: 115200
129- Data: 8 bits
130- Parity: None
131- Stop bits: 1
132
133Flashing
134========
135
136Here is an example for the :ref:`hello_world` application.
137
138.. zephyr-app-commands::
139   :zephyr-app: samples/hello_world
140   :board: lpcxpresso51u68
141   :goals: flash
142
143.. code-block:: console
144
145   ***** Booting Zephyr OS build zephyr-v2.6.0-934-g4c438c0c7d13 *****
146   Hello World! lpcxpresso51u68
147
148Debugging
149=========
150
151Here is an example for the :ref:`hello_world` application.
152
153.. zephyr-app-commands::
154   :zephyr-app: samples/hello_world
155   :board: lpcxpresso51u68
156   :goals: debug
157
158Open a serial terminal, step through the application in your debugger, and you
159should see the following message in the terminal:
160
161.. code-block:: console
162
163   ***** Booting Zephyr OS build zephyr-v2.6.0-934-g4c438c0c7d13 *****
164   Hello World! lpcxpresso51u68
165
166.. _LPC51U68 SoC Website:
167   https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/high-performance-power-efficient-and-cost-sensitive-arm-cortex-m0-plus-mcus:LPC51U68
168
169.. _LPC51U68 Datasheet:
170   https://www.nxp.com/docs/en/data-sheet/LPC51U68.pdf
171