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

Commit6ccf2cd

Browse files
committed
variant(wb): add Nucleo WB15CC
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent98dde27 commit6ccf2cd

File tree

4 files changed

+290
-0
lines changed

4 files changed

+290
-0
lines changed

‎README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ User can add a STM32 based board following this [wiki](https://github.com/stm32d
128128
|:green_heart:| STM32L452RE|[Nucleo L452RE](http://www.st.com/en/evaluation-tools/nucleo-l452re.html)|*1.5.0*||
129129
|:green_heart:| STM32L452RE-P|[Nucleo L452RE-P](http://www.st.com/en/evaluation-tools/nucleo-l452re-p.html)|*1.8.0*||
130130
|:green_heart:| STM32L476RG|[Nucleo L476RG](http://www.st.com/en/evaluation-tools/nucleo-l476rg.html)|*0.1.0*||
131+
|:yellow_heart:| STM32WB15CCU|[Nucleo-WB15CC](https://www.st.com/en/evaluation-tools/nucleo-wb15cc.html)|**2.5.0**||
131132
|:green_heart:| STM32WB55RG<br>STM32WB55CG|[P-Nucleo-WB55RG](https://www.st.com/en/evaluation-tools/p-nucleo-wb55.html)|*1.6.0*| BLE support with[STM32duinoBLE](https://github.com/stm32duino/STM32duinoBLE)|
132133
|:green_heart:| STM32WL55JC|[Nucleo WL55JC1](https://www.st.com/en/evaluation-tools/nucleo-wl55jc.html)|*2.1.0*| LoRa support not available|
133134

‎boards.txt‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,20 @@ Nucleo_64.menu.pnum.NUCLEO_L476RG.build.product_line=STM32L476xx
586586
Nucleo_64.menu.pnum.NUCLEO_L476RG.build.variant=STM32L4xx/L475R(C-E-G)T_L476R(C-E-G)T_L486RGT
587587
Nucleo_64.menu.pnum.NUCLEO_L476RG.build.cmsis_lib_gcc=arm_cortexM4lf_math
588588

589+
# NUCLEO_WB15CC
590+
Nucleo_64.menu.pnum.NUCLEO_WB15CC=Nucleo WB15CC
591+
Nucleo_64.menu.pnum.NUCLEO_WB15CC.node="NOD_WB15CC"
592+
Nucleo_64.menu.pnum.NUCLEO_WB15CC.upload.maximum_size=131072
593+
Nucleo_64.menu.pnum.NUCLEO_WB15CC.upload.maximum_data_size=12288
594+
Nucleo_64.menu.pnum.NUCLEO_WB15CC.build.mcu=cortex-m4
595+
Nucleo_64.menu.pnum.NUCLEO_WB15CC.build.fpu=-mfpu=fpv4-sp-d16
596+
Nucleo_64.menu.pnum.NUCLEO_WB15CC.build.float-abi=-mfloat-abi=hard
597+
Nucleo_64.menu.pnum.NUCLEO_WB15CC.build.board=NUCLEO_WB15CC
598+
Nucleo_64.menu.pnum.NUCLEO_WB15CC.build.series=STM32WBxx
599+
Nucleo_64.menu.pnum.NUCLEO_WB15CC.build.product_line=STM32WB15xx
600+
Nucleo_64.menu.pnum.NUCLEO_WB15CC.build.variant=STM32WBxx/WB15CCU
601+
Nucleo_64.menu.pnum.NUCLEO_WB15CC.build.cmsis_lib_gcc=arm_cortexM4lf_math
602+
589603
# P_NUCLEO_WB55RG board
590604
Nucleo_64.menu.pnum.P_NUCLEO_WB55RG=P-Nucleo WB55RG
591605
Nucleo_64.menu.pnum.P_NUCLEO_WB55RG.node="NODE_WB55RG,NOD_WB55RG"
Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
/*
2+
*******************************************************************************
3+
* Copyright (c) 2022, 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_WB15CC)
14+
#include"pins_arduino.h"
15+
#include"lock_resource.h"
16+
17+
// Pin number
18+
const PinName digitalPin[] = {
19+
PB_7,
20+
PB_6,
21+
PB_0,
22+
PA_12,
23+
PB_1,
24+
PA_11,
25+
PA_8,
26+
PE_4,
27+
PB_5,
28+
PA_15,
29+
PB_2,
30+
PA_7,
31+
PB_4,
32+
PA_5,
33+
PB_9,
34+
PB_8,
35+
PA_4,
36+
PA_6,
37+
PA_1,
38+
PA_0,
39+
PA_2,
40+
PA_3,
41+
// ST Morpho
42+
// CN7 Left Side
43+
PH_3,
44+
PA_13,
45+
PA_14,
46+
PC_14,
47+
PC_15,
48+
// CN10 Right side
49+
PA_9,
50+
PA_10,
51+
PB_3,
52+
};
53+
54+
// Analog (Ax) pin number array
55+
constuint32_t analogInputPin[] = {
56+
16,// A0
57+
17,// A1
58+
18,// A2
59+
19,// A3
60+
20,// A4
61+
21,// A5
62+
6,// A6
63+
11,// A7
64+
13,// A8
65+
27// A9
66+
};
67+
68+
// ----------------------------------------------------------------------------
69+
#ifdef __cplusplus
70+
extern"C" {
71+
#endif
72+
73+
/**
74+
* @brief System Clock Configuration
75+
* @param None
76+
* @retval None
77+
*/
78+
WEAKvoidSystemClock_Config(void)
79+
{
80+
RCC_OscInitTypeDef RCC_OscInitStruct = {};
81+
RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
82+
RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {};
83+
84+
/* This prevents concurrent access to RCC registers by CPU2 (M0+)*/
85+
hsem_lock(CFG_HW_RCC_SEMID, HSEM_LOCK_DEFAULT_RETRY);
86+
87+
/** Configure LSE Drive Capability
88+
*/
89+
HAL_PWR_EnableBkUpAccess();
90+
__HAL_RCC_LSEDRIVE_CONFIG(RCC_LSEDRIVE_MEDIUMHIGH);
91+
92+
/** Initializes the RCC Oscillators according to the specified parameters
93+
* in the RCC_OscInitTypeDef structure.
94+
*/
95+
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI | RCC_OSCILLATORTYPE_LSI1
96+
| RCC_OSCILLATORTYPE_HSE | RCC_OSCILLATORTYPE_LSE;
97+
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
98+
RCC_OscInitStruct.LSEState = RCC_LSE_ON;
99+
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
100+
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
101+
RCC_OscInitStruct.LSIState = RCC_LSI_ON;
102+
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
103+
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
104+
RCC_OscInitStruct.PLL.PLLM = RCC_PLLM_DIV2;
105+
RCC_OscInitStruct.PLL.PLLN =6;
106+
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
107+
RCC_OscInitStruct.PLL.PLLR = RCC_PLLR_DIV3;
108+
RCC_OscInitStruct.PLL.PLLQ = RCC_PLLQ_DIV2;
109+
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
110+
Error_Handler();
111+
}
112+
113+
/** Configure the SYSCLKSource, HCLK, PCLK1 and PCLK2 clocks dividers
114+
*/
115+
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK4 | RCC_CLOCKTYPE_HCLK2
116+
| RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
117+
| RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2;
118+
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
119+
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
120+
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
121+
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
122+
RCC_ClkInitStruct.AHBCLK2Divider = RCC_SYSCLK_DIV1;
123+
RCC_ClkInitStruct.AHBCLK4Divider = RCC_SYSCLK_DIV1;
124+
125+
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) {
126+
Error_Handler();
127+
}
128+
129+
/** Initializes the peripherals clock
130+
*/
131+
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_SMPS | RCC_PERIPHCLK_RFWAKEUP;
132+
PeriphClkInitStruct.RFWakeUpClockSelection = RCC_RFWKPCLKSOURCE_LSE;
133+
PeriphClkInitStruct.SmpsClockSelection = RCC_SMPSCLKSOURCE_HSE;
134+
PeriphClkInitStruct.SmpsDivSelection = RCC_SMPSCLKDIV_RANGE0;
135+
136+
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) {
137+
Error_Handler();
138+
}
139+
140+
LL_PWR_SMPS_SetStartupCurrent(LL_PWR_SMPS_STARTUP_CURRENT_80MA);
141+
LL_PWR_SMPS_SetOutputVoltageLevel(LL_PWR_SMPS_OUTPUT_VOLTAGE_1V40);
142+
LL_PWR_SMPS_Enable();
143+
144+
/* Select HSI as system clock source after Wake Up from Stop mode*/
145+
LL_RCC_SetClkAfterWakeFromStop(LL_RCC_STOP_WAKEUPCLOCK_HSI);
146+
147+
hsem_unlock(CFG_HW_RCC_SEMID);
148+
}
149+
150+
#ifdef __cplusplus
151+
}
152+
#endif
153+
#endif/* ARDUINO_NUCLEO_WB15CC*/
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
/*
2+
*******************************************************************************
3+
* Copyright (c) 2022, 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+
#definePB7 0
19+
#definePB6 1
20+
#definePB0 2
21+
#definePA12 3
22+
#definePB1 4
23+
#definePA11 5
24+
#definePA8 PIN_A6
25+
#definePE4 7
26+
#definePB5 8
27+
#definePA15 9
28+
#definePB2 10
29+
#definePA7 PIN_A7
30+
#definePB4 12
31+
#definePA5 PIN_A8
32+
#definePB9 14
33+
#definePB8 15
34+
#definePA4 PIN_A0
35+
#definePA6 PIN_A1
36+
#definePA1 PIN_A2
37+
#definePA0 PIN_A3
38+
#definePA2 PIN_A4
39+
#definePA3 PIN_A5
40+
// ST Morpho
41+
// CN7 Left Side
42+
#definePH3 22 // BOOT0
43+
#definePA13 23 // SWDIO
44+
#definePA14 24 // SWDCLK
45+
#definePC14 25 // OSC32_IN
46+
#definePC15 26 // OSC32_OUT
47+
// CN10 Right side
48+
#definePA9 PIN_A9
49+
#definePA10 28
50+
#definePB3 29
51+
52+
#defineNUM_DIGITAL_PINS 30
53+
#defineNUM_ANALOG_INPUTS 10
54+
55+
// On-board LED pin number
56+
#defineLED1 PB5
57+
#defineLED2 PB0
58+
#defineLED3 PB1
59+
#ifndefLED_BUILTIN
60+
#defineLED_BUILTIN LED1
61+
#endif
62+
#defineLED_BLUE LED1
63+
#defineLED_GREEN LED2
64+
#defineLED_RED LED3
65+
66+
// On-board user button
67+
#defineB1_BTN PA0
68+
#defineB2_BTN PE4
69+
#defineB3_BTN PA6
70+
#ifndefUSER_BTN
71+
#defineUSER_BTN B1_BTN
72+
#endif
73+
74+
// Timer Definitions
75+
#ifndefTIMER_TONE
76+
#defineTIMER_TONE TIM2
77+
#endif
78+
#ifndefTIMER_SERVO
79+
#defineTIMER_SERVO TIM1
80+
#endif
81+
82+
// UART Definitions
83+
#ifndefSERIAL_UART_INSTANCE
84+
#defineSERIAL_UART_INSTANCE 1 //Connected to ST-Link
85+
#endif
86+
87+
// Default pin used for 'Serial' instance (ex: ST-Link)
88+
// Mandatory for Firmata
89+
#ifndefPIN_SERIAL_RX
90+
#definePIN_SERIAL_RX PA10
91+
#endif
92+
#ifndefPIN_SERIAL_TX
93+
#definePIN_SERIAL_TX PA9
94+
#endif
95+
96+
// Only 128k provided for cpu1, so defined the FLASH_PAGE_NUMBER
97+
// for EEPROM emulation to the last 128k pages.
98+
#defineFLASH_PAGE_NUMBER 63
99+
100+
/*----------------------------------------------------------------------------
101+
* Arduino objects - C++ only
102+
*----------------------------------------------------------------------------*/
103+
104+
#ifdef__cplusplus
105+
// These serial port names are intended to allow libraries and architecture-neutral
106+
// sketches to automatically default to the correct port name for a particular type
107+
// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
108+
// the first hardware serial port whose RX/TX pins are not dedicated to another use.
109+
//
110+
// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
111+
//
112+
// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
113+
//
114+
// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
115+
//
116+
// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
117+
//
118+
// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
119+
// pins are NOT connected to anything by default.
120+
#defineSERIAL_PORT_MONITOR Serial
121+
#defineSERIAL_PORT_HARDWARE Serial1
122+
#endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp