Skip to content

Commit 0371b86

Browse files
chrtaMaureenHelm
authored andcommitted
boards: arm: Add LPCXpresso55S28 dev board
Add initial support for NXP LPCXpresso55S28 development board. Signed-off-by: Christian Taedcke <[email protected]>
1 parent 7ecca29 commit 0371b86

15 files changed

+887
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#
2+
# Copyright (c) 2020 Lemonbeat GmbH
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
if(CONFIG_PINMUX_MCUX_LPC)
8+
zephyr_library()
9+
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
10+
zephyr_library_sources(pinmux.c)
11+
endif()
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# LPCXpresso55S28 board
2+
3+
# Copyright (c) 2020 Lemonbeat GmbH
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
config BOARD_LPCXPRESSO55S28
7+
bool "NXP LPCXPRESSO-55S28"
8+
depends on SOC_SERIES_LPC55XXX
9+
select SOC_PART_NUMBER_LPC55S28JBD100
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# LPCXpresso55S28 board
2+
3+
# Copyright (c) 2020 Lemonbeat GmbH
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
if BOARD_LPCXPRESSO55S28
7+
8+
config BOARD
9+
default "lpcxpresso55S28"
10+
11+
if PINMUX_MCUX_LPC
12+
13+
config PINMUX_MCUX_LPC_PORT0
14+
default y
15+
16+
config PINMUX_MCUX_LPC_PORT1
17+
default y
18+
19+
endif # PINMUX_MCUX_LPC
20+
21+
if GPIO_MCUX_LPC
22+
23+
config GPIO_MCUX_LPC_PORT0
24+
default y
25+
26+
config GPIO_MCUX_LPC_PORT1
27+
default y
28+
29+
endif # GPIO_MCUX_LPC
30+
31+
config SPI_8
32+
default y
33+
depends on SPI
34+
35+
config FXOS8700_DRDY_INT1
36+
default y
37+
depends on FXOS8700_TRIGGER
38+
39+
# For the secure version of the board the firmware is linked at the beginning
40+
# of the flash, or into the code-partition defined in DT if it is intended to
41+
# be loaded by MCUboot. If the secure firmware is to be combined with a non-
42+
# secure image (TRUSTED_EXECUTION_SECURE=y), the secure FW image shall always
43+
# be restricted to the size of its code partition.
44+
# For the non-secure version of the board, the firmware
45+
# must be linked into the code-partition (non-secure) defined in DT, regardless.
46+
# Apply this configuration below by setting the Kconfig symbols used by
47+
# the linker according to the information extracted from DT partitions.
48+
49+
# Workaround for not being able to have commas in macro arguments
50+
DT_CHOSEN_Z_CODE_PARTITION := zephyr,code-partition
51+
52+
config FLASH_LOAD_SIZE
53+
default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION))
54+
depends on BOARD_LPCXPRESSO55S28 && TRUSTED_EXECUTION_SECURE
55+
56+
endif # BOARD_LPCXPRESSO55S28
57+
58+
if DMA_MCUX_LPC
59+
60+
# Memory from the heap pool is used to allocate DMA descriptors for
61+
# channels that use multiple blocks for a DMA transfer.
62+
# Adjust HEAP_MEM_POOL_SIZE in case you need more memory.
63+
config HEAP_MEM_POOL_SIZE
64+
default 4096
65+
66+
endif # DMA_MCUX_LPC
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#
2+
# Copyright (c) 2020 Lemonbeat GmbH
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
board_runner_args(pyocd "--target=lpc55s28")
8+
board_runner_args(jlink "--device=LPC55S28" "--reset-after-load")
9+
10+
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
11+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
299 KB
Loading
Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,212 @@
1+
.. _lpcxpresso55s28:
2+
3+
NXP LPCXpresso55S28
4+
###################
5+
6+
Overview
7+
********
8+
9+
The LPCXpresso55S28 development board provides the ideal platform for evaluation
10+
of and development with the LPC552x/S2x MCU based on the Arm® Cortex®-M33
11+
architecture. The board includes a high-performance onboard debug probe, audio
12+
subsystem and accelerometer, with several options for adding off-the-shelf
13+
add-on boards for networking, sensors, displays, and other interfaces.
14+
15+
.. image:: ./LPC55S28-EVK.png
16+
:width: 720px
17+
:align: center
18+
:alt: LPCXpresso55S28
19+
20+
Hardware
21+
********
22+
23+
- LPC55S28 Arm® Cortex®-M33 microcontroller running at up to 150 MHz
24+
- 512 KB flash and 256 KB SRAM on-chip
25+
- Onboard, high-speed USB, Link2 debug probe with CMSIS-DAP and SEGGER J-Link
26+
protocol options
27+
- UART and SPI port bridging from LPC55S28 target to USB via the onboard debug
28+
probe
29+
- Hardware support for external debug probe
30+
- 3 x user LEDs, plus Reset, ISP (3) and user buttons
31+
- Micro SD card slot (4-bit SDIO)
32+
- NXP MMA8652FCR1 accelerometer
33+
- Stereo audio codec with line in/out
34+
- High and full speed USB ports with micro A/B connector for host or device
35+
functionality
36+
- MikroEletronika Click expansion option
37+
- LPCXpresso-V3 expansion option compatible with Arduino UNO
38+
- PMod compatible expansion / host connector
39+
40+
For more information about the LPC55S28 SoC and LPCXPresso55S28 board, see:
41+
42+
- `LPC55S28 SoC Website`_
43+
- `LPC55S28 Datasheet`_
44+
- `LPC55S28 User Manual`_
45+
- `LPCXpresso55S28 Website`_
46+
- `LPCXpresso55S28 User Manual`_
47+
- `LPCXpresso55S28 Development Board Design Files`_
48+
49+
Supported Features
50+
==================
51+
52+
The lpcxpresso55s28 board configuration supports the following
53+
hardware features:
54+
55+
+-----------+------------+-------------------------------------+
56+
| Interface | Controller | Driver/Component |
57+
+===========+============+=====================================+
58+
| NVIC | on-chip | nested vector interrupt controller |
59+
+-----------+------------+-------------------------------------+
60+
| SYSTICK | on-chip | systick |
61+
+-----------+------------+-------------------------------------+
62+
| IOCON | on-chip | pinmux |
63+
+-----------+------------+-------------------------------------+
64+
| GPIO | on-chip | gpio |
65+
+-----------+------------+-------------------------------------+
66+
| I2C | on-chip | i2c |
67+
+-----------+------------+-------------------------------------+
68+
| SPI | on-chip | spi |
69+
+-----------+------------+-------------------------------------+
70+
| USART | on-chip | serial port-polling |
71+
+-----------+------------+-------------------------------------+
72+
| WWDT | on-chip | windowed watchdog timer |
73+
+-----------+------------+-------------------------------------+
74+
| TrustZone | on-chip | Trusted Firmware-M |
75+
+-----------+------------+-------------------------------------+
76+
| ADC | on-chip | adc |
77+
+-----------+------------+-------------------------------------+
78+
| CLOCK | on-chip | clock_control |
79+
+-----------+------------+-------------------------------------+
80+
81+
Other hardware features are not currently enabled.
82+
83+
The default configuration file
84+
``boards/arm/lpcxpresso55s28/lpcxpresso55s28_defconfig``
85+
86+
Currently available targets for this board are:
87+
88+
- *lpcxpresso55s28* secure (S) address space
89+
- *lpcxpresso55s28_ns* non-secure (NS) address space
90+
91+
Connections and IOs
92+
===================
93+
94+
The LPC55S28 SoC has IOCON registers, which can be used to configure
95+
the functionality of a pin.
96+
97+
+---------+-----------------+----------------------------+
98+
| Name | Function | Usage |
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 SSEL |
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_20 | I2C | I2C SCL |
119+
+---------+-----------------+----------------------------+
120+
| PIO1_21 | I2C | I2C SDA |
121+
+---------+-----------------+----------------------------+
122+
123+
System Clock
124+
============
125+
126+
The LPC55S28 SoC is configured to use the internal FRO at 96MHz as a
127+
source for the system clock. Other sources for the system clock are
128+
provided in the SOC, depending on your system requirements.
129+
130+
Serial Port
131+
===========
132+
133+
The LPC55S28 SoC has 8 FLEXCOMM interfaces for serial communication. One is
134+
configured as USART for the console and the remaining are not used.
135+
136+
Programming and Debugging
137+
*************************
138+
139+
Build and flash applications as usual (see :ref:`build_an_application`
140+
and :ref:`application_run` for more details).
141+
142+
Configuring a Debug Probe
143+
=========================
144+
145+
A debug probe is used for both flashing and debugging the board. This
146+
board is configured by default to use the LPC-Link2 CMSIS-DAP Onboard
147+
Debug Probe.
148+
149+
Configuring a Console
150+
=====================
151+
152+
Connect a USB cable from your PC to P6, and use the serial terminal of your
153+
choice (minicom, putty, etc.) with the following settings:
154+
155+
- Speed: 115200
156+
- Data: 8 bits
157+
- Parity: None
158+
- Stop bits: 1
159+
160+
Flashing
161+
========
162+
163+
Here is an example for the :ref:`hello_world` application.
164+
165+
.. zephyr-app-commands::
166+
:zephyr-app: samples/hello_world
167+
:board: lpcxpresso55s28_ns
168+
:goals: flash
169+
170+
Open a serial terminal, reset the board (press the RESET button), and you should
171+
see the following message in the terminal:
172+
173+
.. code-block:: console
174+
175+
***** Booting Zephyr OS v2.4.0 *****
176+
Hello World! lpcxpresso55s28
177+
178+
Debugging
179+
=========
180+
181+
Here is an example for the :ref:`hello_world` application.
182+
183+
.. zephyr-app-commands::
184+
:zephyr-app: samples/hello_world
185+
:board: lpcxpresso55s28
186+
:goals: debug
187+
188+
Open a serial terminal, step through the application in your debugger, and you
189+
should see the following message in the terminal:
190+
191+
.. code-block:: console
192+
193+
***** Booting Zephyr OS zephyr-v2.4.0 *****
194+
Hello World! lpcxpresso55s28
195+
196+
.. _LPC55S28 SoC Website:
197+
https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpc5500-cortex-m33/lpc552x-s2x-mainstream-arm-cortex-m33-based-microcontroller-family:LPC552x-S2x
198+
199+
.. _LPC55S28 Datasheet:
200+
https://www.nxp.com/docs/en/data-sheet/LPC55S2X-LPC552X.pdf
201+
202+
.. _LPC55S28 User Manual:
203+
https://www.nxp.com/webapp/Download?colCode=UM11126
204+
205+
.. _LPCxpresso55S28 Website:
206+
https://www.nxp.com/design/software/development-software/lpcxpresso55s28-development-board:LPC55S28-EVK
207+
208+
.. _LPCXpresso55S28 User Manual:
209+
https://www.nxp.com/webapp/Download?colCode=UM11158
210+
211+
.. _LPCXpresso55S28 Development Board Design Files:
212+
https://www.nxp.com/webapp/Download?colCode=LPCXpresso55S69-DS

0 commit comments

Comments
 (0)