Skip to content

Commit

Permalink
Merge pull request #2198 from fpistm/STM32CubeU5_update
Browse files Browse the repository at this point in the history
chore(U5): update to latest STM32CubeU5 v1.4.0
  • Loading branch information
fpistm committed Nov 24, 2023
2 parents 08f5885 + 4165032 commit aa13ab1
Show file tree
Hide file tree
Showing 14 changed files with 485 additions and 360 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
******************************************************************************
* @file partition_stm32u595xx.h
* @author MCD Application Team
* @brief CMSIS STM32U599xx Device Initial Setup for Secure / Non-Secure Zones
* @brief CMSIS STM32U595xx Device Initial Setup for Secure / Non-Secure Zones
* for ARMCM33 based on CMSIS CORE partition_ARMCM33.h Template.
*
* This file contains:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
******************************************************************************
* @file partition_stm32u5f9xx.h
* @file partition_stm32u5f7xx.h
* @author MCD Application Team
* @brief CMSIS STM32U5F9xx Device Initial Setup for Secure / Non-Secure Zones
* @brief CMSIS STM32U5F7xx Device Initial Setup for Secure / Non-Secure Zones
* for ARMCM33 based on CMSIS CORE partition_ARMCM33.h Template.
*
* This file contains:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26361,11 +26361,11 @@ typedef struct
*/

/******************************* ADC Instances ********************************/
#define IS_ADC_ALL_INSTANCE(INSTANCE) (((INSTANCE) == ADC1_NS)|| \
((INSTANCE) == ADC1_S) || \
#define IS_ADC_ALL_INSTANCE(INSTANCE) (((INSTANCE) == ADC1_NS) || \
((INSTANCE) == ADC1_S) || \
((INSTANCE) == ADC2_NS) || \
((INSTANCE) == ADC2_S) || \
((INSTANCE) == ADC4_NS)|| \
((INSTANCE) == ADC4_NS) || \
((INSTANCE) == ADC4_S))

#define IS_ADC_MULTIMODE_MASTER_INSTANCE(INSTANCE) (((INSTANCE) == ADC1_NS) || \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27335,11 +27335,11 @@ typedef struct
*/

/******************************* ADC Instances ********************************/
#define IS_ADC_ALL_INSTANCE(INSTANCE) (((INSTANCE) == ADC1_NS)|| \
((INSTANCE) == ADC1_S) || \
#define IS_ADC_ALL_INSTANCE(INSTANCE) (((INSTANCE) == ADC1_NS) || \
((INSTANCE) == ADC1_S) || \
((INSTANCE) == ADC2_NS) || \
((INSTANCE) == ADC2_S) || \
((INSTANCE) == ADC4_NS)|| \
((INSTANCE) == ADC4_NS) || \
((INSTANCE) == ADC4_S))

#define IS_ADC_MULTIMODE_MASTER_INSTANCE(INSTANCE) (((INSTANCE) == ADC1_NS) || \
Expand Down
14 changes: 7 additions & 7 deletions system/Drivers/CMSIS/Device/ST/STM32U5xx/Include/stm32u5xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@
/* #define STM32U585xx */ /*!< STM32U585CIU6 STM32U585CIT6 STM32U585RIT6 STM32U585VIT6 STM32U585AII6 STM32U585QII6 STM32U585ZIT6 STM32U585OIY6Q STM32U585VIT6Q STM32U585QEI6Q STM32U585RIT6Q STM32U585AII6Q STM32U585CIU6Q STM32U585CIT6Q STM32U585ZET6Q Devices */
/* #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 */
/* #define STM32U599xx */ /*!< STM32U599VJT6 STM32U599NJH6Q STM32U599BJY6QTR STM32U599ZJY6QTR STM32U599ZJT6Q STM32U599VJT6Q STM32U599NIH6Q STM32U599ZIY6QTR STM32U599ZIT6Q STM32U599VIT6Q Devices */
/* #define STM32U5A5xx */ /*!< STM32U5A5AJH6 STM32U5A5ZJT6 STM32U5A5QJI6 STM32U5A5VJT6 STM32U5A5RJT6 STM32U5A5AJH6Q STM32U5A5ZJY6QTR STM32U5A5ZJT6Q STM32U5A5QJI6Q STM32U5A5VJT6Q STM32U5A5RJT6Q Devices */
/* #define STM32U5A5xx */ /*!< STM32U5A5AJH6 STM32U5A5ZJT6 STM32U5A5QJI6 STM32U5A5VJT6 STM32U5A5RJT6 STM32U5A5AJH6Q STM32U5A5ZJY6QTR STM32U5A5ZJT6Q STM32U5A5QJI6Q STM32U5A5VJT6Q STM32U5A5RJT6Q STM32U5A5QII3Q Devices */
/* #define STM32U5A9xx */ /*!< STM32U5A9NJH6Q STM32U5A9BJY6QTR STM32U5A9ZJY6QTR STM32U5A9ZJT6Q STM32U5A9VJT6Q Devices */
/* #define STM32U5F7xx */ /*!< STM32U5F7VJT6Q STM32U5F7VJT6 Devices STM32U5F7VIT6Q STM32U5F7VIT6 Devices */
/* #define STM32U5F7xx */ /*!< STM32U5F7VJT6Q STM32U5F7VJT6 STM32U5F7VIT6Q STM32U5F7VIT6 Devices */
/* #define STM32U5G7xx */ /*!< STM32U5G7VJT6Q STM32U5G7VJT6 Devices */
/* #define STM32U5F9xx */ /*!< STM32U5F9NJH6Q STM32U5F9BJY6QTR STM32U5F9ZJJ6QTR STM32U5F9ZJT6Q STM32U5F9VJT6Q Devices */
/* #define STM32U5F9xx */ /*!< STM32U5F9NJH6Q STM32U5F9BJY6QTR STM32U5F9ZJJ6QTR STM32U5F9ZJT6Q STM32U5F9VJT6Q STM32U5F9ZIJ6QTR STM32U5F9ZIT6Q STM32U5F9VIT6Q Devices */
/* #define STM32U5G9xx */ /*!< STM32U5G9NJH6Q STM32U5G9BJY6QTR STM32U5G9ZJJ6QTR STM32U5G9ZJT6Q STM32U5G9VJT6Q Devices */
/* #define STM32U535xx */ /*!< STM32U535CET6 STM32U535CEU6 STM32U535RET6 STM32U535REI6 STM32U535VET6 STM32U535VEI6 STM32U535CET6Q STM32U535CEU6Q STM32U535RET6Q STM32U535REI6Q STM32U535VET6Q STM32U535VEI6Q STM32U535NEY6Q STM32U535JEY6Q Device */
/* #define STM32U545xx */ /*!< STM32U545CET6 STM32U545CEU6 STM32U545RET6 STM32U545REI6 STM32U545VET6 STM32U545VEI6 STM32U545CET6Q STM32U545CEU6Q STM32U545RET6Q STM32U545REI6Q STM32U545VET6Q STM32U545VEI6Q STM32U545NEY6Q STM32U545JEY6Q Device */
/* #define STM32U535xx */ /*!< STM32U535CET6 STM32U535CEU6 STM32U535RET6 STM32U535REI6 STM32U535VET6 STM32U535VEI6 STM32U535CET6Q STM32U535CEU6Q STM32U535RET6Q STM32U535REI6Q STM32U535VET6Q STM32U535VEI6Q STM32U535NEY6Q STM32U535JEY6Q Devices */
/* #define STM32U545xx */ /*!< STM32U545CET6 STM32U545CEU6 STM32U545RET6 STM32U545REI6 STM32U545VET6 STM32U545VEI6 STM32U545CET6Q STM32U545CEU6Q STM32U545RET6Q STM32U545REI6Q STM32U545VET6Q STM32U545VEI6Q STM32U545NEY6Q STM32U545JEY6Q Devices */
#endif

/* Tip: To avoid modifying this file each time you need to switch between these
Expand All @@ -89,11 +89,11 @@
#endif /* USE_HAL_DRIVER */

/**
* @brief CMSIS Device version number 1.3.0
* @brief CMSIS Device version number 1.3.1
*/
#define __STM32U5_CMSIS_VERSION_MAIN (0x01U) /*!< [31:24] main version */
#define __STM32U5_CMSIS_VERSION_SUB1 (0x03U) /*!< [23:16] sub1 version */
#define __STM32U5_CMSIS_VERSION_SUB2 (0x00U) /*!< [15:8] sub2 version */
#define __STM32U5_CMSIS_VERSION_SUB2 (0x01U) /*!< [15:8] sub2 version */
#define __STM32U5_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
#define __STM32U5_CMSIS_VERSION ((__STM32U5_CMSIS_VERSION_MAIN << 24U)\
|(__STM32U5_CMSIS_VERSION_SUB1 << 16U)\
Expand Down
28 changes: 21 additions & 7 deletions system/Drivers/CMSIS/Device/ST/STM32U5xx/Release_Notes.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,33 @@ <h1 id="release-notes-for-stm32u5xx-cmsis">Release Notes for <mark> STM32U5xx C
<div class="col-sm-12 col-lg-8">
<h1 id="update-history"><strong>Update History</strong></h1>
<div class="collapse">
<input type="checkbox" id="collapse-section5" checked aria-hidden="true"> <label for="collapse-section5" checked aria-hidden="true"><strong>V1.3.0 / 09-June-2023</strong></label>
<input type="checkbox" id="collapse-section6" checked aria-hidden="true"> <label for="collapse-section6" checked aria-hidden="true"><strong>V1.3.1 / 20-October-2023</strong></label>
<div>
<h2 id="main-changes">Main Changes</h2>
<p><strong>CMSIS Device</strong> Official Release version of bits and registers definition aligned with RM0456 (STM32U5 reference manual)</p>
<ul>
<li>Update STM32U5A5xx devices list with STM32U5A5QII3Q under “stm32u5xx.h” file</li>
</ul>
<h2 id="backward-compatibility">Backward Compatibility</h2>
<ul>
<li>N/A</li>
</ul>
</div>
</div>
<div class="collapse">
<input type="checkbox" id="collapse-section5" aria-hidden="true"> <label for="collapse-section5" checked aria-hidden="true"><strong>V1.3.0 / 09-June-2023</strong></label>
<div>
<h2 id="main-changes-1">Main Changes</h2>
<p><strong>CMSIS Device</strong> Official Release version of bits and registers definition aligned with RM0456 (STM32U5 reference manual)</p>
<ul>
<li><strong>Support of new STM32U5F9xx, STM32U5G9xx, STM32U5F7xx and STM32U5G7xx devices</strong>:
<ul>
<li>Add “stm32u5f9xx.h”, “stm32u5g9xx.h”, “stm32u5f7xx.h” and “stm32u5g7xx.h” files</li>
<li>Add startup files “startup_stm32u5f9xx.s”, “startup_stm32u5g9xx.s”, “startup_stm32u5f7xx.s” and “startup_stm32u5g7xx.s” for EWARM, STM32CubeIDE and MDK-ARM toolchains</li>
<li>Add linker files for EWARM and STM32CubeIDE toolchains of STM32U5F9xx/STM32U5G9xx/STM32U5F7xx/STM32U5G7xx devices</li>
</ul></li>
</ul>
<h2 id="backward-compatibility">Backward Compatibility</h2>
<h2 id="backward-compatibility-1">Backward Compatibility</h2>
<ul>
<li>N/A</li>
</ul>
Expand All @@ -51,7 +65,7 @@ <h2 id="backward-compatibility">Backward Compatibility</h2>
<div class="collapse">
<input type="checkbox" id="collapse-section4" aria-hidden="true"> <label for="collapse-section4" checked aria-hidden="true"><strong>V1.2.0 / 08-June-2023</strong></label>
<div>
<h2 id="main-changes-1">Main Changes</h2>
<h2 id="main-changes-2">Main Changes</h2>
<p><strong>CMSIS Device</strong> Official Release version of bits and registers definition aligned with RM0456 (STM32U5 reference manual)</p>
<ul>
<li><strong>Support of stm32u535xx and stm32u545xx devices</strong>:
Expand Down Expand Up @@ -104,7 +118,7 @@ <h2 id="main-changes-1">Main Changes</h2>
<li>Rename ADC4_PW_VREFSECSMP to ADC4_PWRR_VREFSECSMP</li>
</ul></li>
</ul>
<h2 id="backward-compatibility-1">Backward Compatibility</h2>
<h2 id="backward-compatibility-2">Backward Compatibility</h2>
<ul>
<li>N/A</li>
</ul>
Expand All @@ -113,7 +127,7 @@ <h2 id="backward-compatibility-1">Backward Compatibility</h2>
<div class="collapse">
<input type="checkbox" id="collapse-section3" aria-hidden="true"> <label for="collapse-section3" checked aria-hidden="true"><strong>V1.1.0 / 16-February-2022</strong></label>
<div>
<h2 id="main-changes-2">Main Changes</h2>
<h2 id="main-changes-3">Main Changes</h2>
<ul>
<li><strong>CMSIS Device</strong> Maintenance Release version of bits and registers definition aligned with RM0456 (STM32U5 reference manual)
<ul>
Expand Down Expand Up @@ -143,7 +157,7 @@ <h2 id="main-changes-2">Main Changes</h2>
<div class="collapse">
<input type="checkbox" id="collapse-section2" aria-hidden="true"> <label for="collapse-section2" checked aria-hidden="true"><strong>V1.0.1 / 01-October-2021</strong></label>
<div>
<h2 id="main-changes-3">Main Changes</h2>
<h2 id="main-changes-4">Main Changes</h2>
<ul>
<li>Rename OTG_FS_BASE_NS to USB_OTG_FS_BASE_NS define</li>
<li>Rename OTG_FS_BASE_S to USB_OTG_FS_BASE_S define</li>
Expand All @@ -155,7 +169,7 @@ <h2 id="main-changes-3">Main Changes</h2>
<div class="collapse">
<input type="checkbox" id="collapse-section1" aria-hidden="true"> <label for="collapse-section1" checked aria-hidden="true"><strong>V1.0.0 / 28-June-2021</strong></label>
<div>
<h2 id="main-changes-4">Main Changes</h2>
<h2 id="main-changes-5">Main Changes</h2>
<ul>
<li>First official release version of bits and registers definition aligned with RM0456 (STM32U5 reference manual)</li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion system/Drivers/CMSIS/Device/ST/STM32YYxx_CMSIS_version.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* STM32L4: 1.7.3
* STM32L5: 1.0.5
* STM32MP1: 1.6.0
* STM32U5: 1.3.0
* STM32U5: 1.3.1
* STM32WB: 1.12.0
* STM32WL: 1.2.0

Expand Down
30 changes: 28 additions & 2 deletions system/Drivers/STM32U5xx_HAL_Driver/Inc/stm32u5xx_hal_adc.h
Original file line number Diff line number Diff line change
Expand Up @@ -2127,10 +2127,36 @@ __LL_ADC_CONVERT_DATA_RESOLUTION((__ADCx__), (__DATA__),\
#define __HAL_ADC_CALC_DATA_TO_VOLTAGE(__ADCx__, __VREFANALOG_VOLTAGE__, \
__ADC_DATA__, \
__ADC_RESOLUTION__) \
__LL_ADC_CALC_DATA_TO_VOLTAGE((__ADCx__), (__VREFANALOG_VOLTAGE__), \
(__ADC_DATA__), \
__LL_ADC_CALC_DATA_TO_VOLTAGE((__ADCx__), (__VREFANALOG_VOLTAGE__), \
(__ADC_DATA__), \
(__ADC_RESOLUTION__))

/**
* @brief Helper macro to calculate the voltage (unit: mVolt)
* corresponding to a ADC conversion data (unit: digital value)
* in differential ended mode.
* @note On STM32U5, this feature is available on ADC instances: ADC1, ADC2.
* @note Analog reference voltage (Vref+) must be either known from
* user board environment or can be calculated using ADC measurement
* and ADC helper macro @ref __LL_ADC_CALC_VREFANALOG_VOLTAGE().
* @param __ADCx__ ADC instance
* @param __VREFANALOG_VOLTAGE__ Analog reference voltage (unit: mV)
* @param __ADC_DATA__ ADC conversion data (resolution 12 bits)
* (unit: digital value).
* @param __ADC_RESOLUTION__ This parameter can be one of the following values:
* @arg @ref ADC_RESOLUTION_14B
* @arg @ref ADC_RESOLUTION_12B
* @arg @ref ADC_RESOLUTION_10B
* @arg @ref ADC_RESOLUTION_8B
* @retval ADC conversion data equivalent voltage value (unit: mVolt)
*/
#define __HAL_ADC_CALC_DIFF_DATA_TO_VOLTAGE(__ADCx__, __VREFANALOG_VOLTAGE__, \
__ADC_DATA__, \
__ADC_RESOLUTION__) \
__LL_ADC_CALC_DIFF_DATA_TO_VOLTAGE((__ADCx__), (__VREFANALOG_VOLTAGE__), \
(__ADC_DATA__), \
(__ADC_RESOLUTION__))

/**
* @brief Helper macro to calculate analog reference voltage (Vref+)
* (unit: mVolt) from ADC conversion data of internal voltage
Expand Down
Loading

0 comments on commit aa13ab1

Please sign in to comment.