1.. zephyr:board:: lpcxpresso55s16 2 3Overview 4******** 5 6The LPCXpresso55S16 board provides the ideal platform for evaluation 7of the LPC55S1x/LPC551x MCU family, based on the Arm® Cortex®-M33 8architecture. Arduino® UNO compatible shield connectors are included, 9with additional expansion ports around the Arduino footprint, along 10with a PMod/host interface port and MikroElektronika Click module 11site. 12 13Hardware 14******** 15 16- LPC55S16 Arm® Cortex®-M33 microcontroller running at up to 150 MHz 17- 256 KB flash and 96 KB SRAM on-chip 18- LPC-Link2 debug high speed USB probe with VCOM port 19- I2C and SPI USB bridging to the LPC device via LPC-Link2 probe 20- MikroElektronika Click expansion option 21- LPCXpresso expansion connectors compatible with Arduino UNO 22- PMod compatible expansion / host connector 23- Reset, ISP, wake, and user buttons for easy testing of software functionality 24- Tri-color LED 25- Full-speed USB device / host port 26- High-speed USB device / host port 27- UART header for external serial to USB cable 28- CAN Transceiver 29- Stereo audio codec with in/out line 30- NXP FXOS8700CQ accelerometer 31 32For more information about the LPC55S16 SoC and LPCXPresso55S16 board, see: 33 34- `LPC55S16 SoC Website`_ 35- `LPC55S16 Datasheet`_ 36- `LPC55S16 User Manual`_ 37- `LPCXpresso55S16 Website`_ 38- `LPCXpresso55S16 User Manual`_ 39- `LPCXpresso55S16 Development Board Design Files`_ 40 41Supported Features 42================== 43 44The lpcxpresso55s16 board configuration supports the hardware features listed 45below. For additional features not yet supported, please also refer to the 46:zephyr:board:`lpcxpresso55s69` , which is the superset board in NXP's LPC55xx series. 47NXP prioritizes enabling the superset board with NXP's Full Platform Support for 48Zephyr. Therefore, the lpcxpresso55s69 board may have additional features 49already supported, which can also be re-used on this lpcxpresso55s16 board: 50 51+-----------+------------+-------------------------------------+ 52| Interface | Controller | Driver/Component | 53+===========+============+=====================================+ 54| NVIC | on-chip | nested vector interrupt controller | 55+-----------+------------+-------------------------------------+ 56| SYSTICK | on-chip | systick | 57+-----------+------------+-------------------------------------+ 58| IOCON | on-chip | pinmux | 59+-----------+------------+-------------------------------------+ 60| GPIO | on-chip | gpio | 61+-----------+------------+-------------------------------------+ 62| I2C | on-chip | i2c | 63+-----------+------------+-------------------------------------+ 64| SPI | on-chip | spi | 65+-----------+------------+-------------------------------------+ 66| USART | on-chip | serial port-polling; | 67| | | serial port-interrupt | 68+-----------+------------+-------------------------------------+ 69| SENSOR | off-chip | fxos8700 trigger | 70+-----------+------------+-------------------------------------+ 71| CLOCK | on-chip | clock_control | 72+-----------+------------+-------------------------------------+ 73| CAN | on-chip | canbus | 74+-----------+------------+-------------------------------------+ 75| RNG | on-chip | entropy; | 76| | | random | 77+-----------+------------+-------------------------------------+ 78| IAP | on-chip | flash programming | 79+-----------+------------+-------------------------------------+ 80| COUNTER | on-chip | counter | 81+-----------+------------+-------------------------------------+ 82 83Other hardware features are not currently enabled. 84 85Currently available targets for this board are: 86 87- *lpcxpresso55s16* 88 89Connections and IOs 90=================== 91 92The LPC55S16 SoC has IOCON registers, which can be used to configure 93the functionality of a pin. 94 95+---------+-----------------+----------------------------+ 96| Name | Function | Usage | 97+=========+=================+============================+ 98| PIO0_5 | GPIO | ISP SW4 | 99+---------+-----------------+----------------------------+ 100| PIO0_26 | SPI | SPI MOSI | 101+---------+-----------------+----------------------------+ 102| PIO0_29 | USART | USART RX | 103+---------+-----------------+----------------------------+ 104| PIO0_30 | USART | USART TX | 105+---------+-----------------+----------------------------+ 106| PIO1_1 | SPI | SPI SSEL1 | 107+---------+-----------------+----------------------------+ 108| PIO1_2 | SPI | SPI SCK | 109+---------+-----------------+----------------------------+ 110| PIO1_3 | SPI | SPI MISO | 111+---------+-----------------+----------------------------+ 112| PIO1_4 | GPIO | RED LED | 113+---------+-----------------+----------------------------+ 114| PIO1_6 | GPIO | BLUE_LED | 115+---------+-----------------+----------------------------+ 116| PIO1_7 | GPIO | GREEN LED | 117+---------+-----------------+----------------------------+ 118| PIO1_9 | GPIO | USR SW3 | 119+---------+-----------------+----------------------------+ 120| PIO1_18 | GPIO | Wakeup SW1 | 121+---------+-----------------+----------------------------+ 122| PIO1_20 | I2C | I2C SCL | 123+---------+-----------------+----------------------------+ 124| PIO1_21 | I2C | I2C SDA | 125+---------+-----------------+----------------------------+ 126| PIO1_26 | GPIO | FXOS8700 INT1 | 127+---------+-----------------+----------------------------+ 128| PIO1_22 | CAN | CAN RXD | 129+---------+-----------------+----------------------------+ 130| PIO1_27 | CAN | CAN TXD | 131+---------+-----------------+----------------------------+ 132 133System Clock 134============ 135 136The LPC55S16 SoC is configured to use PLL1 clocked from the external 24MHz 137crystal, running at 144MHz as a source for the system clock. When the flash 138controller is enabled, the core clock will be reduced to 96MHz. The application 139may reconfigure clocks after initialization, provided that the core clock is 140always set to 96MHz when flash programming operations are performed. 141 142Serial Port 143=========== 144 145The LPC55S16 SoC has 8 FLEXCOMM interfaces for serial 146communication. One is configured as USART for the console, one is 147configured for I2C, and the remaining are not used. 148 149Programming and Debugging 150************************* 151 152Build and flash applications as usual (see :ref:`build_an_application` 153and :ref:`application_run` for more details). 154 155Configuring a Debug Probe 156========================= 157 158A debug probe is used for both flashing and debugging the board. This 159board is configured by default to use the LPC-Link2 CMSIS-DAP Onboard 160Debug Probe, however the :ref:`pyocd-debug-host-tools` does not yet 161support the LPC55S16 so you must reconfigure the board for one of the 162J-Link debug probe instead. 163 164First install the :ref:`jlink-debug-host-tools` and make sure they are 165in your search path. 166 167Then follow the instructions in 168:ref:`lpclink2-jlink-onboard-debug-probe` to program the J-Link 169firmware. Please make sure you have the latest firmware for this 170board. 171 172Configuring a Console 173===================== 174 175Connect a USB cable from your PC to J1 (LINK2), and use the serial 176terminal of your choice (minicom, putty, etc.) with the following 177settings: 178 179- Speed: 115200 180- Data: 8 bits 181- Parity: None 182- Stop bits: 1 183 184Flashing 185======== 186 187Here is an example for the :zephyr:code-sample:`hello_world` application. 188 189.. zephyr-app-commands:: 190 :zephyr-app: samples/hello_world 191 :board: lpcxpresso55s16 192 :goals: flash 193 194Open a serial terminal, reset the board (press the RESET button), and you should 195see the following message in the terminal: 196 197.. code-block:: console 198 199 ***** Booting Zephyr OS v2.2.0 ***** 200 Hello World! lpcxpresso55s16 201 202Debugging 203========= 204 205Here is an example for the :zephyr:code-sample:`hello_world` application. 206 207.. zephyr-app-commands:: 208 :zephyr-app: samples/hello_world 209 :board: lpcxpresso55s16 210 :goals: debug 211 212Open a serial terminal, step through the application in your debugger, and you 213should see the following message in the terminal: 214 215.. code-block:: console 216 217 ***** Booting Zephyr OS zephyr-v2.2.0 ***** 218 Hello World! lpcxpresso55s16 219 220.. _LPC55S16 SoC Website: 221 https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpc5500-cortex-m33/lpc551x-s1x-baseline-arm-cortex-m33-based-microcontroller-family:LPC551X-S1X 222 223.. _LPC55S16 Datasheet: 224 https://www.nxp.com/docs/en/nxp/data-sheets/LPC55S1x_LPC551x_DS.pdf 225 226.. _LPC55S16 User Manual: 227 https://www.nxp.com/webapp/Download?colCode=UM11295 228 229.. _LPCxpresso55S16 Website: 230 https://www.nxp.com/design/development-boards/lpcxpresso-boards/lpcxpresso55s16-development-board:LPC55S16-EVK 231 232.. _LPCXpresso55S16 User Manual: 233 https://www.nxp.com/webapp/Download?colCode=UMLPCXPRESSO55S16 234 235.. _LPCXpresso55S16 Development Board Design Files: 236 https://www.nxp.com/webapp/Download?colCode=LPCXPRESSSO55S16-DESIGN-FILES 237