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