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

Commitbb565fd

Browse files
askuricfpistm
authored andcommitted
variant(f4): add Nucleo F410RB
Signed-off-by: gospar <antun.skuric@outlook.com>
1 parent61b4df8 commitbb565fd

File tree

5 files changed

+307
-0
lines changed

5 files changed

+307
-0
lines changed

‎README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ User can add a STM32 based board following this [wiki](https://github.com/stm32d
136136
|:green_heart:| STM32F302R8|[Nucleo F302R8](http://www.st.com/en/evaluation-tools/nucleo-f302r8.html)|*1.1.0*||
137137
|:green_heart:| STM32F303RE|[Nucleo F303RE](http://www.st.com/en/evaluation-tools/nucleo-f303re.html)|*0.1.0*||
138138
|:green_heart:| STM32F401RE|[Nucleo F401RE](http://www.st.com/en/evaluation-tools/nucleo-f401re.html)|*0.2.1*||
139+
|:yellow_heart:| STM32F410RB|[Nucleo F410RB](http://www.st.com/en/evaluation-tools/nucleo-f410rb.html)|**2.11.0**||
139140
|:green_heart:| STM32F411RE|[Nucleo F411RE](http://www.st.com/en/evaluation-tools/nucleo-f411re.html)|*0.2.1*||
140141
|:green_heart:| STM32F446RE|[Nucleo F446RE](http://www.st.com/en/evaluation-tools/nucleo-f446re.html)|*1.1.1*||
141142
|:green_heart:| STM32G070RB|[Nucleo G070RB](https://www.st.com/en/evaluation-tools/nucleo-g070rb.html)|*2.3.0*||

‎boards.txt‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,21 @@ Nucleo_64.menu.pnum.NUCLEO_F401RE.build.variant=STM32F4xx/F401R(B-C-D-E)T
586586
Nucleo_64.menu.pnum.NUCLEO_F401RE.openocd.target=stm32f4x
587587
Nucleo_64.menu.pnum.NUCLEO_F401RE.debug.svd_file={runtime.tools.STM32_SVD.path}/svd/STM32F4xx/STM32F401.svd
588588

589+
# NUCLEO_F410RB board
590+
Nucleo_64.menu.pnum.NUCLEO_F410RB=Nucleo F410RB
591+
Nucleo_64.menu.pnum.NUCLEO_F410RB.node="NOD_F410RB,NUCLEO"
592+
Nucleo_64.menu.pnum.NUCLEO_F410RB.upload.maximum_size=131072
593+
Nucleo_64.menu.pnum.NUCLEO_F410RB.upload.maximum_data_size=32768
594+
Nucleo_64.menu.pnum.NUCLEO_F410RB.build.mcu=cortex-m4
595+
Nucleo_64.menu.pnum.NUCLEO_F410RB.build.fpu=-mfpu=fpv4-sp-d16
596+
Nucleo_64.menu.pnum.NUCLEO_F410RB.build.float-abi=-mfloat-abi=hard
597+
Nucleo_64.menu.pnum.NUCLEO_F410RB.build.board=NUCLEO_F410RB
598+
Nucleo_64.menu.pnum.NUCLEO_F410RB.build.series=STM32F4xx
599+
Nucleo_64.menu.pnum.NUCLEO_F410RB.build.product_line=STM32F410Rx
600+
Nucleo_64.menu.pnum.NUCLEO_F410RB.build.variant=STM32F4xx/F410R(8-B)(I-T)
601+
Nucleo_64.menu.pnum.NUCLEO_F410RB.openocd.target=stm32f4x
602+
Nucleo_64.menu.pnum.NUCLEO_F410RB.debug.svd_file={runtime.tools.STM32_SVD.path}/svd/STM32F4xx/STM32F410.svd
603+
589604
# NUCLEO_F411RE board
590605
Nucleo_64.menu.pnum.NUCLEO_F411RE=Nucleo F411RE
591606
Nucleo_64.menu.pnum.NUCLEO_F411RE.node="NODE_F411RE,NUCLEO"

‎variants/STM32F4xx/F410R(8-B)(I-T)/CMakeLists.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ add_library(variant_bin STATIC EXCLUDE_FROM_ALL
2222
generic_clock.c
2323
PeripheralPins.c
2424
variant_generic.cpp
25+
variant_NUCLEO_F410RB.cpp
2526
)
2627
target_link_libraries(variant_binPUBLIC variant_usage)
2728

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
/*
2+
*******************************************************************************
3+
* Copyright (c) 2025, 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+
#if defined(ARDUINO_NUCLEO_F410RB)
14+
#include"pins_arduino.h"
15+
16+
// Digital PinName array
17+
const PinName digitalPin[] = {
18+
PA_3,
19+
PA_2,
20+
PA_10,
21+
PB_3,
22+
PB_5,
23+
PB_4,
24+
PB_10,
25+
PA_8,
26+
PA_9,
27+
PC_7,
28+
PB_6,
29+
PA_7,
30+
PA_6,
31+
PA_5,
32+
PB_9,
33+
PB_8,
34+
// ST Morpho
35+
// CN7 Left Side
36+
PC_10,
37+
PC_12,
38+
NC,//D18 - BOOT0
39+
PA_13,
40+
PA_14,
41+
PA_15,
42+
PB_7,
43+
PC_13,
44+
PC_14,
45+
PC_15,
46+
PH_0,
47+
PH_1,
48+
PC_2,
49+
PC_3,
50+
// CN7 Right Side
51+
PC_11,
52+
PB_11,
53+
// CN10 Left Side
54+
PC_9,
55+
// CN10 Right side
56+
PC_8,
57+
PC_6,
58+
PC_5,
59+
PA_12,
60+
PA_11,
61+
PB_12,
62+
NC,//D39
63+
PB_2,
64+
PB_1,
65+
PB_15,
66+
PB_14,
67+
PB_13,
68+
PC_4,
69+
PA_0,
70+
PA_1,
71+
PA_4,
72+
PB_0,
73+
PC_1,
74+
PC_0
75+
};
76+
77+
// Analog (Ax) pin number array
78+
constuint32_t analogInputPin[] = {
79+
46,//A0
80+
47,//A1
81+
48,//A2
82+
49,//A3
83+
50,//A4
84+
51,//A5
85+
11,//A6
86+
12,//A7
87+
13,//A8
88+
28,//A9
89+
29,//A10
90+
35,//A11
91+
41,//A12
92+
45,//A13
93+
0,//A14
94+
1//A15
95+
};
96+
97+
#ifdef __cplusplus
98+
extern"C" {
99+
#endif
100+
/**
101+
* @brief System Clock Configuration
102+
* SYSCLK = 100MHz for ARDUINO_NUCLEO_F410RB
103+
* @param None
104+
* @retval None
105+
*/
106+
voidSystemClock_Config(void)
107+
{
108+
RCC_OscInitTypeDef RCC_OscInitStruct = {};
109+
RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
110+
111+
/** Configure the main internal regulator output voltage
112+
*/
113+
__HAL_RCC_PWR_CLK_ENABLE();
114+
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
115+
116+
/** Initializes the RCC Oscillators according to the specified parameters
117+
* in the RCC_OscInitTypeDef structure.
118+
*/
119+
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
120+
RCC_OscInitStruct.HSEState = RCC_HSE_BYPASS;
121+
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
122+
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
123+
RCC_OscInitStruct.PLL.PLLM =4;
124+
RCC_OscInitStruct.PLL.PLLN =100;
125+
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
126+
RCC_OscInitStruct.PLL.PLLQ =4;
127+
RCC_OscInitStruct.PLL.PLLR =2;
128+
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
129+
Error_Handler();
130+
}
131+
132+
/** Initializes the CPU, AHB and APB buses clocks
133+
*/
134+
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
135+
| RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2;
136+
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
137+
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
138+
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2;
139+
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
140+
141+
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_3) != HAL_OK) {
142+
Error_Handler();
143+
}
144+
}
145+
146+
147+
#ifdef __cplusplus
148+
}
149+
#endif
150+
#endif/* ARDUINO_GENERIC_**/
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
/*
2+
*******************************************************************************
3+
* Copyright (c) 2025, 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+
#definePA3 PIN_A14
19+
#definePA2 PIN_A15
20+
#definePA10 2
21+
#definePB3 3
22+
#definePB5 4
23+
#definePB4 5
24+
#definePB10 6
25+
#definePA8 7
26+
#definePA9 8
27+
#definePC7 9
28+
#definePB6 10
29+
#definePA7 PIN_A6
30+
#definePA6 PIN_A7
31+
#definePA5 PIN_A8 // LD2
32+
#definePB9 14
33+
#definePB8 15
34+
// ST Morpho
35+
// CN7 Left Side
36+
#definePC10 16
37+
#definePC12 17
38+
// 18 is NC - BOOT0
39+
#definePA13 19 // SWD
40+
#definePA14 20 // SWD
41+
#definePA15 21
42+
#definePB7 22
43+
#definePC13 23 // USER_BTN
44+
#definePC14 24
45+
#definePC15 25
46+
#definePH0 26
47+
#definePH1 27
48+
#definePC2 PIN_A9
49+
#definePC3 PIN_A10
50+
// CN7 Right Side
51+
#definePC11 30
52+
#definePB11 31
53+
// CN10 Left Side
54+
#definePC9 32
55+
// CN10 Right side
56+
#definePC8 33
57+
#definePC6 34
58+
#definePC5 PIN_A11
59+
#definePA12 36
60+
#definePA11 37
61+
#definePB12 38
62+
// 39 is NC
63+
#definePB2 40
64+
#definePB1 PIN_A12
65+
#definePB15 42
66+
#definePB14 43
67+
#definePB13 44
68+
#definePC4 PIN_A13
69+
#definePA0 PIN_A0
70+
#definePA1 PIN_A1
71+
#definePA4 PIN_A2
72+
#definePB0 PIN_A3
73+
#definePC1 PIN_A4
74+
#definePC0 PIN_A5
75+
76+
// Alternate pins number
77+
#definePA2_ALT1 = (PA2 | ALT1)
78+
#definePA3_ALT1 = (PA3 | ALT1)
79+
#definePB9_ALT1 = (PB9 | ALT1)
80+
81+
#defineNUM_DIGITAL_PINS 52
82+
#defineNUM_ANALOG_INPUTS 16
83+
84+
// On-board LED pin number
85+
#ifndefLED_BUILTIN
86+
#defineLED_BUILTIN PA5
87+
#endif
88+
89+
// On-board user button
90+
#ifndefUSER_BTN
91+
#defineUSER_BTN PC13
92+
#endif
93+
94+
95+
// Timer Definitions
96+
// Use TIM9/TIM11 when possible as servo and tone don't need GPIO output pin
97+
#ifndefTIMER_TONE
98+
#defineTIMER_TONE TIM6
99+
#endif
100+
#ifndefTIMER_SERVO
101+
#defineTIMER_SERVO TIM11
102+
#endif
103+
104+
// UART Definitions
105+
#ifndefSERIAL_UART_INSTANCE
106+
#defineSERIAL_UART_INSTANCE 2 //Connected to ST-Link
107+
#endif
108+
109+
// Default pin used for 'Serial' instance (ex: ST-Link)
110+
// Mandatory for Firmata
111+
#ifndefPIN_SERIAL_RX
112+
#definePIN_SERIAL_RX PA3
113+
#endif
114+
#ifndefPIN_SERIAL_TX
115+
#definePIN_SERIAL_TX PA2
116+
#endif
117+
118+
/*----------------------------------------------------------------------------
119+
* Arduino objects - C++ only
120+
*----------------------------------------------------------------------------*/
121+
122+
#ifdef__cplusplus
123+
// These serial port names are intended to allow libraries and architecture-neutral
124+
// sketches to automatically default to the correct port name for a particular type
125+
// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
126+
// the first hardware serial port whose RX/TX pins are not dedicated to another use.
127+
//
128+
// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
129+
//
130+
// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
131+
//
132+
// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
133+
//
134+
// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
135+
//
136+
// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
137+
// pins are NOT connected to anything by default.
138+
#defineSERIAL_PORT_MONITOR Serial
139+
#defineSERIAL_PORT_HARDWARE Serial
140+
#endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp