Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2b7e3ef

Browse files
fpistmTDhaouST
authored andcommitted
variant: G0: add Nucleo-G070RB
Signed-off-by: TLIG Dhaou <dhaou.tlig-ext@st.com>
1 parente2f8bc3 commit2b7e3ef

File tree

4 files changed

+344
-0
lines changed

4 files changed

+344
-0
lines changed

‎README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ User can add a STM32 based board following this [wiki](https://github.com/stm32d
111111
|:green_heart:| STM32F401RE|[Nucleo F401RE](http://www.st.com/en/evaluation-tools/nucleo-f401re.html)|*0.2.1*||
112112
|:green_heart:| STM32F411RE|[Nucleo F411RE](http://www.st.com/en/evaluation-tools/nucleo-f411re.html)|*0.2.1*||
113113
|:green_heart:| STM32F446RE|[Nucleo F446RE](http://www.st.com/en/evaluation-tools/nucleo-f446re.html)|*1.1.1*||
114+
|:yellow_heart:| STM32G070RB|[Nucleo G070RB](https://www.st.com/en/evaluation-tools/nucleo-g070rb.html)|**2.3.0**||
114115
|:green_heart:| STM32G071RB|[Nucleo G071RB](https://www.st.com/en/evaluation-tools/nucleo-g071rb.html)|*1.6.0*||
115116
|:green_heart:| STM32G0B1RE|[Nucleo G0B1RE](https://www.st.com/en/evaluation-tools/nucleo-g0b1re.html)|*2.1.0*||
116117
|:green_heart:| STM32G431RB|[Nucleo G431RB](https://www.st.com/en/evaluation-tools/nucleo-g431rb.html)|*1.7.0*||
@@ -275,6 +276,8 @@ User can add a STM32 based board following this [wiki](https://github.com/stm32d
275276

276277
| Status| Device(s)| Name| Release| Notes|
277278
| :----:| :-------:| ----| :-----:| :----|
279+
|:yellow_heart:| STM32F722RC<br>STM32F722RE| Generic Board|**2.3.0**||
280+
|:yellow_heart:| STM32F730R8<br>STM32F732RE| Generic Board|**2.3.0**||
278281
|:green_heart:| STM32F745ZE<br>STM32F745ZG| Generic Board|*2.0.0*||
279282
|:green_heart:| STM32F746BE<br>STM32F746BG<br>STM32F746NE<br>STM32F746NG| Generic Board|*2.0.0*||
280283
|:green_heart:| STM32F746ZE<br>STM32F746ZG| Generic Board|*2.0.0*||

‎boards.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,19 @@ Nucleo_64.menu.pnum.NUCLEO_F446RE.build.product_line=STM32F446xx
349349
Nucleo_64.menu.pnum.NUCLEO_F446RE.build.variant=STM32F4xx/F446R(C-E)T
350350
Nucleo_64.menu.pnum.NUCLEO_F446RE.build.cmsis_lib_gcc=arm_cortexM4lf_math
351351

352+
# NUCLEO_G070RB board
353+
Nucleo_64.menu.pnum.NUCLEO_G070RB=Nucleo G070RB
354+
Nucleo_64.menu.pnum.NUCLEO_G070RB.node=NODE_G070RB
355+
Nucleo_64.menu.pnum.NUCLEO_G070RB.upload.maximum_size=131072
356+
Nucleo_64.menu.pnum.NUCLEO_G070RB.upload.maximum_data_size=36864
357+
Nucleo_64.menu.pnum.NUCLEO_G070RB.build.mcu=cortex-m0plus
358+
Nucleo_64.menu.pnum.NUCLEO_G070RB.build.board=NUCLEO_G070RB
359+
Nucleo_64.menu.pnum.NUCLEO_G070RB.build.series=STM32G0xx
360+
Nucleo_64.menu.pnum.NUCLEO_G070RB.build.product_line=STM32G070xx
361+
Nucleo_64.menu.pnum.NUCLEO_G070RB.build.variant=STM32G0xx/G070RBT
362+
Nucleo_64.menu.pnum.NUCLEO_G070RB.build.cmsis_lib_gcc=arm_cortexM0l_math
363+
Nucleo_64.menu.pnum.NUCLEO_G070RB.build.st_extra_flags=-D{build.product_line} {build.enable_usb} {build.xSerial} -D__CORTEX_SC=0
364+
352365
# NUCLEO_G071RB board
353366
Nucleo_64.menu.pnum.NUCLEO_G071RB=Nucleo G071RB
354367
Nucleo_64.menu.pnum.NUCLEO_G071RB.node=NODE_G071RB
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
/*
2+
*******************************************************************************
3+
* Copyright (c) 2021, STMicroelectronics
4+
* All rights reserved.
5+
*
6+
* This software component is licensed by ST under BSD 3-Clause license,
7+
* the "License"; You may not use this file except in compliance with the
8+
* License. You may obtain a copy of the License at:
9+
* opensource.org/licenses/BSD-3-Clause
10+
*
11+
*******************************************************************************
12+
*/
13+
14+
#if defined(ARDUINO_NUCLEO_G070RB)
15+
#include"pins_arduino.h"
16+
17+
// Pin number
18+
const PinName digitalPin[] = {
19+
PC_5,
20+
PC_4,
21+
PA_10,
22+
PB_3,
23+
PB_5,
24+
PB_4,
25+
PB_14,
26+
PA_8,
27+
PA_9,
28+
PC_7,
29+
PB_0,
30+
PA_7,
31+
PA_6,
32+
PA_5,
33+
PB_9,
34+
PB_8,
35+
// ST Morpho
36+
// CN7 Left Side
37+
PC_10,
38+
PC_12,
39+
PA_14,
40+
PD_0,
41+
PD_3,
42+
PA_13,
43+
PD_4,
44+
PA_15,
45+
PB_7,
46+
PC_13,
47+
PC_14,
48+
PC_15,
49+
PF_0,
50+
PF_1,
51+
PC_2,
52+
PC_3,
53+
// CN7 Right Side
54+
PC_11,
55+
PD_2,
56+
PD_1,
57+
PD_5,
58+
// CN10 Left Side
59+
PC_9,
60+
// CN10 Right side
61+
PC_8,
62+
PC_6,
63+
PA_3,
64+
PD_6,
65+
PA_11,
66+
PA_12,
67+
PC_1,
68+
PC_0,
69+
PB_2,
70+
PB_6,
71+
PB_15,
72+
PB_10,
73+
PB_13,
74+
PA_2,
75+
PD_8,
76+
PD_9,
77+
PA_0,
78+
PA_1,
79+
PA_4,
80+
PB_1,
81+
PB_11,
82+
PB_12,
83+
PF_2,
84+
PA_9_R,
85+
PA_10_R
86+
};
87+
88+
// Analog (Ax) pin number array
89+
constuint32_t analogInputPin[] = {
90+
53,//A0
91+
54,//A1
92+
55,//A2
93+
56,//A3
94+
57,//A4
95+
58,//A5
96+
11,//A6
97+
12,//A7
98+
45,//A8
99+
48,//A9
100+
0,//A10
101+
1,//A11
102+
10,//A12
103+
13,//A13 - LED
104+
39,//A14 - STLINK RX
105+
50//A15 - STLINK TX
106+
};
107+
108+
// ----------------------------------------------------------------------------
109+
110+
#ifdef __cplusplus
111+
extern"C" {
112+
#endif
113+
114+
/**
115+
* @brief System Clock Configuration
116+
* @param None
117+
* @retval None
118+
*/
119+
WEAKvoidSystemClock_Config(void)
120+
{
121+
RCC_OscInitTypeDef RCC_OscInitStruct = {};
122+
RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
123+
124+
/** Configure the main internal regulator output voltage
125+
*/
126+
HAL_PWREx_ControlVoltageScaling(PWR_REGULATOR_VOLTAGE_SCALE1);
127+
/** Initializes the RCC Oscillators according to the specified parameters
128+
* in the RCC_OscInitTypeDef structure.
129+
*/
130+
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
131+
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
132+
RCC_OscInitStruct.HSIDiv = RCC_HSI_DIV1;
133+
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
134+
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
135+
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
136+
RCC_OscInitStruct.PLL.PLLM = RCC_PLLM_DIV1;
137+
RCC_OscInitStruct.PLL.PLLN =8;
138+
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
139+
RCC_OscInitStruct.PLL.PLLR = RCC_PLLR_DIV2;
140+
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
141+
Error_Handler();
142+
}
143+
/** Initializes the CPU, AHB and APB buses clocks
144+
*/
145+
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
146+
| RCC_CLOCKTYPE_PCLK1;
147+
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
148+
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
149+
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
150+
151+
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK) {
152+
Error_Handler();
153+
}
154+
}
155+
156+
157+
#ifdef __cplusplus
158+
}
159+
#endif
160+
#endif/* ARDUINO_NUCLEO_G071RB*/
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
/*
2+
*******************************************************************************
3+
* Copyright (c) 2021, STMicroelectronics
4+
* All rights reserved.
5+
*
6+
* This software component is licensed by ST under BSD 3-Clause license,
7+
* the "License"; You may not use this file except in compliance with the
8+
* License. You may obtain a copy of the License at:
9+
* opensource.org/licenses/BSD-3-Clause
10+
*
11+
*******************************************************************************
12+
*/
13+
#pragma once
14+
15+
/*----------------------------------------------------------------------------
16+
* STM32 pins number
17+
*----------------------------------------------------------------------------*/
18+
#definePC5 PIN_A10
19+
#definePC4 PIN_A11
20+
#definePA10 2
21+
#definePB3 3
22+
#definePB5 4
23+
#definePB4 5
24+
#definePB14 6
25+
#definePA8 7
26+
#definePA9 8
27+
#definePC7 9
28+
#definePB0 PIN_A12
29+
#definePA7 PIN_A6
30+
#definePA6 PIN_A7
31+
#definePA5 PIN_A13 // LED
32+
#definePB9 14
33+
#definePB8 15
34+
// ST Morpho
35+
// CN7 Left Side
36+
#definePC10 16
37+
#definePC12 17
38+
#definePA14 18 // SWD
39+
#definePD0 19
40+
#definePD3 20
41+
#definePA13 21 // SWD
42+
#definePD4 22
43+
#definePA15 23
44+
#definePB7 24
45+
#definePC13 25
46+
#definePC14 26
47+
#definePC15 27
48+
#definePF0 28
49+
#definePF1 29
50+
#definePC2 30
51+
#definePC3 31
52+
// CN7 Right Side
53+
#definePC11 32
54+
#definePD2 33
55+
#definePD1 34
56+
#definePD5 35
57+
// CN10 Left Side
58+
#definePC9 36
59+
// CN10 Right side
60+
#definePC8 37
61+
#definePC6 38
62+
#definePA3 PIN_A14
63+
#definePD6 40
64+
#definePA11 41
65+
#definePA12 42
66+
#definePC1 43
67+
#definePC0 44
68+
#definePB2 PIN_A8
69+
#definePB6 46
70+
#definePB15 47
71+
#definePB10 PIN_A9
72+
#definePB13 49
73+
#definePA2 PIN_A15
74+
#definePD8 51
75+
#definePD9 52
76+
#definePA0 PIN_A0
77+
#definePA1 PIN_A1
78+
#definePA4 PIN_A2
79+
#definePB1 PIN_A3
80+
#definePB11 PIN_A4
81+
#definePB12 PIN_A5
82+
#definePF2 59
83+
#definePA9_R 60
84+
#definePA10_R 61
85+
86+
// Alternate pins number
87+
#definePA6_ALT1 (PA6 | ALT1)
88+
#definePA7_ALT1 (PA7 | ALT1)
89+
#definePA7_ALT2 (PA7 | ALT2)
90+
#definePA7_ALT3 (PA7 | ALT3)
91+
#definePA15_ALT1 (PA15 | ALT1)
92+
#definePB0_ALT1 (PB0 | ALT1)
93+
#definePB1_ALT1 (PB1 | ALT1)
94+
#definePB1_ALT2 (PB1 | ALT2)
95+
#definePB6_ALT1 (PB6 | ALT1)
96+
#definePB13_ALT1 (PB13 | ALT1)
97+
#definePB14_ALT1 (PB14 | ALT1)
98+
#definePB15_ALT1 (PB15 | ALT1)
99+
#definePB15_ALT2 (PB15 | ALT2)
100+
#definePC4_ALT1 (PC4 | ALT1)
101+
#definePC5_ALT1 (PC5 | ALT1)
102+
#definePC8_ALT1 (PC8 | ALT1)
103+
#definePC9_ALT1 (PC9 | ALT1)
104+
#definePC10_ALT1 (PC10 | ALT1)
105+
#definePC11_ALT1 (PC11 | ALT1)
106+
107+
#defineNUM_DIGITAL_PINS 62
108+
#defineNUM_REMAP_PINS 2
109+
#defineNUM_ANALOG_INPUTS 16
110+
111+
// On-board LED pin number
112+
#ifndefLED_BUILTIN
113+
#defineLED_BUILTIN PA5
114+
#endif
115+
#defineLED_GREEN LED_BUILTIN
116+
117+
// On-board user button
118+
#ifndefUSER_BTN
119+
#defineUSER_BTN PC13
120+
#endif
121+
122+
// Timer Definitions
123+
// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
124+
#ifndefTIMER_TONE
125+
#defineTIMER_TONE TIM6
126+
#endif
127+
#ifndefTIMER_SERVO
128+
#defineTIMER_SERVO TIM7
129+
#endif
130+
131+
// UART Definitions
132+
#ifndefSERIAL_UART_INSTANCE
133+
#defineSERIAL_UART_INSTANCE 2 //Connected to ST-Link
134+
#endif
135+
136+
// Default pin used for 'Serial' instance (ex: ST-Link)
137+
// Mandatory for Firmata
138+
#ifndefPIN_SERIAL_RX
139+
#definePIN_SERIAL_RX PA3
140+
#endif
141+
#ifndefPIN_SERIAL_TX
142+
#definePIN_SERIAL_TX PA2
143+
#endif
144+
145+
146+
/*----------------------------------------------------------------------------
147+
* Arduino objects - C++ only
148+
*----------------------------------------------------------------------------*/
149+
150+
#ifdef__cplusplus
151+
// These serial port names are intended to allow libraries and architecture-neutral
152+
// sketches to automatically default to the correct port name for a particular type
153+
// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
154+
// the first hardware serial port whose RX/TX pins are not dedicated to another use.
155+
//
156+
// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
157+
//
158+
// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
159+
//
160+
// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
161+
//
162+
// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
163+
//
164+
// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
165+
// pins are NOT connected to anything by default.
166+
#defineSERIAL_PORT_MONITOR Serial
167+
#defineSERIAL_PORT_HARDWARE Serial2
168+
#endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp