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

Commit8c83c13

Browse files
committed
variant: add Nucleo L010RB
Fixes#662Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parentcf6ba78 commit8c83c13

File tree

4 files changed

+298
-0
lines changed

4 files changed

+298
-0
lines changed

‎README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ User can add a STM32 based board following this [wiki](https://github.com/stm32d
107107
|:green_heart:| STM32G071RB|[Nucleo G071RB](https://www.st.com/en/evaluation-tools/nucleo-g071rb.html)|*1.6.0*||
108108
|:green_heart:| STM32G431RB|[Nucleo G431RB](https://www.st.com/en/evaluation-tools/nucleo-g431rb.html)|*1.7.0*||
109109
|:green_heart:| STM32G474RE|[Nucleo G474RE](https://www.st.com/en/evaluation-tools/nucleo-g474re.html)|*1.7.0*||
110+
|:yellow_heart:| STM32L010RB|[Nucleo L010RB](https://www.st.com/en/evaluation-tools/nucleo-l010rb.html)|**2.1.0**||
110111
|:green_heart:| STM32L053R8|[Nucleo L053R8](http://www.st.com/en/evaluation-tools/nucleo-l053r8.html)|*0.1.0*||
111112
|:green_heart:| STM32L073RZ|[Nucleo L073RZ](http://www.st.com/en/evaluation-tools/nucleo-l073rz.html)|*1.4.0*||
112113
|:green_heart:| STM32L152RE|[Nucleo L152RE](http://www.st.com/en/evaluation-tools/nucleo-l152re.html)|*1.0.0*||

‎boards.txt‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,19 @@ Nucleo_64.menu.pnum.NUCLEO_G474RE.build.product_line=STM32G474xx
373373
Nucleo_64.menu.pnum.NUCLEO_G474RE.build.variant=STM32G4xx/G473R(B-C-E)T_G474R(B-C-E)T_G483RET_G484RET
374374
Nucleo_64.menu.pnum.NUCLEO_G474RE.build.cmsis_lib_gcc=arm_cortexM4lf_math
375375

376+
# NUCLEO_L010RB board
377+
Nucleo_64.menu.pnum.NUCLEO_L010RB=Nucleo L010RB
378+
Nucleo_64.menu.pnum.NUCLEO_L010RB.node=NODE_L010RB
379+
Nucleo_64.menu.pnum.NUCLEO_L010RB.upload.maximum_size=131072
380+
Nucleo_64.menu.pnum.NUCLEO_L010RB.upload.maximum_data_size=20480
381+
Nucleo_64.menu.pnum.NUCLEO_L010RB.build.mcu=cortex-m0plus
382+
Nucleo_64.menu.pnum.NUCLEO_L010RB.build.board=NUCLEO_L010RB
383+
Nucleo_64.menu.pnum.NUCLEO_L010RB.build.series=STM32L0xx
384+
Nucleo_64.menu.pnum.NUCLEO_L010RB.build.product_line=STM32L010xB
385+
Nucleo_64.menu.pnum.NUCLEO_L010RB.build.variant=STM32L0xx/L010RBT
386+
Nucleo_64.menu.pnum.NUCLEO_L010RB.build.cmsis_lib_gcc=arm_cortexM0l_math
387+
Nucleo_64.menu.pnum.NUCLEO_L010RB.build.extra_flags=-D{build.product_line} {build.enable_usb} {build.xSerial} -D__CORTEX_SC=0
388+
376389
# NUCLEO_L053R8 board
377390
Nucleo_64.menu.pnum.NUCLEO_L053R8=Nucleo L053R8
378391
Nucleo_64.menu.pnum.NUCLEO_L053R8.node=NODE_L053R8
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
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+
#if defined(ARDUINO_NUCLEO_L010RB)
14+
15+
#include"pins_arduino.h"
16+
17+
// Pin number
18+
const PinName digitalPin[] = {
19+
PA_3,
20+
PA_2,
21+
PA_10,
22+
PB_3,
23+
PB_5,
24+
PB_4,
25+
PB_10,
26+
PA_8,
27+
PA_9,
28+
PC_7,
29+
PB_6,
30+
PA_7,
31+
PA_6,
32+
PA_5,
33+
PB_9,
34+
PB_8,
35+
PC_10,
36+
PC_12,
37+
PA_13,
38+
PA_14,
39+
PA_15,
40+
PB_7,
41+
PC_13,
42+
PC_14,
43+
PC_15,
44+
PH_0,
45+
PH_1,
46+
PC_2,
47+
PC_3,
48+
PC_11,
49+
PD_2,
50+
PC_9,
51+
PC_8,
52+
PC_6,
53+
PC_5,
54+
PA_12,
55+
PA_11,
56+
PB_12,
57+
PB_11,
58+
PB_2,
59+
PB_1,
60+
PB_15,
61+
PB_14,
62+
PB_13,
63+
PC_4,
64+
PA_0,
65+
PA_1,
66+
PA_4,
67+
PB_0,
68+
PC_1,
69+
PC_0
70+
};
71+
72+
// Analog (Ax) pin number array
73+
constuint32_t analogInputPin[] = {
74+
45,//A0
75+
46,//A1
76+
47,//A2
77+
48,//A3
78+
49,//A4
79+
50,//A5
80+
11,//A6
81+
12,//A7
82+
27,//A8
83+
28,//A9
84+
34,//A10
85+
44,//A11
86+
0,//A12
87+
1,//A13
88+
13,//A14
89+
40//A15
90+
};
91+
92+
// ----------------------------------------------------------------------------
93+
94+
#ifdef __cplusplus
95+
extern"C" {
96+
#endif
97+
98+
/**
99+
* @brief System Clock Configuration
100+
* @param None
101+
* @retval None
102+
*/
103+
WEAKvoidSystemClock_Config(void)
104+
{
105+
RCC_OscInitTypeDef RCC_OscInitStruct = {};
106+
RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
107+
108+
/** Configure the main internal regulator output voltage
109+
*/
110+
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
111+
/** Initializes the RCC Oscillators according to the specified parameters
112+
* in the RCC_OscInitTypeDef structure.
113+
*/
114+
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
115+
RCC_OscInitStruct.HSEState = RCC_HSE_BYPASS;
116+
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
117+
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
118+
RCC_OscInitStruct.PLL.PLLMUL = RCC_PLLMUL_8;
119+
RCC_OscInitStruct.PLL.PLLDIV = RCC_PLLDIV_2;
120+
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
121+
Error_Handler();
122+
}
123+
/** Initializes the CPU, AHB and APB buses clocks
124+
*/
125+
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
126+
| RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2;
127+
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
128+
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
129+
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
130+
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
131+
132+
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) {
133+
Error_Handler();
134+
}
135+
}
136+
137+
#ifdef __cplusplus
138+
}
139+
#endif
140+
141+
#endif/* ARDUINO_NUCLEO_L010RB*/
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
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+
#definePA3 PIN_A12
19+
#definePA2 PIN_A13
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 // PWM is not supported by D10 as no timer on PB6
29+
#definePA7 PIN_A6
30+
#definePA6 PIN_A7
31+
#definePA5 PIN_A14
32+
#definePB9 14
33+
#definePB8 15
34+
// ST Morpho
35+
// CN7 Left Side
36+
#definePC10 16
37+
#definePC12 17
38+
#definePA13 18 // SWD
39+
#definePA14 19 // SWD
40+
#definePA15 20
41+
#definePB7 21
42+
#definePC13 22
43+
#definePC14 23
44+
#definePC15 24
45+
#definePH0 25
46+
#definePH1 26
47+
#definePC2 PIN_A8
48+
#definePC3 PIN_A9
49+
// CN7 Right Side
50+
#definePC11 29
51+
#definePD2 30
52+
// CN10 Left Side
53+
#definePC9 31
54+
// CN10 Right side
55+
#definePC8 32
56+
#definePC6 33
57+
#definePC5 PIN_A10
58+
#definePA12 35
59+
#definePA11 36
60+
#definePB12 37
61+
#definePB11 38
62+
#definePB2 39
63+
#definePB1 PIN_A15
64+
#definePB15 41
65+
#definePB14 42
66+
#definePB13 43
67+
#definePC4 PIN_A11
68+
#definePA0 PIN_A0
69+
#definePA1 PIN_A1
70+
#definePA4 PIN_A2
71+
#definePB0 PIN_A3
72+
#definePC1 PIN_A4 // SB56 ON SB51 ON on the board!
73+
#definePC0 PIN_A5
74+
75+
// Alternate pins number
76+
#definePA2_ALT1 (PA2 | ALT1)
77+
#definePA3_ALT1 (PA3 | ALT1)
78+
#definePA14_ALT1 (PA14 | ALT1)
79+
80+
#defineNUM_DIGITAL_PINS 51
81+
#defineNUM_ANALOG_INPUTS 16
82+
83+
// On-board LED pin number
84+
#ifndefLED_BUILTIN
85+
#defineLED_BUILTIN PA5
86+
#endif
87+
#defineLED_GREEN LED_BUILTIN
88+
89+
// On-board user button
90+
#ifndefUSER_BTN
91+
#defineUSER_BTN PC13
92+
#endif
93+
94+
// Timer Definitions
95+
// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
96+
#ifndefTIMER_TONE
97+
#defineTIMER_TONE TIM21
98+
#endif
99+
#ifndefTIMER_SERVO
100+
#defineTIMER_SERVO TIM22
101+
#endif
102+
103+
// UART Definitions
104+
#ifndefSERIAL_UART_INSTANCE
105+
#defineSERIAL_UART_INSTANCE 101
106+
#endif
107+
108+
// Default pin used for generic 'Serial' instance
109+
// Mandatory for Firmata
110+
#ifndefPIN_SERIAL_RX
111+
#definePIN_SERIAL_RX PA3
112+
#endif
113+
#ifndefPIN_SERIAL_TX
114+
#definePIN_SERIAL_TX PA2
115+
#endif
116+
117+
/*----------------------------------------------------------------------------
118+
* Arduino objects - C++ only
119+
*----------------------------------------------------------------------------*/
120+
121+
#ifdef__cplusplus
122+
// These serial port names are intended to allow libraries and architecture-neutral
123+
// sketches to automatically default to the correct port name for a particular type
124+
// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
125+
// the first hardware serial port whose RX/TX pins are not dedicated to another use.
126+
//
127+
// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
128+
//
129+
// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
130+
//
131+
// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
132+
//
133+
// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
134+
//
135+
// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
136+
// pins are NOT connected to anything by default.
137+
#ifndefSERIAL_PORT_MONITOR
138+
#defineSERIAL_PORT_MONITOR Serial
139+
#endif
140+
#ifndefSERIAL_PORT_HARDWARE
141+
#defineSERIAL_PORT_HARDWARE Serial
142+
#endif
143+
#endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp