Skip to content

Update STM32G4 HAL and CMSIS drivers #1339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions libraries/SrcWrapper/src/HAL/stm32yyxx_hal_smbus_ex.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifdef STM32G4xx
#include "stm32g4xx_hal_smbus_ex.c"
#endif
#ifdef STM32L0xx
#include "stm32l0xx_hal_smbus_ex.c"
#endif
223 changes: 223 additions & 0 deletions system/Drivers/CMSIS/Device/ST/STM32G4xx/Include/stm32g471xx.h

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,6 @@ typedef struct
typedef struct {
HRTIM_Master_TypeDef sMasterRegs;
HRTIM_Timerx_TypeDef sTimerxRegs[6];
// uint32_t RESERVED0[32];
HRTIM_Common_TypeDef sCommonRegs;
}HRTIM_TypeDef;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,6 @@ typedef struct
typedef struct {
HRTIM_Master_TypeDef sMasterRegs;
HRTIM_Timerx_TypeDef sTimerxRegs[6];
// uint32_t RESERVED0[32];
HRTIM_Common_TypeDef sCommonRegs;
}HRTIM_TypeDef;

Expand Down
4 changes: 2 additions & 2 deletions system/Drivers/CMSIS/Device/ST/STM32G4xx/Include/stm32g4xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@
#endif /* USE_HAL_DRIVER */

/**
* @brief CMSIS Device version number V1.2.0
* @brief CMSIS Device version number V1.2.1
*/
#define __STM32G4_CMSIS_VERSION_MAIN (0x01U) /*!< [31:24] main version */
#define __STM32G4_CMSIS_VERSION_SUB1 (0x02U) /*!< [23:16] sub1 version */
#define __STM32G4_CMSIS_VERSION_SUB2 (0x00U) /*!< [15:8] sub2 version */
#define __STM32G4_CMSIS_VERSION_SUB2 (0x01U) /*!< [15:8] sub2 version */
#define __STM32G4_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
#define __STM32G4_CMSIS_VERSION ((__STM32G4_CMSIS_VERSION_MAIN << 24)\
|(__STM32G4_CMSIS_VERSION_SUB1 << 16)\
Expand Down
1 change: 1 addition & 0 deletions system/Drivers/CMSIS/Device/ST/STM32G4xx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Tag v1.0.0 | Tag v5.4.0_cm4 | Tag v1.0.0
Tag v1.1.0 | Tag v5.4.0_cm4 | Tag v1.1.0
Tag v1.1.1 | Tag v5.4.0_cm4 | Tag v1.2.0
Tag v1.2.0 | Tag v5.6.0_cm4 | Tag v1.3.0
Tag v1.2.1 | Tag v5.6.0_cm4 | Tag v1.4.0

The full **STM32CubeG4** MCU package is available [here](https://github.com/STMicroelectronics/STM32CubeG4).

Expand Down
108 changes: 74 additions & 34 deletions system/Drivers/CMSIS/Device/ST/STM32G4xx/Release_Notes.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,11 @@ <h1 id="purpose">Purpose</h1>
<div class="col-sm-12 col-lg-8">
<h1 id="update-history">Update History</h1>
<div class="collapse">
<input type="checkbox" id="collapse-section4" checked aria-hidden="true"> <label for="collapse-section4" aria-hidden="true">V1.2.0 / 26-June-2020</label>
<input type="checkbox" id="collapse-section1_2_1" aria-hidden="true"> <label for="collapse-section1_2_1" aria-hidden="true">V1.2.1 / 11-January-2021</label>
<div>
<h2 id="main-changes">Main Changes</h2>
<h3 id="maintenance-release">Maintenance release</h3>
<ul>
<li>Add support for STM32G491xx and STM32G4A1 devices</li>
<li>General updates to fix known defects and enhancements implementation</li>
</ul>
<h2 id="contents">Contents</h2>
Expand All @@ -70,35 +69,76 @@ <h2 id="contents">Contents</h2>
</thead>
<tbody>
<tr class="odd">
<td>- Add startup files for STM32G491xx/4A1xx devices</td>
<td>- General updates to fix known defects and enhancements implementation.</td>
</tr>
<tr class="even">
<td>- Rename <strong>“TIM7_DAC_IRQHandler”</strong> to <strong>“TIM7_IRQHandler”</strong> in MDK-ARM startup file for STM32G431xx/441xx/bk1cb devices</td>
<td>- Protect Vector table modification following SRAM or FLASH preprocessor directive by a generic preprocessor directive: USER_VECT_TAB_ADDRESS.</td>
</tr>
</tbody>
</table>
<p>: Fixed bugs list<br />
</p>
<h2 id="known-limitations">Known Limitations</h2>
<h2 id="development-toolchains-and-compilers">Development Toolchains and Compilers</h2>
<ul>
<li>IAR Embedded Workbench for ARM (EWARM) toolchain <strong>V8.50.4</strong> + ST-Link</li>
<li>RealView Microcontroller Development Kit (MDK-ARM) toolchain <strong>V5.31</strong> + ST-Link</li>
<li>CubeIDE toolchain <strong>V1.6.0</strong></li>
</ul>
<h2 id="supported-devices-and-boards">Supported Devices and boards</h2>
<ul>
<li>STM32G431xx, STM32G441xx devices</li>
<li>STM32G471xx devices</li>
<li>STM32G473xx, STM32G483xx devices</li>
<li>STM32G474xx, STM32G484xx devices</li>
<li>STM32G491xx, STM32G4A1xx devices</li>
</ul>
<p>Note: in the section above, main changes are highlighted in <strong>bold</strong> since previous release.</p>
</div>
</div>
<div class="collapse">
<input type="checkbox" id="collapse-section1_2_0" aria-hidden="true"> <label for="collapse-section1_2_0" aria-hidden="true">V1.2.0 / 26-June-2020</label>
<div>
<h2 id="main-changes-1">Main Changes</h2>
<h3 id="maintenance-release-1">Maintenance release</h3>
<ul>
<li>Add support for STM32G491xx and STM32G4A1 devices</li>
<li>General updates to fix known defects and enhancements implementation</li>
</ul>
<h2 id="contents-1">Contents</h2>
<table>
<caption>Additional features<br />
</caption>
<thead>
<tr class="header">
<th>Headline</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>- Remove HRTIM_BMTRGR useless constant definitions</td>
<td>- Add startup files for STM32G491xx/4A1xx devices</td>
</tr>
<tr class="even">
<td>- Remove ADC_CFGR2_LFTRIG useless constant definitions</td>
<td>- Rename <strong>“TIM7_DAC_IRQHandler”</strong> to <strong>“TIM7_IRQHandler”</strong> in MDK-ARM startup file for STM32G431xx/441xx/bk1cb devices</td>
</tr>
<tr class="odd">
<td>- Update HSE default value in system_stm32g4xx.c: 24MHz instead of 8MHz</td>
<td>- Remove HRTIM_BMTRGR useless constant definitions</td>
</tr>
<tr class="even">
<td>- Add License.md and Readme.md files required for GitHub publication</td>
<td>- Remove ADC_CFGR2_LFTRIG useless constant definitions</td>
</tr>
</tbody>
</table>
<p>: Fixed bugs list<br />
</p>
<h2 id="known-limitations">Known Limitations</h2>
<h2 id="development-toolchains-and-compilers">Development Toolchains and Compilers</h2>
<h2 id="known-limitations-1">Known Limitations</h2>
<h2 id="development-toolchains-and-compilers-1">Development Toolchains and Compilers</h2>
<ul>
<li>IAR Embedded Workbench for ARM (EWARM) toolchain <strong>V8.40.1</strong></li>
<li>RealView Microcontroller Development Kit (MDK-ARM) toolchain V5.29</li>
<li>STM32CubeIDE toolchain V1.4.0</li>
<li>RealView Microcontroller Development Kit (MDK-ARM) toolchain V5.27.1</li>
<li>STM32CubeIDE toolchain V1.3.0</li>
</ul>
<h2 id="supported-devices-and-boards">Supported Devices and boards</h2>
<h2 id="supported-devices-and-boards-1">Supported Devices and boards</h2>
<ul>
<li>STM32G431xx, STM32G441xx devices</li>
<li>STM32G471xx devices</li>
Expand All @@ -110,12 +150,12 @@ <h2 id="supported-devices-and-boards">Supported Devices and boards</h2>
</div>
</div>
<div class="collapse">
<input type="checkbox" id="collapse-section3" checked aria-hidden="true"> <label for="collapse-section3" aria-hidden="true">V1.1.1 / 14-February-2020</label>
<input type="checkbox" id="collapse-section1_1_1" aria-hidden="true"> <label for="collapse-section1_1_1" aria-hidden="true">V1.1.1 / 14-February-2020</label>
<div>
<h2 id="main-changes-1">Main Changes</h2>
<h3 id="maintenance-release-1">Maintenance release</h3>
<h2 id="main-changes-2">Main Changes</h2>
<h3 id="maintenance-release-2">Maintenance release</h3>
<p>General updates to fix known defects and enhancements implementation</p>
<h2 id="contents-1">Contents</h2>
<h2 id="contents-2">Contents</h2>
<table>
<caption>Additional features<br />
</caption>
Expand All @@ -140,21 +180,21 @@ <h2 id="contents-1">Contents</h2>
</thead>
<tbody>
<tr class="odd">
<td>Update STM32G473/483 startup files to support FDCAN2/3 instances</td>
<td>Update STM32G473/483 startup files to support FDCAN2/3 intances</td>
</tr>
<tr class="even">
<td>Remove IS_TIM_SYNCHRO_INSTANCE macro from device header files</td>
</tr>
</tbody>
</table>
<h2 id="known-limitations-1">Known Limitations</h2>
<h2 id="development-toolchains-and-compilers-1">Development Toolchains and Compilers</h2>
<h2 id="known-limitations-2">Known Limitations</h2>
<h2 id="development-toolchains-and-compilers-2">Development Toolchains and Compilers</h2>
<ul>
<li>IAR Embedded Workbench for ARM (EWARM) toolchain V8.32.3</li>
<li>RealView Microcontroller Development Kit (MDK-ARM) toolchain V5.27.1</li>
<li>STM32CubeIDE toolchain V1.3.0</li>
</ul>
<h2 id="supported-devices-and-boards-1">Supported Devices and boards</h2>
<h2 id="supported-devices-and-boards-2">Supported Devices and boards</h2>
<ul>
<li>STM32G431xx, STM32G441xx devices</li>
<li>STM32G471xx devices</li>
Expand All @@ -165,12 +205,12 @@ <h2 id="supported-devices-and-boards-1">Supported Devices and boards</h2>
</div>
</div>
<div class="collapse">
<input type="checkbox" id="collapse-section2" checked aria-hidden="true"> <label for="collapse-section2" aria-hidden="true">V1.1.0 / 28-June-2019</label>
<input type="checkbox" id="collapse-section1_1_0" aria-hidden="true"> <label for="collapse-section1_1_0" aria-hidden="true">V1.1.0 / 28-June-2019</label>
<div>
<h2 id="main-changes-2">Main Changes</h2>
<h3 id="maintenance-release-2">Maintenance release</h3>
<h2 id="main-changes-3">Main Changes</h2>
<h3 id="maintenance-release-3">Maintenance release</h3>
<p>Maintenance release of CMSIS Devices drivers supporting STM32G431xx, STM32G441xx, STM32G471xx, STM32G473xx, <strong>STM32G483xx</strong>, STM32G474xx and STM32G484xx devices</p>
<h2 id="contents-2">Contents</h2>
<h2 id="contents-3">Contents</h2>
<table>
<caption>Additional features<br />
</caption>
Expand Down Expand Up @@ -211,14 +251,14 @@ <h2 id="contents-2">Contents</h2>
</tr>
</tbody>
</table>
<h2 id="known-limitations-2">Known Limitations</h2>
<h2 id="development-toolchains-and-compilers-2">Development Toolchains and Compilers</h2>
<h2 id="known-limitations-3">Known Limitations</h2>
<h2 id="development-toolchains-and-compilers-3">Development Toolchains and Compilers</h2>
<ul>
<li>IAR Embedded Workbench for ARM (EWARM) toolchain V8.20.2</li>
<li>RealView Microcontroller Development Kit (MDK-ARM) toolchain V5.25</li>
<li>System Workbench STM32 (SW4STM32) toolchain V2.7.2</li>
</ul>
<h2 id="supported-devices-and-boards-2">Supported Devices and boards</h2>
<h2 id="supported-devices-and-boards-3">Supported Devices and boards</h2>
<ul>
<li>STM32G431xx, STM32G441xx devices</li>
<li>STM32G471xx devices</li>
Expand All @@ -229,14 +269,14 @@ <h2 id="supported-devices-and-boards-2">Supported Devices and boards</h2>
</div>
</div>
<div class="collapse">
<input type="checkbox" id="collapse-section1" aria-hidden="true"> <label for="collapse-section4" aria-hidden="true">V1.0.0 / 12-April-2019</label>
<input type="checkbox" id="collapse-section1_0_0" aria-hidden="true"> <label for="collapse-section1_0_0" aria-hidden="true">V1.0.0 / 12-April-2019</label>
<div>
<h2 id="main-changes-3">Main Changes</h2>
<h2 id="main-changes-4">Main Changes</h2>
<h3 id="first-release">First release</h3>
<p>First official release for STM32G4xx devices</p>
<h2 id="contents-3">Contents</h2>
<h2 id="contents-4">Contents</h2>
<p>CMSIS devices files for STM32G431xx, STM32G441xx, STM32G471xx, STM32G473xx, STM32G474xx and STM32G484xx.</p>
<h2 id="known-limitations-3">Known Limitations</h2>
<h2 id="known-limitations-4">Known Limitations</h2>
<table>
<thead>
<tr class="header">
Expand All @@ -249,13 +289,13 @@ <h2 id="known-limitations-3">Known Limitations</h2>
</tr>
</tbody>
</table>
<h2 id="development-toolchains-and-compilers-3">Development Toolchains and Compilers</h2>
<h2 id="development-toolchains-and-compilers-4">Development Toolchains and Compilers</h2>
<ul>
<li>IAR Embedded Workbench for ARM (EWARM) toolchain V8.20.2</li>
<li>RealView Microcontroller Development Kit (MDK-ARM) toolchain V5.25</li>
<li>System Workbench STM32 (SW4STM32) toolchain V2.7.2</li>
</ul>
<h2 id="supported-devices-and-boards-3">Supported Devices and boards</h2>
<h2 id="supported-devices-and-boards-4">Supported Devices and boards</h2>
<ul>
<li>STM32G431xx, STM32G441xx devices</li>
<li>STM32G471xx devices</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ LoopFillZerobss:
cmp r2, r4
bcc FillZerobss

/* Call the clock system initialization function.*/
/* Call the clock system intitialization function.*/
bl SystemInit
/* Call static constructors */
bl __libc_init_array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ LoopFillZerobss:
cmp r2, r4
bcc FillZerobss

/* Call the clock system initialization function.*/
/* Call the clock system intitialization function.*/
bl SystemInit
/* Call static constructors */
bl __libc_init_array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ LoopFillZerobss:
cmp r2, r4
bcc FillZerobss

/* Call the clock system initialization function.*/
/* Call the clock system intitialization function.*/
bl SystemInit
/* Call static constructors */
bl __libc_init_array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ LoopFillZerobss:
cmp r2, r4
bcc FillZerobss

/* Call the clock system initialization function.*/
/* Call the clock system intitialization function.*/
bl SystemInit
/* Call static constructors */
bl __libc_init_array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ LoopFillZerobss:
cmp r2, r4
bcc FillZerobss

/* Call the clock system initialization function.*/
/* Call the clock system intitialization function.*/
bl SystemInit
/* Call static constructors */
bl __libc_init_array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ LoopFillZerobss:
cmp r2, r4
bcc FillZerobss

/* Call the clock system initialization function.*/
/* Call the clock system intitialization function.*/
bl SystemInit
/* Call static constructors */
bl __libc_init_array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ LoopFillZerobss:
cmp r2, r4
bcc FillZerobss

/* Call the clock system initialization function.*/
/* Call the clock system intitialization function.*/
bl SystemInit
/* Call static constructors */
bl __libc_init_array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ LoopFillZerobss:
cmp r2, r4
bcc FillZerobss

/* Call the clock system initialization function.*/
/* Call the clock system intitialization function.*/
bl SystemInit
/* Call static constructors */
bl __libc_init_array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ LoopFillZerobss:
cmp r2, r4
bcc FillZerobss

/* Call the clock system initialization function.*/
/* Call the clock system intitialization function.*/
bl SystemInit
/* Call static constructors */
bl __libc_init_array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ LoopFillZerobss:
cmp r2, r3
bcc FillZerobss

/* Call the clock system initialization function.*/
/* Call the clock system intitialization function.*/
bl SystemInit
/* Call static constructors */
bl __libc_init_array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,29 @@
*/

/************************* Miscellaneous Configuration ************************/
/*!< Uncomment the following line if you need to relocate your vector Table in
Internal SRAM. */
/* Note: Following vector table addresses must be defined in line with linker
configuration. */
/*!< Uncomment the following line if you need to relocate the vector table
anywhere in Flash or Sram, else the vector table is kept at the automatic
remap of boot address selected */
/* #define USER_VECT_TAB_ADDRESS */

#if defined(USER_VECT_TAB_ADDRESS)
/*!< Uncomment the following line if you need to relocate your vector Table
in Sram else user remap will be done in Flash. */
/* #define VECT_TAB_SRAM */
#define VECT_TAB_OFFSET 0x00UL /*!< Vector Table base offset field.
This value must be a multiple of 0x200. */
#if defined(VECT_TAB_SRAM)
#define VECT_TAB_BASE_ADDRESS SRAM_BASE /*!< Vector Table base address field.
This value must be a multiple of 0x200. */
#define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field.
This value must be a multiple of 0x200. */
#else
#define VECT_TAB_BASE_ADDRESS FLASH_BASE /*!< Vector Table base address field.
This value must be a multiple of 0x200. */
#define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field.
This value must be a multiple of 0x200. */
#endif /* VECT_TAB_SRAM */
#endif /* USER_VECT_TAB_ADDRESS */
/******************************************************************************/
/**
* @}
Expand Down Expand Up @@ -167,11 +185,9 @@ void SystemInit(void)
#endif

/* Configure the Vector Table location add offset address ------------------*/
#ifdef VECT_TAB_SRAM
SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */
#else
SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */
#endif
#if defined(USER_VECT_TAB_ADDRESS)
SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */
#endif /* USER_VECT_TAB_ADDRESS */
}

/**
Expand Down
Loading