Skip to content

Commit 39444ba

Browse files
martinjaegerMaureenHelm
authored andcommitted
boards: arm: nucleo_l452re added
Port based on existing nucleo_l432kc and nucleo_l476rg Signed-off-by: Martin Jaeger <[email protected]>
1 parent 3d1834e commit 39444ba

File tree

13 files changed

+535
-0
lines changed

13 files changed

+535
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
if(CONFIG_PINMUX)
4+
zephyr_library()
5+
zephyr_library_sources(pinmux.c)
6+
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
7+
endif()
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# STM32L452RE Nucleo board configuration
2+
#
3+
# Copyright (c) 2019 Libre Solar Technologies GmbH
4+
#
5+
# SPDX-License-Identifier: Apache-2.0
6+
7+
config BOARD_NUCLEO_L452RE
8+
bool "Nucleo L452RE Development Board"
9+
depends on SOC_STM32L452XX
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# STM32L452RE Nucleo board configuration
2+
#
3+
# Copyright (c) 2019 Libre Solar Technologies GmbH
4+
#
5+
# SPDX-License-Identifier: Apache-2.0
6+
7+
if BOARD_NUCLEO_L452RE
8+
9+
config BOARD
10+
default "nucleo_l452re"
11+
12+
if UART_CONSOLE
13+
14+
config UART_2
15+
default y
16+
17+
endif # UART_CONSOLE
18+
19+
if PWM
20+
21+
config PWM_STM32_2
22+
default y
23+
24+
endif # PWM
25+
26+
if SPI
27+
28+
config SPI_1
29+
default y
30+
31+
config SPI_STM32_INTERRUPT
32+
default y
33+
34+
endif # SPI
35+
36+
if CAN
37+
38+
config CAN_1
39+
default y
40+
41+
endif # CAN
42+
43+
endif # BOARD_NUCLEO_L452RE
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* Copyright (c) 2019 Linaro Limited
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
arduino_header: connector {
9+
compatible = "arduino-header-r3";
10+
#gpio-cells = <2>;
11+
gpio-map-mask = <0xffffffff 0xffffffc0>;
12+
gpio-map-pass-thru = <0 0x3f>;
13+
gpio-map = <0 0 &gpioa 0 0>, /* A0 */
14+
<1 0 &gpioa 1 0>, /* A1 */
15+
<2 0 &gpioa 4 0>, /* A2 */
16+
<3 0 &gpiob 0 0>, /* A3 */
17+
<4 0 &gpioc 1 0>, /* A4 */
18+
<5 0 &gpioc 0 0>, /* A5 */
19+
<6 0 &gpioa 3 0>, /* D0 */
20+
<7 0 &gpioa 2 0>, /* D1 */
21+
<8 0 &gpioa 10 0>, /* D2 */
22+
<9 0 &gpiob 3 0>, /* D3 */
23+
<10 0 &gpiob 5 0>, /* D4 */
24+
<11 0 &gpiob 4 0>, /* D5 */
25+
<12 0 &gpiob 10 0>, /* D6 */
26+
<13 0 &gpioa 8 0>, /* D7 */
27+
<14 0 &gpioa 9 0>, /* D8 */
28+
<15 0 &gpioc 7 0>, /* D9 */
29+
<16 0 &gpiob 6 0>, /* D10 */
30+
<17 0 &gpioa 7 0>, /* D11 */
31+
<18 0 &gpioa 6 0>, /* D12 */
32+
<19 0 &gpioa 5 0>, /* D13 */
33+
<20 0 &gpiob 9 0>, /* D14 */
34+
<21 0 &gpiob 8 0>; /* D15 */
35+
};
36+
};
37+
38+
arduino_i2c: &i2c1 {};
39+
arduino_spi: &spi1 {};
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
board_runner_args(jlink "--device=STM32L452RE" "--speed=4000")
4+
5+
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
6+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
70.1 KB
Loading
25.4 KB
Loading
Lines changed: 234 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,234 @@
1+
.. _nucleo_l452re_board:
2+
3+
ST Nucleo L452RE
4+
################
5+
6+
Overview
7+
********
8+
9+
The Nucleo L452RE board features an ARM Cortex-M4 based STM32L452RE MCU
10+
with a wide range of connectivity support and configurations. Here are
11+
some highlights of the Nucleo L452RE board:
12+
13+
- STM32 microcontroller in UFQFPN32 package
14+
- Arduino Uno V3 connectivity
15+
- On-board ST-LINK/V2-1 debugger/programmer with SWD connector
16+
- Flexible board power supply:
17+
18+
- USB VBUS or external source(3.3V, 5V, 7 - 12V)
19+
- Power management access point
20+
21+
- Three LEDs: USB communication (LD1), user LED (LD2), power LED (LD3)
22+
- One push-button: RESET
23+
24+
.. image:: img/nucleo-l452re.jpg
25+
:width: 250px
26+
:align: center
27+
:height: 188px
28+
:alt: Nucleo L452RE
29+
30+
More information about the board can be found at the `Nucleo L452RE website`_.
31+
32+
Hardware
33+
********
34+
35+
The STM32L452RE SoC provides the following hardware IPs:
36+
37+
- Ultra-low-power with FlexPowerControl (down to 28 nA Standby mode and 84
38+
|micro| A/MHz run mode)
39+
- Core: ARM |reg| 32-bit Cortex |reg| -M4 CPU with FPU, frequency up to 80 MHz,
40+
100DMIPS/1.25DMIPS/MHz (Dhrystone 2.1)
41+
- Clock Sources:
42+
43+
- 4 to 48 MHz crystal oscillator
44+
- 32 kHz crystal oscillator for RTC (LSE)
45+
- Internal 16 MHz factory-trimmed RC ( |plusminus| 1%)
46+
- Internal low-power 32 kHz RC ( |plusminus| 5%)
47+
- Internal multispeed 100 kHz to 48 MHz oscillator, auto-trimmed by
48+
LSE (better than |plusminus| 0.25 % accuracy)
49+
- 2 PLLs for system clock, USB, audio, ADC
50+
51+
- RTC with HW calendar, alarms and calibration
52+
- Up to 3 capacitive sensing channels: support touchkey, linear and rotary touch sensors
53+
- 12x timers:
54+
55+
- 1x 16-bit advanced motor-control
56+
- 1x 32-bit and 3x 16-bit general purpose
57+
- 2x 16-bit basic
58+
- 2x low-power 16-bit timers (available in Stop mode)
59+
- 2x watchdogs
60+
- SysTick timer
61+
62+
- Up to 26 fast I/Os, most 5 V-tolerant
63+
- Memories
64+
65+
- Up to 512 KB single bank Flash, proprietary code readout protection
66+
- 160 KB of SRAM including 32 KB with hardware parity check
67+
- Quad SPI memory interface
68+
69+
- Rich analog peripherals (independent supply)
70+
71+
- 1x 12-bit ADC 5 MSPS, up to 16-bit with hardware oversampling, 200
72+
|micro| A/MSPS
73+
- 2x 12-bit DAC, low-power sample and hold
74+
- 1x operational amplifiers with built-in PGA
75+
- 2x ultra-low-power comparators
76+
77+
- 17x communication interfaces
78+
- USB 2.0 full-speed crystal less solution with LPM and BCD
79+
- 1x SAI (serial audio interface)
80+
- 4x I2C FM+(1 Mbit/s), SMBus/PMBus
81+
- 3x USARTs (ISO 7816, LIN, IrDA, modem)
82+
- 1x UART (LIN, IrDA, modem)
83+
- 1x LPUART (Stop 2 wake-up)
84+
- 3x SPIs (and 1x Quad SPI)
85+
- CAN (2.0B Active) and SDMMC interface
86+
- IRTIM (Infrared interface)
87+
88+
- 14-channel DMA controller
89+
- True random number generator
90+
- CRC calculation unit, 96-bit unique ID
91+
- Development support: serial wire debug (SWD), JTAG, Embedded Trace Macrocell*
92+
93+
94+
More information about STM32L452RE can be found here:
95+
96+
- `STM32L452RE on www.st.com`_
97+
- `STM32L452 reference manual`_
98+
99+
Supported Features
100+
==================
101+
102+
The Zephyr nucleo_l452re board configuration supports the following hardware features:
103+
104+
+-----------+------------+-------------------------------------+
105+
| Interface | Controller | Driver/Component |
106+
+===========+============+=====================================+
107+
| NVIC | on-chip | nested vector interrupt controller |
108+
+-----------+------------+-------------------------------------+
109+
| UART | on-chip | serial port-polling; |
110+
| | | serial port-interrupt |
111+
+-----------+------------+-------------------------------------+
112+
| PINMUX | on-chip | pinmux |
113+
+-----------+------------+-------------------------------------+
114+
| GPIO | on-chip | gpio |
115+
+-----------+------------+-------------------------------------+
116+
| I2C | on-chip | i2c |
117+
+-----------+------------+-------------------------------------+
118+
| PWM | on-chip | pwm |
119+
+-----------+------------+-------------------------------------+
120+
| CAN | on-chip | can |
121+
+-----------+------------+-------------------------------------+
122+
123+
.. note:: CAN feature requires CAN transceiver
124+
125+
Other hardware features are not yet supported on this Zephyr port.
126+
127+
The default configuration can be found in the defconfig file:
128+
``boards/arm/nucleo_l452re/nucleo_l452re_defconfig``
129+
130+
131+
Connections and IOs
132+
===================
133+
134+
Nucleo L452RE Board has 6 GPIO controllers. These controllers are responsible for pin muxing,
135+
input/output, pull-up, etc.
136+
137+
Available pins:
138+
---------------
139+
.. image:: img/nucleo-l452re-pinout.png
140+
:width: 496px
141+
:align: center
142+
:height: 446px
143+
:alt: Nucleo L452RE Pinout
144+
145+
For mode details please refer to `STM32 Nucleo-32 board User Manual`_.
146+
147+
Default Zephyr Peripheral Mapping:
148+
----------------------------------
149+
150+
- UART_1_TX : PA9
151+
- UART_1_RX : PA10
152+
- UART_2_TX : PA2
153+
- UART_2_RX : PA15
154+
- I2C_1_SCL : PB6
155+
- I2C_1_SDA : PB7
156+
- PWM_2_CH1 : PA0
157+
- LD2 : PA5
158+
159+
System Clock
160+
------------
161+
162+
Nucleo L452RE System Clock could be driven by internal or external oscillator,
163+
as well as main PLL clock. By default System clock is driven by PLL clock at 80MHz,
164+
driven by 16MHz high speed internal oscillator.
165+
166+
Serial Port
167+
-----------
168+
169+
Nucleo L452RE board has 3 U(S)ARTs. The Zephyr console output is assigned to UART2.
170+
Default settings are 115200 8N1.
171+
172+
173+
Programming and Debugging
174+
*************************
175+
176+
Applications for the ``nucleo_l452re`` board configuration can be built and
177+
flashed in the usual way (see :ref:`build_an_application` and
178+
:ref:`application_run` for more details).
179+
180+
Flashing
181+
========
182+
183+
Nucleo L452RE board includes an ST-LINK/V2-1 embedded debug tool
184+
interface. This interface is supported by the openocd version
185+
included in the Zephyr SDK since v0.9.2.
186+
187+
Flashing an application to Nucleo L452RE
188+
----------------------------------------
189+
190+
Connect the Nucleo L452RE to your host computer using the USB port,
191+
then run a serial host program to connect with your Nucleo board.
192+
193+
.. code-block:: console
194+
195+
$ minicom -D /dev/ttyACM0
196+
197+
Now build and flash an application. Here is an example for
198+
:ref:`hello_world`.
199+
200+
.. zephyr-app-commands::
201+
:zephyr-app: samples/hello_world
202+
:board: nucleo_l452re
203+
:goals: build flash
204+
205+
You should see the following message on the console:
206+
207+
.. code-block:: console
208+
209+
$ Hello World! arm
210+
211+
212+
Debugging
213+
=========
214+
215+
You can debug an application in the usual way. Here is an example for the
216+
:ref:`hello_world` application.
217+
218+
.. zephyr-app-commands::
219+
:zephyr-app: samples/hello_world
220+
:board: nucleo_l452re
221+
:maybe-skip-config:
222+
:goals: debug
223+
224+
.. _Nucleo L452RE website:
225+
https://www.st.com/en/evaluation-tools/nucleo-l452re.html
226+
227+
.. _STM32 Nucleo-32 board User Manual:
228+
https://www.st.com/resource/en/user_manual/dm00105823.pdf
229+
230+
.. _STM32L452RE on www.st.com:
231+
https://www.st.com/en/microcontrollers-microprocessors/stm32l452re.html
232+
233+
.. _STM32L452 reference manual:
234+
https://www.st.com/resource/en/reference_manual/dm00151940.pdf

0 commit comments

Comments
 (0)