Skip to content

Commit c8b489e

Browse files
authored
Merge pull request #15075 from jeromecoutant/PR_G0_CUBE
STM32G0 update drivers version to CUBE V1.5.0
2 parents c4f97fc + d61d7aa commit c8b489e

File tree

259 files changed

+15394
-5647
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

259 files changed

+15394
-5647
lines changed

targets/TARGET_STM/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ This table summarizes the STM32Cube versions currently used in Mbed OS master br
109109
| F3 | 1.11.2 | https://github.com/STMicroelectronics/STM32CubeF3 |
110110
| F4 | 1.26.1 | https://github.com/STMicroelectronics/STM32CubeF4 |
111111
| F7 | 1.16.1 | https://github.com/STMicroelectronics/STM32CubeF7 |
112-
| G0 | 1.4.1 | https://github.com/STMicroelectronics/STM32CubeG0 |
112+
| G0 | 1.5.0 | https://github.com/STMicroelectronics/STM32CubeG0 |
113113
| G4 | 1.4.0 | https://github.com/STMicroelectronics/STM32CubeG4 |
114114
| H7 | 1.9.0 | https://github.com/STMicroelectronics/STM32CubeH7 |
115115
| L0 | 1.12.0 | https://github.com/STMicroelectronics/STM32CubeL0 |
@@ -181,8 +181,8 @@ But also each STM32 Part Number with different FLASH size : STM32F401xC / STM32F
181181
Mbed OS porting layer specific for this family are placed here.
182182

183183
Example in TARGET_STM32G0:
184-
- TARGET_STM32G031xx
185-
- TARGET_STM32G071xx
184+
- TARGET_STM32G031x8
185+
- TARGET_STM32G071xB
186186
- ...
187187

188188
Each STM32 sub-family contains:
@@ -578,6 +578,7 @@ the CAN interface.
578578
While using RxInterrupt with the CAN object the receive ISR callback registered should defer read to thread context.
579579
A simple example is as shown below:
580580

581+
```
581582
#include "mbed.h"
582583
583584
Ticker ticker;
@@ -621,6 +622,7 @@ int main() {
621622
while(1) {
622623
}
623624
}
625+
```
624626

625627

626628
## Mbed OS Wiki pages
Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,29 @@
11
# Copyright (c) 2020 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
add_subdirectory(TARGET_STM32G030xx EXCLUDE_FROM_ALL)
5-
add_subdirectory(TARGET_STM32G031xx EXCLUDE_FROM_ALL)
6-
add_subdirectory(TARGET_STM32G041xx EXCLUDE_FROM_ALL)
7-
add_subdirectory(TARGET_STM32G070xx EXCLUDE_FROM_ALL)
8-
add_subdirectory(TARGET_STM32G071xx EXCLUDE_FROM_ALL)
9-
add_subdirectory(TARGET_STM32G081xx EXCLUDE_FROM_ALL)
4+
add_subdirectory(TARGET_STM32G030x8 EXCLUDE_FROM_ALL)
5+
add_subdirectory(TARGET_STM32G031x8 EXCLUDE_FROM_ALL)
6+
add_subdirectory(TARGET_STM32G041x8 EXCLUDE_FROM_ALL)
7+
add_subdirectory(TARGET_STM32G050x8 EXCLUDE_FROM_ALL)
8+
add_subdirectory(TARGET_STM32G051x8 EXCLUDE_FROM_ALL)
9+
add_subdirectory(TARGET_STM32G061x8 EXCLUDE_FROM_ALL)
10+
add_subdirectory(TARGET_STM32G070xB EXCLUDE_FROM_ALL)
11+
add_subdirectory(TARGET_STM32G071xB EXCLUDE_FROM_ALL)
12+
add_subdirectory(TARGET_STM32G081xB EXCLUDE_FROM_ALL)
13+
add_subdirectory(TARGET_STM32G0B0xE EXCLUDE_FROM_ALL)
14+
add_subdirectory(TARGET_STM32G0B1xE EXCLUDE_FROM_ALL)
15+
16+
add_subdirectory(TARGET_STM32G0C1xE EXCLUDE_FROM_ALL)
17+
1018
add_subdirectory(STM32Cube_FW EXCLUDE_FROM_ALL)
1119

1220
add_library(mbed-stm32g0 INTERFACE)
1321

22+
target_include_directories(mbed-stm32g0
23+
INTERFACE
24+
.
25+
)
26+
1427
target_sources(mbed-stm32g0
1528
INTERFACE
1629
analogin_device.c
@@ -23,9 +36,4 @@ target_sources(mbed-stm32g0
2336
spi_api.c
2437
)
2538

26-
target_include_directories(mbed-stm32g0
27-
INTERFACE
28-
.
29-
)
30-
3139
target_link_libraries(mbed-stm32g0 INTERFACE mbed-stm mbed-stm32g0cube-fw)
Lines changed: 51 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,42 +22,87 @@ extern "C" {
2222
#endif
2323

2424
typedef enum {
25-
ADC_1 = (int)ADC1_BASE
25+
ADC_1 = (int)ADC1_BASE,
2626
} ADCName;
2727

28+
#if defined DAC_BASE
2829
typedef enum {
29-
DAC_1 = (int)DAC_BASE
30+
DAC_1 = (int)DAC_BASE,
3031
} DACName;
32+
#endif
3133

3234
typedef enum {
3335
UART_1 = (int)USART1_BASE,
3436
UART_2 = (int)USART2_BASE,
37+
#if defined USART3_BASE
3538
UART_3 = (int)USART3_BASE,
39+
#endif
40+
#if defined USART4_BASE
3641
UART_4 = (int)USART4_BASE,
37-
LPUART_1 = (int)LPUART1_BASE
42+
#endif
43+
#if defined USART5_BASE
44+
UART_5 = (int)USART5_BASE,
45+
#endif
46+
#if defined USART6_BASE
47+
UART_6 = (int)USART6_BASE,
48+
#endif
49+
#if defined LPUART1_BASE
50+
LPUART_1 = (int)LPUART1_BASE,
51+
#endif
52+
#if defined LPUART2_BASE
53+
LPUART_2 = (int)LPUART2_BASE,
54+
#endif
3855
} UARTName;
3956

4057
#define DEVICE_SPI_COUNT 2
4158
typedef enum {
4259
SPI_1 = (int)SPI1_BASE,
43-
SPI_2 = (int)SPI2_BASE
60+
SPI_2 = (int)SPI2_BASE,
61+
#if defined SPI3_BASE
62+
SPI_3 = (int)SPI3_BASE,
63+
#endif
4464
} SPIName;
4565

4666
typedef enum {
4767
I2C_1 = (int)I2C1_BASE,
48-
I2C_2 = (int)I2C2_BASE
68+
I2C_2 = (int)I2C2_BASE,
69+
#if defined I2C3_BASE
70+
I2C_3 = (int)I2C3_BASE,
71+
#endif
4972
} I2CName;
5073

5174
typedef enum {
5275
PWM_1 = (int)TIM1_BASE,
76+
#if defined TIM2_BASE
5377
PWM_2 = (int)TIM2_BASE,
78+
#endif
5479
PWM_3 = (int)TIM3_BASE,
80+
#if defined TIM4_BASE
81+
PWM_4 = (int)TIM4_BASE,
82+
#endif
5583
PWM_14 = (int)TIM14_BASE,
84+
#if defined TIM15_BASE
5685
PWM_15 = (int)TIM15_BASE,
86+
#endif
5787
PWM_16 = (int)TIM16_BASE,
58-
PWM_17 = (int)TIM17_BASE
88+
PWM_17 = (int)TIM17_BASE,
5989
} PWMName;
6090

91+
#if defined FDCAN1_BASE
92+
typedef enum {
93+
CAN_1 = (int)FDCAN1_BASE,
94+
#if defined FDCAN2_BASE
95+
CAN_2 = (int)FDCAN2_BASE,
96+
#endif
97+
} CANName;
98+
#endif
99+
100+
#if defined USB_BASE
101+
typedef enum {
102+
USB_FS = (int)USB_BASE
103+
} USBName;
104+
#endif
105+
61106
#ifdef __cplusplus
62107
}
63108
#endif
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
This software component is provided to you as part of a software package and
2+
applicable license terms are in the Package_license file. If you received this
3+
software component outside of a package or without applicable license terms,
4+
the terms of the Apache-2.0 license shall apply.
5+
You may obtain a copy of the Apache-2.0 at:
6+
https://opensource.org/licenses/Apache-2.0

0 commit comments

Comments
 (0)