Skip to content

Commit cd37bf4

Browse files
authored
Adding NUCLEO-U545RE-Q and NUCLEO-U5A5ZJ-Q support, with some changes to stm_dma_utils (ARMmbed#273)
* added an option "QSPI_OSPIM_IOPORT_HIGH=1" to allow using the high IO ports (IO 4~7) of an OSPI peripheral to drive a QSPI device updated STM32U5 firmware package to support STM32U5F/G devices STM DMA Utils: added stm_get_dma_instance, stm_set_dma_link, stm_get_dma_link for working with DMA code in external libraries * added NUCLEO-U545RE-Q and NUCLEO-U5A5ZJ-Q USB is not supported yet * added missing USART6 handlers for STM32U5 * changed PA_2_ALT0/PA_3_ALT0 in UART pinmap back to PA_2/PA_3 for NUCLEO-U545RE-Q * renamed stm_get_dma_link to stm_get_dma_handle_for_link renamed stm_set_dma_link to stm_set_dma_handle_for_link added option "qspi_ospim_ioport_high" for MCU_STM32U5 implemented SetSysClock_PLL_HSI for NUCLEO-U545RE-Q and NUCLEO-U5A5ZJ-Q made PLL_HSI the default clock source for NUCLEO-U545RE-Q and NUCLEO-U5A5ZJ-Q * changed clock sources of NUCLEO-U545RE-Q and NUCLEO-U5A5ZJ-Q back to PLL+MSI embedded LICENSE file into every source file in the STM32U5 firmware package
1 parent e8b6238 commit cd37bf4

File tree

281 files changed

+139630
-6629
lines changed

Some content is hidden

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

281 files changed

+139630
-6629
lines changed

targets/TARGET_STM/TARGET_STM32U5/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# Copyright (c) 2020 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4+
add_subdirectory(TARGET_STM32U545xE EXCLUDE_FROM_ALL)
45
add_subdirectory(TARGET_STM32U575xG EXCLUDE_FROM_ALL)
56
add_subdirectory(TARGET_STM32U575xI EXCLUDE_FROM_ALL)
67
add_subdirectory(TARGET_STM32U585xI EXCLUDE_FROM_ALL)
8+
add_subdirectory(TARGET_STM32U5A5xJ EXCLUDE_FROM_ALL)
79

810
add_subdirectory(STM32Cube_FW EXCLUDE_FROM_ALL)
911

targets/TARGET_STM/TARGET_STM32U5/PeripheralNames.h

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,15 @@ typedef enum {
3333

3434
typedef enum {
3535
UART_1 = (int)USART1_BASE,
36+
#if defined(USART2_BASE)
3637
UART_2 = (int)USART2_BASE,
38+
#endif
3739
UART_3 = (int)USART3_BASE,
3840
UART_4 = (int)UART4_BASE,
3941
UART_5 = (int)UART5_BASE,
42+
#if defined(USART6_BASE)
43+
UART_6 = (int)USART6_BASE,
44+
#endif
4045
LPUART_1 = (int)LPUART1_BASE
4146
} UARTName;
4247

@@ -50,7 +55,13 @@ typedef enum {
5055
I2C_1 = (int)I2C1_BASE,
5156
I2C_2 = (int)I2C2_BASE,
5257
I2C_3 = (int)I2C3_BASE,
53-
I2C_4 = (int)I2C4_BASE
58+
I2C_4 = (int)I2C4_BASE,
59+
#ifdef I2C5_BASE
60+
I2C_5 = (int)I2C5_BASE,
61+
#endif
62+
#ifdef I2C6_BASE
63+
I2C_6 = (int)I2C6_BASE
64+
#endif
5465
} I2CName;
5566

5667
typedef enum {
@@ -71,17 +82,28 @@ typedef enum {
7182

7283
typedef enum {
7384
QSPI_1 = (int)OCTOSPI1_R_BASE,
74-
QSPI_2 = (int)OCTOSPI2_R_BASE
85+
#if defined(OCTOSPI2_R_BASE)
86+
QSPI_2 = (int)OCTOSPI2_R_BASE
87+
#endif
7588
} QSPIName;
7689

7790
typedef enum {
7891
OSPI_1 = (int)OCTOSPI1_R_BASE,
79-
OSPI_2 = (int)OCTOSPI2_R_BASE
92+
#if defined(OCTOSPI2_R_BASE)
93+
OSPI_2 = (int)OCTOSPI2_R_BASE
94+
#endif
8095
} OSPIName;
8196

97+
#if defined(USB_OTG_FS_BASE) || defined(USB_DRD_BASE)
8298
typedef enum {
99+
#if defined(USB_OTG_FS_BASE)
83100
USB_FS = (int)USB_OTG_FS_BASE
101+
#endif
102+
#if defined(USB_DRD_BASE)
103+
USB_FS = (int)USB_DRD_BASE
104+
#endif
84105
} USBName;
106+
#endif
85107

86108
#ifdef __cplusplus
87109
}

targets/TARGET_STM/TARGET_STM32U5/STM32Cube_FW/CMSIS/LICENSE.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

targets/TARGET_STM/TARGET_STM32U5/STM32Cube_FW/CMSIS/partition_stm32u5xx.h

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
******************************************************************************
1414
* @attention
1515
*
16-
* Copyright (c) 2021 STMicroelectronics.
17-
* All rights reserved.
18-
*
19-
* This software is licensed under terms that can be found in the LICENSE file
20-
* in the root directory of this software component.
21-
* If no LICENSE file comes with this software, it is provided AS-IS.
16+
* This software component is provided to you as part of a software package and
17+
* applicable license terms are in the Package_license file. If you received this
18+
* software component outside of a package or without applicable license terms,
19+
* the terms of the Apache-2.0 license shall apply.
20+
* You may obtain a copy of the Apache-2.0 at:
21+
* https://opensource.org/licenses/Apache-2.0
2222
*
2323
******************************************************************************
2424
*/
@@ -54,6 +54,14 @@
5454
#include "partition_stm32u599xx.h"
5555
#elif defined(STM32U5A9xx)
5656
#include "partition_stm32u5a9xx.h"
57+
#elif defined(STM32U5F7xx)
58+
#include "partition_stm32u5f7xx.h"
59+
#elif defined(STM32U5G7xx)
60+
#include "partition_stm32u5g7xx.h"
61+
#elif defined(STM32U5F9xx)
62+
#include "partition_stm32u5f9xx.h"
63+
#elif defined(STM32U5G9xx)
64+
#include "partition_stm32u5g9xx.h"
5765
#elif defined(STM32U535xx)
5866
#include "partition_stm32u535xx.h"
5967
#elif defined(STM32U545xx)

targets/TARGET_STM/TARGET_STM32U5/STM32Cube_FW/CMSIS/stm32u535xx.h

Lines changed: 62 additions & 189 deletions
Large diffs are not rendered by default.

targets/TARGET_STM/TARGET_STM32U5/STM32Cube_FW/CMSIS/stm32u545xx.h

Lines changed: 62 additions & 103 deletions
Large diffs are not rendered by default.

targets/TARGET_STM/TARGET_STM32U5/STM32Cube_FW/CMSIS/stm32u575xx.h

Lines changed: 61 additions & 176 deletions
Large diffs are not rendered by default.

targets/TARGET_STM/TARGET_STM32U5/STM32Cube_FW/CMSIS/stm32u585xx.h

Lines changed: 61 additions & 73 deletions
Large diffs are not rendered by default.

targets/TARGET_STM/TARGET_STM32U5/STM32Cube_FW/CMSIS/stm32u595xx.h

Lines changed: 66 additions & 179 deletions
Large diffs are not rendered by default.

targets/TARGET_STM/TARGET_STM32U5/STM32Cube_FW/CMSIS/stm32u599xx.h

Lines changed: 66 additions & 179 deletions
Large diffs are not rendered by default.

targets/TARGET_STM/TARGET_STM32U5/STM32Cube_FW/CMSIS/stm32u5a5xx.h

Lines changed: 66 additions & 76 deletions
Large diffs are not rendered by default.

targets/TARGET_STM/TARGET_STM32U5/STM32Cube_FW/CMSIS/stm32u5a9xx.h

Lines changed: 66 additions & 76 deletions
Large diffs are not rendered by default.

targets/TARGET_STM/TARGET_STM32U5/STM32Cube_FW/CMSIS/stm32u5f7xx.h

Lines changed: 27166 additions & 0 deletions
Large diffs are not rendered by default.

targets/TARGET_STM/TARGET_STM32U5/STM32Cube_FW/CMSIS/stm32u5f9xx.h

Lines changed: 30322 additions & 0 deletions
Large diffs are not rendered by default.

targets/TARGET_STM/TARGET_STM32U5/STM32Cube_FW/CMSIS/stm32u5g7xx.h

Lines changed: 28150 additions & 0 deletions
Large diffs are not rendered by default.

targets/TARGET_STM/TARGET_STM32U5/STM32Cube_FW/CMSIS/stm32u5g9xx.h

Lines changed: 31306 additions & 0 deletions
Large diffs are not rendered by default.

targets/TARGET_STM/TARGET_STM32U5/STM32Cube_FW/CMSIS/stm32u5xx.h

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
******************************************************************************
1717
* @attention
1818
*
19-
* Copyright (c) 2021 STMicroelectronics.
20-
* All rights reserved.
21-
*
22-
* This software is licensed under terms that can be found in the LICENSE file
23-
* in the root directory of this software component.
24-
* If no LICENSE file comes with this software, it is provided AS-IS.
19+
* This software component is provided to you as part of a software package and
20+
* applicable license terms are in the Package_license file. If you received this
21+
* software component outside of a package or without applicable license terms,
22+
* the terms of the Apache-2.0 license shall apply.
23+
* You may obtain a copy of the Apache-2.0 at:
24+
* https://opensource.org/licenses/Apache-2.0
2525
*
2626
******************************************************************************
2727
*/
@@ -59,15 +59,21 @@
5959
#if !defined (STM32U575xx) && !defined (STM32U585xx) \
6060
&& !defined (STM32U595xx) && !defined (STM32U599xx) \
6161
&& !defined (STM32U5A5xx) && !defined (STM32U5A9xx) \
62+
&& !defined (STM32U5F7xx) && !defined (STM32U5G7xx) \
63+
&& !defined (STM32U5F9xx) && !defined (STM32U5G9xx) \
6264
&& !defined (STM32U535xx) && !defined (STM32U545xx) \
6365
/* #define STM32U575xx */ /*!< STM32U575CIU6 STM32U575CIT6 STM32U575RIT6 STM32U575VIT6 STM32U575ZIT6 STM32U575QII6 STM32U575AII6 STM32U575CIU6Q STM32U575CIT6Q STM32U575OIY6Q STM32U575VIT6Q STM32U575QII6Q STM32U575ZIT6Q STM32U575RIT6Q STM32U575CGU6 STM32U575CGT6 STM32U575RGT6 STM32U575VGT6 STM32U575ZGT6 STM32U575QGI6 STM32U575AGI6 STM32U575CGU6Q STM32U575CGT6Q STM32U575OGY6Q STM32U575VGT6Q STM32U575QGI6Q STM32U575ZGT6Q STM32U575RGT6Q STM32U575AGI6Q Devices */
6466
/* #define STM32U585xx */ /*!< STM32U585CIU6 STM32U585CIT6 STM32U585RIT6 STM32U585VIT6 STM32U585AII6 STM32U585QII6 STM32U585ZIT6 STM32U585OIY6Q STM32U585VIT6Q STM32U585QEI6Q STM32U585RIT6Q STM32U585AII6Q STM32U585CIU6Q STM32U585CIT6Q STM32U585ZET6Q Devices */
65-
/* #define STM32U595xx */ /*!< STM32U595ZJT6Q Device */
66-
/* #define STM32U599xx */ /*!< STM32U599NJH6Q STM32U599BJY6Q STM32U599NIH6Q Devices */
67-
/* #define STM32U5A5xx */ /*!< STM32U5A5ZJT6Q Device */
68-
/* #define STM32U5A9xx */ /*!< STM32U5A9NJH6Q STM32U5A9BJY6Q Devices */
69-
/* #define STM32U535xx */ /*!< STM32U535CET6 STM32U535CEU6 STM32U535RET6 STM32U535REI6 STM32U535VET6 STM32U535VEI6 STM32U535CET6Q STM32U535CEU6Q STM32U535RET6Q STM32U535REI6Q STM32U535VET6Q STM32U535VEI6Q STM32U535NEY6Q STM32U535JEY6Q Device */
70-
/* #define STM32U545xx */ /*!< STM32U545CET6 STM32U545CEU6 STM32U545RET6 STM32U545REI6 STM32U545VET6 STM32U545VEI6 STM32U545CET6Q STM32U545CEU6Q STM32U545RET6Q STM32U545REI6Q STM32U545VET6Q STM32U545VEI6Q STM32U545NEY6Q STM32U545JEY6Q Device */
67+
/* #define STM32U595xx */ /*!< STM32U595AJH6 STM32U595ZJT6 STM32U595QJI6 STM32U595VJT6 STM32U595RJT6 STM32U595AJH6Q STM32U595ZJY6QTR STM32U595ZJT6Q STM32U595QJI6Q STM32U595VJT6Q STM32U595RJT6Q STM32U595AIH6 STM32U595ZIT6 STM32U595QII6 STM32U595VIT6 STM32U595RIT6 STM32U595AIH6Q STM32U595ZIY6QTR STM32U595ZIT6Q STM32U595QII6Q STM32U595VIT6Q STM32U595RIT6Q Devices */
68+
/* #define STM32U599xx */ /*!< STM32U599VJT6 STM32U599NJH6Q STM32U599BJY6QTR STM32U599ZJY6QTR STM32U599ZJT6Q STM32U599VJT6Q STM32U599NIH6Q STM32U599ZIY6QTR STM32U599ZIT6Q STM32U599VIT6Q Devices */
69+
/* #define STM32U5A5xx */ /*!< STM32U5A5AJH6 STM32U5A5ZJT6 STM32U5A5QJI6 STM32U5A5VJT6 STM32U5A5RJT6 STM32U5A5AJH6Q STM32U5A5ZJY6QTR STM32U5A5ZJT6Q STM32U5A5QJI6Q STM32U5A5VJT6Q STM32U5A5RJT6Q STM32U5A5QII3Q Devices */
70+
/* #define STM32U5A9xx */ /*!< STM32U5A9NJH6Q STM32U5A9BJY6QTR STM32U5A9ZJY6QTR STM32U5A9ZJT6Q STM32U5A9VJT6Q Devices */
71+
/* #define STM32U5F7xx */ /*!< STM32U5F7VJT6Q STM32U5F7VJT6 STM32U5F7VIT6Q STM32U5F7VIT6 Devices */
72+
/* #define STM32U5G7xx */ /*!< STM32U5G7VJT6Q STM32U5G7VJT6 Devices */
73+
/* #define STM32U5F9xx */ /*!< STM32U5F9NJH6Q STM32U5F9BJY6QTR STM32U5F9ZJJ6QTR STM32U5F9ZJT6Q STM32U5F9VJT6Q STM32U5F9ZIJ6QTR STM32U5F9ZIT6Q STM32U5F9VIT6Q Devices */
74+
/* #define STM32U5G9xx */ /*!< STM32U5G9NJH6Q STM32U5G9BJY6QTR STM32U5G9ZJJ6QTR STM32U5G9ZJT6Q STM32U5G9VJT6Q Devices */
75+
/* #define STM32U535xx */ /*!< STM32U535CET6 STM32U535CEU6 STM32U535RET6 STM32U535REI6 STM32U535VET6 STM32U535VEI6 STM32U535CET6Q STM32U535CEU6Q STM32U535RET6Q STM32U535REI6Q STM32U535VET6Q STM32U535VEI6Q STM32U535NEY6Q STM32U535JEY6Q Devices */
76+
/* #define STM32U545xx */ /*!< STM32U545CET6 STM32U545CEU6 STM32U545RET6 STM32U545REI6 STM32U545VET6 STM32U545VEI6 STM32U545CET6Q STM32U545CEU6Q STM32U545RET6Q STM32U545REI6Q STM32U545VET6Q STM32U545VEI6Q STM32U545NEY6Q STM32U545JEY6Q Devices */
7177
#endif
7278

7379
/* Tip: To avoid modifying this file each time you need to switch between these
@@ -83,12 +89,12 @@
8389
#endif /* USE_HAL_DRIVER */
8490

8591
/**
86-
* @brief CMSIS Device version number 1.2.0
92+
* @brief CMSIS Device version number 1.4.0
8793
*/
88-
#define __STM32U5_CMSIS_VERSION_MAIN (0x01U) /*!< [31:24] main version */
89-
#define __STM32U5_CMSIS_VERSION_SUB1 (0x02U) /*!< [23:16] sub1 version */
90-
#define __STM32U5_CMSIS_VERSION_SUB2 (0x00U) /*!< [15:8] sub2 version */
91-
#define __STM32U5_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
94+
#define __STM32U5_CMSIS_VERSION_MAIN (0x01) /*!< [31:24] main version */
95+
#define __STM32U5_CMSIS_VERSION_SUB1 (0x04) /*!< [23:16] sub1 version */
96+
#define __STM32U5_CMSIS_VERSION_SUB2 (0x00) /*!< [15:8] sub2 version */
97+
#define __STM32U5_CMSIS_VERSION_RC (0x00) /*!< [7:0] release candidate */
9298
#define __STM32U5_CMSIS_VERSION ((__STM32U5_CMSIS_VERSION_MAIN << 24U)\
9399
|(__STM32U5_CMSIS_VERSION_SUB1 << 16U)\
94100
|(__STM32U5_CMSIS_VERSION_SUB2 << 8U )\
@@ -114,6 +120,14 @@
114120
#include "stm32u5a5xx.h"
115121
#elif defined(STM32U5A9xx)
116122
#include "stm32u5a9xx.h"
123+
#elif defined(STM32U5F9xx)
124+
#include "stm32u5f9xx.h"
125+
#elif defined(STM32U5G9xx)
126+
#include "stm32u5g9xx.h"
127+
#elif defined(STM32U5F7xx)
128+
#include "stm32u5f7xx.h"
129+
#elif defined(STM32U5G7xx)
130+
#include "stm32u5g7xx.h"
117131
#elif defined(STM32U535xx)
118132
#include "stm32u535xx.h"
119133
#elif defined(STM32U545xx)

targets/TARGET_STM/TARGET_STM32U5/STM32Cube_FW/CMSIS/system_stm32u5xx.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
******************************************************************************
77
* @attention
88
*
9-
* Copyright (c) 2021 STMicroelectronics.
10-
* All rights reserved.
11-
*
12-
* This software is licensed under terms that can be found in the LICENSE file
13-
* in the root directory of this software component.
14-
* If no LICENSE file comes with this software, it is provided AS-IS.
9+
* This software component is provided to you as part of a software package and
10+
* applicable license terms are in the Package_license file. If you received this
11+
* software component outside of a package or without applicable license terms,
12+
* the terms of the Apache-2.0 license shall apply.
13+
* You may obtain a copy of the Apache-2.0 at:
14+
* https://opensource.org/licenses/Apache-2.0
1515
*
1616
******************************************************************************
1717
*/

0 commit comments

Comments
 (0)