Skip to content

Commit be455e0

Browse files
marinjurjevicfabiobaltieri
authored andcommitted
boards: arm: add nucleo_g070rb board
Added ST Nucleo G070RB board. Signed-off-by: Marin Jurjević <[email protected]>
1 parent 140e466 commit be455e0

File tree

10 files changed

+489
-0
lines changed

10 files changed

+489
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# STM32 Nucleo-64 development board with STM32G070RB MCU configuration
2+
3+
# Copyright (c) 2023 Marin Jurjević <[email protected]>
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
config BOARD_NUCLEO_G070RB
7+
bool "NUCLEO-64 G070RB Development Board"
8+
depends on SOC_STM32G070XX
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# STM32 Nucleo-64 development board with STM32G070RB MCU
2+
3+
# Copyright (c) 2023 Marin Jurjević <[email protected]>
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
if BOARD_NUCLEO_G070RB
7+
8+
config BOARD
9+
default "nucleo_g070rb"
10+
11+
endif # BOARD_NUCLEO_G070RB
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* Copyright (c) 2023 Marin Jurjević <[email protected]>
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 1 0>, /* A3 */
17+
<4 0 &gpiob 11 0>, /* A4 */
18+
<5 0 &gpiob 12 0>, /* A5 */
19+
<6 0 &gpioc 5 0>, /* D0 */
20+
<7 0 &gpioc 4 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 14 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 0 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 {};
40+
arduino_serial: &usart1 {};

boards/arm/nucleo_g070rb/board.cmake

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
board_runner_args(pyocd "--target=stm32g070rbtx")
3+
board_runner_args(pyocd "--flash-opt=-O reset_type=hw")
4+
board_runner_args(pyocd "--flash-opt=-O connect_mode=under-reset")
5+
board_runner_args(jlink "--device=STM32G070RB" "--speed=4000")
6+
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")
7+
8+
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
9+
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
10+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
11+
include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
87.9 KB
Loading
Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
.. _nucleo_g070rb_board:
2+
3+
ST Nucleo G070RB
4+
################
5+
6+
Overview
7+
********
8+
The Nucleo G070RB board features an ARM Cortex-M0+ based STM32G070RB MCU
9+
with a wide range of connectivity support and configurations. Here are
10+
some highlights of the Nucleo G070RB board:
11+
12+
- STM32 microcontroller in QFP64 package
13+
- Two types of extension resources:
14+
15+
- Arduino Uno V3 connectivity
16+
- ST morpho extension pin headers for full access to all STM32 I/Os
17+
18+
- On-board ST-LINK/V2-1 debugger/programmer with SWD connector
19+
- Flexible board power supply:
20+
21+
- USB VBUS or external source(3.3V, 5V, 7 - 12V)
22+
- Power management access point
23+
24+
- Three LEDs: USB communication (LD1), user LED (LD4), power LED (LD3)
25+
- Two push-buttons: USER and RESET
26+
27+
.. image:: img/nucleo_g070rb.jpg
28+
:align: center
29+
:alt: Nucleo G070RB
30+
31+
More information about the board can be found at the `Nucleo G070RB website`_.
32+
33+
Hardware
34+
********
35+
Nucleo G070RB provides the following hardware components:
36+
37+
- STM32 microcontroller in LQFP64 package
38+
- Two types of extension resources:
39+
40+
- Arduino* Uno V3 connectivity
41+
- ST morpho extension pin headers for full access to all STM32 I/Os
42+
43+
- ARM* mbed*
44+
- On-board ST-LINK/V2-1 debugger/programmer with SWD connector:
45+
46+
- Selection-mode switch to use the kit as a standalone ST-LINK/V2-1
47+
48+
- Flexible board power supply:
49+
50+
- USB VBUS or external source (3.3V, 5V, 7 - 12V)
51+
- Power management access point
52+
53+
- Three LEDs:
54+
55+
- USB communication (LD1), user LED (LD4), power LED (LD3)
56+
57+
- Two push-buttons: USER and RESET
58+
- USB re-enumeration capability. Three different interfaces supported on USB:
59+
60+
- Virtual COM port
61+
- Mass storage
62+
- Debug port
63+
64+
- Support of wide choice of Integrated Development Environments (IDEs) including:
65+
66+
- IAR
67+
- ARM Keil
68+
- GCC-based IDEs
69+
70+
More information about STM32G070RB can be found here:
71+
72+
- `G070RB on www.st.com`_
73+
74+
Supported Features
75+
==================
76+
77+
The Zephyr nucleo_g070rb board configuration supports the following hardware features:
78+
79+
+-----------+------------+-------------------------------------+
80+
| Interface | Controller | Driver/Component |
81+
+===========+============+=====================================+
82+
| MPU | on-chip | arm memory protection unit |
83+
+-----------+------------+-------------------------------------+
84+
| NVIC | on-chip | nested vector interrupt controller |
85+
+-----------+------------+-------------------------------------+
86+
| UART | on-chip | serial port-polling; |
87+
| | | serial port-interrupt |
88+
+-----------+------------+-------------------------------------+
89+
| PINMUX | on-chip | pinmux |
90+
+-----------+------------+-------------------------------------+
91+
| GPIO | on-chip | gpio |
92+
+-----------+------------+-------------------------------------+
93+
| I2C | on-chip | i2c |
94+
+-----------+------------+-------------------------------------+
95+
| SPI | on-chip | spi |
96+
+-----------+------------+-------------------------------------+
97+
| CLOCK | on-chip | reset and clock control |
98+
+-----------+------------+-------------------------------------+
99+
| FLASH | on-chip | flash memory |
100+
+-----------+------------+-------------------------------------+
101+
| COUNTER | on-chip | rtc |
102+
+-----------+------------+-------------------------------------+
103+
| WATCHDOG | on-chip | independent watchdog |
104+
+-----------+------------+-------------------------------------+
105+
| PWM | on-chip | pwm |
106+
+-----------+------------+-------------------------------------+
107+
| ADC | on-chip | adc |
108+
+-----------+------------+-------------------------------------+
109+
| die-temp | on-chip | die temperature sensor |
110+
+-----------+------------+-------------------------------------+
111+
112+
Other hardware features are not yet supported in this Zephyr port.
113+
114+
The default configuration can be found in the defconfig file:
115+
``boards/arm/nucleo_g070rb/nucleo_g070rb_defconfig``
116+
117+
Connections and IOs
118+
===================
119+
120+
Each of the GPIO pins can be configured by software as output (push-pull or open-drain), as
121+
input (with or without pull-up or pull-down), or as peripheral alternate function. Most of the
122+
GPIO pins are shared with digital or analog alternate functions. All GPIOs are high current
123+
capable except for analog inputs.
124+
125+
Default Zephyr Peripheral Mapping:
126+
----------------------------------
127+
128+
- UART_1 TX/RX : PC4/PC5
129+
- UART_2 TX/RX : PA2/PA3 (ST-Link Virtual Port Com)
130+
- I2C1 SCL/SDA : PB8/PB9 (Arduino I2C)
131+
- I2C2 SCL/SDA : PA11/PA12
132+
- SPI1 NSS/SCK/MISO/MOSI : PB0/PA5/PA6/PA7 (Arduino SPI)
133+
- SPI2 NSS/SCK/MISO/MOSI : PB12/PB13/PB14/PB15
134+
- USER_PB : PC13
135+
- LD4 : PA5
136+
- PWM : PA6
137+
- ADC1 IN0 : PA0
138+
- ADC1 IN1 : PA1
139+
- DAC1_OUT1 : PA4
140+
141+
For mode details please refer to `STM32 Nucleo-64 board User Manual`_.
142+
143+
Programming and Debugging
144+
*************************
145+
146+
Applications for the ``nucleo_g070rb`` board configuration can be built and
147+
flashed in the usual way (see :ref:`build_an_application` and
148+
:ref:`application_run` for more details).
149+
150+
Flashing
151+
========
152+
153+
Nucleo G070RB board includes an ST-LINK/V2-1 embedded debug tool interface.
154+
155+
Flashing an application to Nucleo G070RB
156+
----------------------------------------
157+
158+
Here is an example for the :ref:`blinky-sample` application.
159+
160+
.. zephyr-app-commands::
161+
:zephyr-app: samples/basic/blinky
162+
:board: nucleo_g070rb
163+
:goals: build flash
164+
165+
You will see the LED blinking every second.
166+
167+
Debugging
168+
=========
169+
170+
You can debug an application in the usual way. Here is an example for the
171+
:ref:`hello_world` application.
172+
173+
.. zephyr-app-commands::
174+
:zephyr-app: samples/hello_world
175+
:board: nucleo_g070rb
176+
:maybe-skip-config:
177+
:goals: debug
178+
179+
References
180+
**********
181+
182+
.. target-notes::
183+
184+
.. _Nucleo G070RB website:
185+
http://www.st.com/en/evaluation-tools/nucleo-g070rb.html
186+
187+
.. _STM32 Nucleo-64 board User Manual:
188+
http://www.st.com/resource/en/user_manual/dm00452640.pdf
189+
190+
.. _G070RB on www.st.com:
191+
http://www.st.com/en/microcontrollers/stm32g070rb.html

0 commit comments

Comments
 (0)