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| CSS       | on-chip    | entropy                             |
81+-----------+------------+-------------------------------------+
82| USB FS    | on-chip    | USB Full Speed device               |
83+-----------+------------+-------------------------------------+
84| DAC       | on-chip    | dac                                 |
85+-----------+------------+-------------------------------------+
86
87Other hardware features are not currently enabled.
88
89Currently available targets for this board are:
90
91- *lpcxpresso55s36*
92
93Connections and IOs
94===================
95
96The LPC55S36 SoC has IOCON registers, which can be used to configure
97the functionality of a pin.
98
99+---------+-----------------+----------------------------+
100| Name    | Function        | Usage                      |
101+=========+=================+============================+
102| PIO0_17 | GPIO            | USR SW3                    |
103+---------+-----------------+----------------------------+
104| PIO0_22 | GPIO            | GREEN LED                  |
105+---------+-----------------+----------------------------+
106| PIO0_28 | GPIO            | RED LED                    |
107+---------+-----------------+----------------------------+
108| PIO0_29 | USART           | USART RX                   |
109+---------+-----------------+----------------------------+
110| PIO0_30 | USART           | USART TX                   |
111+---------+-----------------+----------------------------+
112| PIO1_11 | GPIO            | BLUE_LED                   |
113+---------+-----------------+----------------------------+
114| PIO1_18 | GPIO            | Wakeup SW1                 |
115+---------+-----------------+----------------------------+
116| PIO1_20 | FLEXPPWM0_PWM0_A| pwm                        |
117+---------+-----------------+----------------------------+
118| PIO1_17 | FLEXPPWM0_PWM0_B| pwm                        |
119+---------+-----------------+----------------------------+
120| PIO1_6  | FLEXPPWM0_PWM1_A| pwm                        |
121+---------+-----------------+----------------------------+
122| PIO1_22 | FLEXPPWM0_PWM1_B| pwm                        |
123+---------+-----------------+----------------------------+
124| PIO1_8  | FLEXPPWM0_PWM2_A| pwm                        |
125+---------+-----------------+----------------------------+
126| PIO1_4  | FLEXPPWM0_PWM2_B| pwm                        |
127+---------+-----------------+----------------------------+
128| PIO1_21 | FLEXPPWM1_PWM0_A| pwm                        |
129+---------+-----------------+----------------------------+
130| PIO0_3  | FLEXPPWM1_PWM0_B| pwm                        |
131+---------+-----------------+----------------------------+
132| PIO1_23 | FLEXPPWM1_PWM1_A| pwm                        |
133+---------+-----------------+----------------------------+
134| PIO0_21 | FLEXPPWM1_PWM1_B| pwm                        |
135+---------+-----------------+----------------------------+
136| PIO1_25 | FLEXPPWM1_PWM2_A| pwm                        |
137+---------+-----------------+----------------------------+
138| PIO0_31 | FLEXPPWM1_PWM2_B| pwm                        |
139+---------+-----------------+----------------------------+
140| PIO1_2  | CAN0_TXD        | CAN TX                     |
141+---------+-----------------+----------------------------+
142| PIO1_3  | CAN0_RXD        | CAN RX                     |
143+---------+-----------------+----------------------------+
144| PIO0_22 | USB0_VBUS       | USBFS VBUS                 |
145+---------+-----------------+----------------------------+
146
147System Clock
148============
149
150The LPC55S36 SoC is configured to use PLL1 clocked from the external 24MHz
151crystal, running at 144MHz as a source for the system clock. When the flash
152controller is enabled, the core clock will be reduced to 96MHz. Other sources for the system clock are
153provided in the SOC, depending on your system requirements.
154
155Serial Port
156===========
157
158The LPC55S36 SoC has 8 FLEXCOMM interfaces for serial
159communication. One is configured as USART for the console and the
160remaining are not used.
161
162Programming and Debugging
163*************************
164
165Build and flash applications as usual (see :ref:`build_an_application`
166and :ref:`application_run` for more details).
167
168Configuring a Debug Probe
169=========================
170
171A debug probe is used for both flashing and debugging the board. This
172board is configured by default to use the LPC-Link2 CMSIS-DAP Onboard
173Debug Probe, however the :ref:`pyocd-debug-host-tools` does not yet
174support the LPC55S36 so you must reconfigure the board for one of the
175J-Link debug probe instead.
176
177First install the :ref:`jlink-debug-host-tools` and make sure they are
178in your search path.
179
180Then follow the instructions in
181:ref:`lpclink2-jlink-onboard-debug-probe` to program the J-Link
182firmware. Please make sure you have the latest firmware for this
183board.
184
185Configuring a Console
186=====================
187
188Connect a USB cable from your PC to J1 (LINK2), and use the serial
189terminal of your choice (minicom, putty, etc.) with the following
190settings:
191
192- Speed: 115200
193- Data: 8 bits
194- Parity: None
195- Stop bits: 1
196
197Flashing
198========
199
200Here is an example for the :ref:`hello_world` application.
201
202.. zephyr-app-commands::
203   :zephyr-app: samples/hello_world
204   :board: lpcxpresso55s36
205   :goals: flash
206
207Open a serial terminal, reset the board (press the RESET button), and you should
208see the following message in the terminal:
209
210.. code-block:: console
211
212   ***** Booting Zephyr OS v2.2.0 *****
213   Hello World! lpcxpresso55s36
214
215Debugging
216=========
217
218Here is an example for the :ref:`hello_world` application.
219
220.. zephyr-app-commands::
221   :zephyr-app: samples/hello_world
222   :board: lpcxpresso55s36
223   :goals: debug
224
225Open a serial terminal, step through the application in your debugger, and you
226should see the following message in the terminal:
227
228.. code-block:: console
229
230   ***** Booting Zephyr OS zephyr-v2.2.0 *****
231   Hello World! lpcxpresso55s36
232
233.. _LPC55S36 SoC Website:
234   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
235
236.. _LPC55S36 Datasheet:
237    https://www.nxp.com/docs/en/data-sheet/LPC553x.pdf
238
239.. _LPC55S36 User Manual:
240   https://www.nxp.com/docs/en/reference-manual/LPC553xRM.pdf
241
242.. _LPCxpresso55S36 Website:
243   https://www.nxp.com/design/development-boards/lpcxpresso-boards/development-board-for-the-lpc553x-family-of-mcus:LPCXpresso55S36
244
245.. _LPCXpresso55S36 User Manual:
246   https://www.nxp.com/docs/en/user-manual/LPCXpresso55S36UM.pdf
247
248.. _LPCXpresso55S36 Development Board Design Files:
249   https://www.nxp.com/webapp/Download?colCode=LPCXPRESSO5536_EVK-DESIGN-FILES
250