1.. _lpcxpresso55s36:
2
3NXP LPCXpresso55S36
4###################
5
6Overview
7********
8
9The LPCXpresso55S36 board provides the ideal platform for evaluation
10of the LPC55S3x/LPC553x MCU family, based on the Arm® Cortex®-M33
11architecture. Arduino® UNO compatible shield connectors are included,
12with additional expansion ports around the Arduino footprint, along
13with a PMod/host interface port and MikroElektronika Click module
14site.
15
16.. image:: lpcxpresso55S36.jpg
17   :align: center
18   :alt: LPCXpresso55S36
19
20Hardware
21********
22
23- LPC55S36 Arm® Cortex®-M33 microcontroller running at up to 150 MHz
24- 256 KB flash and 96 KB SRAM on-chip
25- LPC-Link2 debug high speed USB probe with VCOM port
26- I2C and SPI USB bridging to the LPC device via LPC-Link2 probe
27- MikroElektronika Click expansion option
28- LPCXpresso expansion connectors compatible with Arduino UNO
29- PMod compatible expansion / host connector
30- Reset, ISP, wake, and user buttons for easy testing of software functionality
31- Tri-color LED
32- Full-speed USB device / host port
33- High-speed USB device / host port
34- UART header for external serial to USB cable
35- CAN Transceiver
36- Stereo audio codec with in/out line
37
38For more information about the LPC55S36 SoC and LPCXPresso55S36 board, see:
39
40- `LPC55S36 SoC Website`_
41- `LPC55S36 Datasheet`_
42- `LPC55S36 User Manual`_
43- `LPCXpresso55S36 Website`_
44- `LPCXpresso55S36 User Manual`_
45- `LPCXpresso55S36 Development Board Design Files`_
46
47Supported Features
48==================
49
50NXP considers the LPCXpresso55S36 as a superset board for the LPC55(S)3x
51family of MCUs.  This board is a focus for NXP's Full Platform Support for
52Zephyr, to better enable the entire LPC55(S)3x family.  NXP prioritizes enabling
53this board with new support for Zephyr features.  The lpcxpresso55s36 board
54configuration supports the hardware features below.  Another similar superset
55board is the :ref:`lpcxpresso55s69`, and that board may have additional features
56already supported, which can also be re-used on this lpcxpresso55s36 board:
57
58+-----------+------------+-------------------------------------+
59| Interface | Controller | Driver/Component                    |
60+===========+============+=====================================+
61| NVIC      | on-chip    | nested vector interrupt controller  |
62+-----------+------------+-------------------------------------+
63| SYSTICK   | on-chip    | systick                             |
64+-----------+------------+-------------------------------------+
65| IOCON     | on-chip    | pinmux                              |
66+-----------+------------+-------------------------------------+
67| GPIO      | on-chip    | gpio                                |
68+-----------+------------+-------------------------------------+
69| USART     | on-chip    | serial port-polling;                |
70|           |            | serial port-interrupt               |
71+-----------+------------+-------------------------------------+
72| CLOCK     | on-chip    | clock_control                       |
73+-----------+------------+-------------------------------------+
74| CAN       | on-chip    | canbus                              |
75+-----------+------------+-------------------------------------+
76| IAP       | on-chip    | flash                               |
77+-----------+------------+-------------------------------------+
78| PWM       | on-chip    | pwm                                 |
79+-----------+------------+-------------------------------------+
80| USB FS    | on-chip    | USB Full Speed device               |
81+-----------+------------+-------------------------------------+
82| DAC       | on-chip    | dac                                 |
83+-----------+------------+-------------------------------------+
84
85Other hardware features are not currently enabled.
86
87Currently available targets for this board are:
88
89- *lpcxpresso55s36*
90
91Connections and IOs
92===================
93
94The LPC55S36 SoC has IOCON registers, which can be used to configure
95the functionality of a pin.
96
97+---------+-----------------+----------------------------+
98| Name    | Function        | Usage                      |
99+=========+=================+============================+
100| PIO0_17 | GPIO            | USR SW3                    |
101+---------+-----------------+----------------------------+
102| PIO0_22 | GPIO            | GREEN LED                  |
103+---------+-----------------+----------------------------+
104| PIO0_28 | GPIO            | RED LED                    |
105+---------+-----------------+----------------------------+
106| PIO0_29 | USART           | USART RX                   |
107+---------+-----------------+----------------------------+
108| PIO0_30 | USART           | USART TX                   |
109+---------+-----------------+----------------------------+
110| PIO1_11 | GPIO            | BLUE_LED                   |
111+---------+-----------------+----------------------------+
112| PIO1_18 | GPIO            | Wakeup SW1                 |
113+---------+-----------------+----------------------------+
114| PIO1_20 | FLEXPPWM0_PWM0_A| pwm                        |
115+---------+-----------------+----------------------------+
116| PIO1_17 | FLEXPPWM0_PWM0_B| pwm                        |
117+---------+-----------------+----------------------------+
118| PIO1_6  | FLEXPPWM0_PWM1_A| pwm                        |
119+---------+-----------------+----------------------------+
120| PIO1_22 | FLEXPPWM0_PWM1_B| pwm                        |
121+---------+-----------------+----------------------------+
122| PIO1_8  | FLEXPPWM0_PWM2_A| pwm                        |
123+---------+-----------------+----------------------------+
124| PIO1_4  | FLEXPPWM0_PWM2_B| pwm                        |
125+---------+-----------------+----------------------------+
126| PIO1_21 | FLEXPPWM1_PWM0_A| pwm                        |
127+---------+-----------------+----------------------------+
128| PIO0_3  | FLEXPPWM1_PWM0_B| pwm                        |
129+---------+-----------------+----------------------------+
130| PIO1_23 | FLEXPPWM1_PWM1_A| pwm                        |
131+---------+-----------------+----------------------------+
132| PIO0_21 | FLEXPPWM1_PWM1_B| pwm                        |
133+---------+-----------------+----------------------------+
134| PIO1_25 | FLEXPPWM1_PWM2_A| pwm                        |
135+---------+-----------------+----------------------------+
136| PIO0_31 | FLEXPPWM1_PWM2_B| pwm                        |
137+---------+-----------------+----------------------------+
138| PIO1_2  | CAN0_TXD        | CAN TX                     |
139+---------+-----------------+----------------------------+
140| PIO1_3  | CAN0_RXD        | CAN RX                     |
141+---------+-----------------+----------------------------+
142| PIO0_22 | USB0_VBUS       | USBFS VBUS                 |
143+---------+-----------------+----------------------------+
144
145System Clock
146============
147
148The LPC55S36 SoC is configured to use PLL1 clocked from the external 24MHz
149crystal, running at 144MHz as a source for the system clock. When the flash
150controller is enabled, the core clock will be reduced to 96MHz. Other sources for the system clock are
151provided in the SOC, depending on your system requirements.
152
153Serial Port
154===========
155
156The LPC55S36 SoC has 8 FLEXCOMM interfaces for serial
157communication. One is configured as USART for the console and the
158remaining are not used.
159
160Programming and Debugging
161*************************
162
163Build and flash applications as usual (see :ref:`build_an_application`
164and :ref:`application_run` for more details).
165
166Configuring a Debug Probe
167=========================
168
169A debug probe is used for both flashing and debugging the board. This
170board is configured by default to use the LPC-Link2 CMSIS-DAP Onboard
171Debug Probe, however the :ref:`pyocd-debug-host-tools` does not yet
172support the LPC55S36 so you must reconfigure the board for one of the
173J-Link debug probe instead.
174
175First install the :ref:`jlink-debug-host-tools` and make sure they are
176in your search path.
177
178Then follow the instructions in
179:ref:`lpclink2-jlink-onboard-debug-probe` to program the J-Link
180firmware. Please make sure you have the latest firmware for this
181board.
182
183Configuring a Console
184=====================
185
186Connect a USB cable from your PC to J1 (LINK2), and use the serial
187terminal of your choice (minicom, putty, etc.) with the following
188settings:
189
190- Speed: 115200
191- Data: 8 bits
192- Parity: None
193- Stop bits: 1
194
195Flashing
196========
197
198Here is an example for the :ref:`hello_world` application.
199
200.. zephyr-app-commands::
201   :zephyr-app: samples/hello_world
202   :board: lpcxpresso55s36
203   :goals: flash
204
205Open a serial terminal, reset the board (press the RESET button), and you should
206see the following message in the terminal:
207
208.. code-block:: console
209
210   ***** Booting Zephyr OS v2.2.0 *****
211   Hello World! lpcxpresso55s36
212
213Debugging
214=========
215
216Here is an example for the :ref:`hello_world` application.
217
218.. zephyr-app-commands::
219   :zephyr-app: samples/hello_world
220   :board: lpcxpresso55s36
221   :goals: debug
222
223Open a serial terminal, step through the application in your debugger, and you
224should see the following message in the terminal:
225
226.. code-block:: console
227
228   ***** Booting Zephyr OS zephyr-v2.2.0 *****
229   Hello World! lpcxpresso55s36
230
231.. _LPC55S36 SoC Website:
232   https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpc5500-cortex-m33/lpc553x-s3x-advanced-analog-armcortex-m33-based-mcu-family:LPC553x
233
234.. _LPC55S36 Datasheet:
235    https://www.nxp.com/docs/en/data-sheet/LPC553x.pdf
236
237.. _LPC55S36 User Manual:
238   https://www.nxp.com/docs/en/reference-manual/LPC553xRM.pdf
239
240.. _LPCxpresso55S36 Website:
241   https://www.nxp.com/design/development-boards/lpcxpresso-boards/development-board-for-the-lpc553x-family-of-mcus:LPCXpresso55S36
242
243.. _LPCXpresso55S36 User Manual:
244   https://www.nxp.com/docs/en/user-manual/LPCXpresso55S36UM.pdf
245
246.. _LPCXpresso55S36 Development Board Design Files:
247   https://www.nxp.com/webapp/Download?colCode=LPCXPRESSO5536_EVK-DESIGN-FILES
248