Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
1ba473e
Import STM32CubeWB v1.23.0 on 23-Sept-2025.
pi-anl Oct 14, 2025
564507a
Import STM32CubeL4 v1.17.0 on 03-Mar-2021.
doc-hex May 21, 2021
883fb77
fetch_from_upstream.sh: Explicitly set LC_CTYPE=C.
doc-hex May 21, 2021
1001676
Import STM32CubeWL v1.1.0 on 22-Jul-2021.
pi-anl Aug 28, 2021
e9b3cfa
README: Update to include WL series support.
dpgeorge Dec 13, 2021
2a7302c
Import STM32CubeG0 v1.5.1 on 08-Apr-2022.
dpgeorge Apr 28, 2022
4135b94
README: Update to include G0 series support.
dpgeorge Apr 28, 2022
f46f09e
Import STM32CubeL1 v1.10.3 on 08-Jun-2021.
yn386 Aug 30, 2022
ef88b4b
README: Update to include L1 series support.
dpgeorge Sep 23, 2022
06bada3
Import STM32CubeH7 v1.11.0 on 06-Dec-2022.
dpgeorge Dec 20, 2022
9aec4a3
Import STM32CubeH5 v1.0.0 on 15-Mar-2023.
dpgeorge Jun 14, 2023
d272c84
README: Update to include H5 series support.
dpgeorge Jun 14, 2023
33b7baa
Import STM32CubeN6 v1.1.0 on 28-Feb-2025.
dpgeorge May 16, 2025
1a1141a
README: Update to include N6 series support.
dpgeorge May 16, 2025
580eff1
F4_HAL/def: Define NULL instead of including stdio.h.
dpgeorge Aug 27, 2017
b7dd6e9
F4_HAL/rcc: Adjust computation of SYSCLK to retain precision.
dpgeorge Aug 27, 2017
5677778
F7_HAL/rcc: Adjust computation of SYSCLK to retain precision.
dpgeorge Aug 27, 2017
b7dc96d
F4_HAL/dma: Expose DMA_CalcBaseAndBitshift as a public function.
dpgeorge Aug 27, 2017
3a1a46c
F7_HAL/dma: Expose DMA_CalcBaseAndBitshift as a public function.
dpgeorge Aug 27, 2017
8366ee6
F4_HAL/i2c: Move DMA set-up to after sending I2C address.
dpgeorge Aug 27, 2017
9215345
L4_HAL/uart: Adapt UART HAL to avoid 64-bit integer division.
dpgeorge Aug 27, 2017
c5cd7a9
F4_HAL/pcd: Optimise writing to USB FIFO to fill it as much as possible.
dpgeorge Sep 26, 2018
64ecba5
F7_HAL/pcd: Optimise writing to USB FIFO to fill it as much as possible.
dpgeorge Sep 26, 2018
9c1ad73
L4_HAL/pcd: Optimise writing to USB FIFO to fill it as much as possible.
dpgeorge Sep 26, 2018
a6b3649
CMSIS/F4: Add RCC_CSR_BORRSTF for STM32F413.
chrismas9 Dec 29, 2018
d430445
F4_HAL/usb: Remove packed attribute for uint32_t (new GCC-8 warning)
prusnak Jan 23, 2019
a2c3844
F7_HAL/usb: Remove packed attribute for uint32_t (new GCC-8 warning)
prusnak Jan 23, 2019
9402ab7
H7_HAL/usb: Remove packed attribute for uint32_t (new GCC-8 warning)
prusnak Jan 23, 2019
b8768c8
F7_HAL/mmc: Fix CAPACITY constant used to determine high-capacity MMC.
dpgeorge Apr 1, 2019
12ac890
F4_HAL/uart: Use APB2 clock when configuring UART9 and UART10 baudrate.
chrismas9 Apr 19, 2019
2ba1dad
F4_HAL/uart: Fix UART10 in LL_USART_Init.
dlech Jun 30, 2020
248245a
F4_HAL/uart: Fix clock for UART9/10.
dlech Jun 30, 2020
f6b674d
F4_HAL/uart: Fix data loss when using DMA Rx with hardware flow control.
dlech Mar 12, 2021
5a2422a
F4_HAL/uart: Use bit-band register to set/clear bits.
dlech Mar 12, 2021
9f4f98c
F4_HAL/usb: Pass USB_OTG_CfgTypeDef by reference.
dlech Sep 27, 2021
c334b56
F7_HAL/usb: Pass USB_OTG_CfgTypeDef by reference.
dlech Sep 27, 2021
2c73a8e
H7_HAL/usb: Pass USB_OTG_CfgTypeDef by reference.
dlech Sep 27, 2021
01a2270
L0_HAL/usb: Pass USB_OTG_CfgTypeDef by reference.
dlech Sep 27, 2021
459e614
L4_HAL/usb: Pass USB_OTG_CfgTypeDef by reference.
dlech Sep 27, 2021
4e8de8b
WB_HAL/usb: Pass USB_OTG_CfgTypeDef by reference.
dlech Sep 27, 2021
d3252be
G4_HAL/usb: Pass USB_OTG_CfgTypeDef by reference.
dlech Sep 27, 2021
6364d0b
F4_HAL/mmc: Fix bug with missing parenthesis and logic.
dpgeorge Dec 13, 2021
39a3580
F4_HAL/mmc: Set the MMC relative address correctly.
dpgeorge Dec 13, 2021
8977329
F7_HAL/mmc: Set the MMC relative address correctly.
dpgeorge Dec 13, 2021
d9d4680
L4_HAL/sd: Fix bug with incorrect use of Init.ClockDiv.
dpgeorge Dec 13, 2021
b6b7ac9
F7_HAL/usb: Fix attr access of cfg now that it's a pointer.
dpgeorge Jan 6, 2022
a47fb89
L4_HAL/gpio_ex: Add #define for GPIO_AF14_TIM2 on L4P5/L4Q5.
chrismas9 Jul 2, 2022
fd6c6d2
F4_HAL/i2c: Fix I2C frequency calculation macros.
yn386 Sep 19, 2022
5fc814c
L1_HAL/utils: Fix compile error when USE_HAL_DRIVER is defined.
yn386 Aug 30, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions CMSIS/STM32F4xx/Include/stm32f413xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -10067,6 +10067,9 @@ typedef struct
#define RCC_CSR_RMVF_Pos (24U)
#define RCC_CSR_RMVF_Msk (0x1U << RCC_CSR_RMVF_Pos) /*!< 0x01000000 */
#define RCC_CSR_RMVF RCC_CSR_RMVF_Msk
#define RCC_CSR_BORRSTF_Pos (25U)
#define RCC_CSR_BORRSTF_Msk (0x1U << RCC_CSR_BORRSTF_Pos) /*!< 0x02000000 */
#define RCC_CSR_BORRSTF RCC_CSR_BORRSTF_Msk
#define RCC_CSR_PINRSTF_Pos (26U)
#define RCC_CSR_PINRSTF_Msk (0x1U << RCC_CSR_PINRSTF_Pos) /*!< 0x04000000 */
#define RCC_CSR_PINRSTF RCC_CSR_PINRSTF_Msk
Expand Down
7,439 changes: 7,439 additions & 0 deletions CMSIS/STM32G0xx/Include/stm32g030xx.h

Large diffs are not rendered by default.

7,980 changes: 7,980 additions & 0 deletions CMSIS/STM32G0xx/Include/stm32g031xx.h

Large diffs are not rendered by default.

8,288 changes: 8,288 additions & 0 deletions CMSIS/STM32G0xx/Include/stm32g041xx.h

Large diffs are not rendered by default.

7,563 changes: 7,563 additions & 0 deletions CMSIS/STM32G0xx/Include/stm32g050xx.h

Large diffs are not rendered by default.

8,515 changes: 8,515 additions & 0 deletions CMSIS/STM32G0xx/Include/stm32g051xx.h

Large diffs are not rendered by default.

8,823 changes: 8,823 additions & 0 deletions CMSIS/STM32G0xx/Include/stm32g061xx.h

Large diffs are not rendered by default.

7,725 changes: 7,725 additions & 0 deletions CMSIS/STM32G0xx/Include/stm32g070xx.h

Large diffs are not rendered by default.

9,249 changes: 9,249 additions & 0 deletions CMSIS/STM32G0xx/Include/stm32g071xx.h

Large diffs are not rendered by default.

9,557 changes: 9,557 additions & 0 deletions CMSIS/STM32G0xx/Include/stm32g081xx.h

Large diffs are not rendered by default.

9,341 changes: 9,341 additions & 0 deletions CMSIS/STM32G0xx/Include/stm32g0b0xx.h

Large diffs are not rendered by default.

11,267 changes: 11,267 additions & 0 deletions CMSIS/STM32G0xx/Include/stm32g0b1xx.h

Large diffs are not rendered by default.

11,575 changes: 11,575 additions & 0 deletions CMSIS/STM32G0xx/Include/stm32g0c1xx.h

Large diffs are not rendered by default.

244 changes: 244 additions & 0 deletions CMSIS/STM32G0xx/Include/stm32g0xx.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,244 @@
/**
******************************************************************************
* @file stm32g0xx.h
* @author MCD Application Team
* @brief CMSIS STM32G0xx Device Peripheral Access Layer Header File.
*
* The file is the unique include file that the application programmer
* is using in the C source code, usually in main.c. This file contains:
* - Configuration section that allows to select:
* - The STM32G0xx device used in the target application
* - To use or not the peripherals drivers in application code(i.e.
* code will be based on direct access to peripherals registers
* rather than drivers API), this option is controlled by
* "#define USE_HAL_DRIVER"
*
******************************************************************************
* @attention
*
* Copyright (c) 2018-2021 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/** @addtogroup CMSIS
* @{
*/

/** @addtogroup stm32g0xx
* @{
*/

#ifndef STM32G0xx_H
#define STM32G0xx_H

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

/** @addtogroup Library_configuration_section
* @{
*/

/**
* @brief STM32 Family
*/
#if !defined (STM32G0)
#define STM32G0
#endif /* STM32G0 */

/* Uncomment the line below according to the target STM32G0 device used in your
application
*/

#if !defined (STM32G071xx) && !defined (STM32G081xx) && !defined (STM32G070xx) \
&& !defined (STM32G030xx) && !defined (STM32G031xx) && !defined (STM32G041xx) \
&& !defined (STM32G0B0xx) && !defined (STM32G0B1xx) && !defined (STM32G0C1xx) \
&& !defined (STM32G050xx) && !defined (STM32G051xx) && !defined (STM32G061xx)
/* #define STM32G0B0xx */ /*!< STM32G0B0xx Devices */
/* #define STM32G0B1xx */ /*!< STM32G0B1xx Devices */
/* #define STM32G0C1xx */ /*!< STM32G0C1xx Devices */
/* #define STM32G070xx */ /*!< STM32G070xx Devices */
/* #define STM32G071xx */ /*!< STM32G071xx Devices */
/* #define STM32G081xx */ /*!< STM32G081xx Devices */
/* #define STM32G050xx */ /*!< STM32G050xx Devices */
/* #define STM32G051xx */ /*!< STM32G051xx Devices */
/* #define STM32G061xx */ /*!< STM32G061xx Devices */
/* #define STM32G030xx */ /*!< STM32G030xx Devices */
/* #define STM32G031xx */ /*!< STM32G031xx Devices */
/* #define STM32G041xx */ /*!< STM32G041xx Devices */
#endif

/* Tip: To avoid modifying this file each time you need to switch between these
devices, you can define the device in your toolchain compiler preprocessor.
*/
#if !defined (USE_HAL_DRIVER)
/**
* @brief Comment the line below if you will not use the peripherals drivers.
In this case, these drivers will not be included and the application code will
be based on direct access to peripherals registers
*/
/*#define USE_HAL_DRIVER */
#endif /* USE_HAL_DRIVER */

/**
* @brief CMSIS Device version number $VERSION$
*/
#define __STM32G0_CMSIS_VERSION_MAIN (0x01U) /*!< [31:24] main version */
#define __STM32G0_CMSIS_VERSION_SUB1 (0x04U) /*!< [23:16] sub1 version */
#define __STM32G0_CMSIS_VERSION_SUB2 (0x02U) /*!< [15:8] sub2 version */
#define __STM32G0_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
#define __STM32G0_CMSIS_VERSION ((__STM32G0_CMSIS_VERSION_MAIN << 24)\
|(__STM32G0_CMSIS_VERSION_SUB1 << 16)\
|(__STM32G0_CMSIS_VERSION_SUB2 << 8 )\
|(__STM32G0_CMSIS_VERSION_RC))

/**
* @}
*/

/** @addtogroup Device_Included
* @{
*/

#if defined(STM32G0B1xx)
#include "stm32g0b1xx.h"
#elif defined(STM32G0C1xx)
#include "stm32g0c1xx.h"
#elif defined(STM32G0B0xx)
#include "stm32g0b0xx.h"
#elif defined(STM32G071xx)
#include "stm32g071xx.h"
#elif defined(STM32G081xx)
#include "stm32g081xx.h"
#elif defined(STM32G070xx)
#include "stm32g070xx.h"
#elif defined(STM32G031xx)
#include "stm32g031xx.h"
#elif defined(STM32G041xx)
#include "stm32g041xx.h"
#elif defined(STM32G030xx)
#include "stm32g030xx.h"
#elif defined(STM32G051xx)
#include "stm32g051xx.h"
#elif defined(STM32G061xx)
#include "stm32g061xx.h"
#elif defined(STM32G050xx)
#include "stm32g050xx.h"
#else
#error "Please select first the target STM32G0xx device used in your application (in stm32g0xx.h file)"
#endif

/**
* @}
*/

/** @addtogroup Exported_types
* @{
*/
typedef enum
{
RESET = 0,
SET = !RESET
} FlagStatus, ITStatus;

typedef enum
{
DISABLE = 0,
ENABLE = !DISABLE
} FunctionalState;
#define IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) || ((STATE) == ENABLE))

typedef enum
{
SUCCESS = 0,
ERROR = !SUCCESS
} ErrorStatus;

/**
* @}
*/


/** @addtogroup Exported_macros
* @{
*/
#define SET_BIT(REG, BIT) ((REG) |= (BIT))

#define CLEAR_BIT(REG, BIT) ((REG) &= ~(BIT))

#define READ_BIT(REG, BIT) ((REG) & (BIT))

#define CLEAR_REG(REG) ((REG) = (0x0))

#define WRITE_REG(REG, VAL) ((REG) = (VAL))

#define READ_REG(REG) ((REG))

#define MODIFY_REG(REG, CLEARMASK, SETMASK) WRITE_REG((REG), (((READ_REG(REG)) & (~(CLEARMASK))) | (SETMASK)))

/* Use of interrupt control for register exclusive access */
/* Atomic 32-bit register access macro to set one or several bits */
#define ATOMIC_SET_BIT(REG, BIT) \
do { \
uint32_t primask; \
primask = __get_PRIMASK(); \
__set_PRIMASK(1); \
SET_BIT((REG), (BIT)); \
__set_PRIMASK(primask); \
} while(0)

/* Atomic 32-bit register access macro to clear one or several bits */
#define ATOMIC_CLEAR_BIT(REG, BIT) \
do { \
uint32_t primask; \
primask = __get_PRIMASK(); \
__set_PRIMASK(1); \
CLEAR_BIT((REG), (BIT)); \
__set_PRIMASK(primask); \
} while(0)

/* Atomic 32-bit register access macro to clear and set one or several bits */
#define ATOMIC_MODIFY_REG(REG, CLEARMSK, SETMASK) \
do { \
uint32_t primask; \
primask = __get_PRIMASK(); \
__set_PRIMASK(1); \
MODIFY_REG((REG), (CLEARMSK), (SETMASK)); \
__set_PRIMASK(primask); \
} while(0)

/* Atomic 16-bit register access macro to set one or several bits */
#define ATOMIC_SETH_BIT(REG, BIT) ATOMIC_SET_BIT(REG, BIT) \

/* Atomic 16-bit register access macro to clear one or several bits */
#define ATOMIC_CLEARH_BIT(REG, BIT) ATOMIC_CLEAR_BIT(REG, BIT) \

/* Atomic 16-bit register access macro to clear and set one or several bits */
#define ATOMIC_MODIFYH_REG(REG, CLEARMSK, SETMASK) ATOMIC_MODIFY_REG(REG, CLEARMSK, SETMASK) \

/*#define POSITION_VAL(VAL) (__CLZ(__RBIT(VAL)))*/
/**
* @}
*/

#if defined (USE_HAL_DRIVER)
#include "stm32g0xx_hal.h"
#endif /* USE_HAL_DRIVER */

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* STM32G0xx_H */
/**
* @}
*/

/**
* @}
*/
103 changes: 103 additions & 0 deletions CMSIS/STM32G0xx/Include/system_stm32g0xx.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
/**
******************************************************************************
* @file system_stm32g0xx.h
* @author MCD Application Team
* @brief CMSIS Cortex-M0+ Device System Source File for STM32G0xx devices.
******************************************************************************
* @attention
*
* Copyright (c) 2018-2021 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/** @addtogroup CMSIS
* @{
*/

/** @addtogroup stm32g0xx_system
* @{
*/

/**
* @brief Define to prevent recursive inclusion
*/
#ifndef SYSTEM_STM32G0XX_H
#define SYSTEM_STM32G0XX_H

#ifdef __cplusplus
extern "C" {
#endif

/** @addtogroup STM32G0xx_System_Includes
* @{
*/

/**
* @}
*/


/** @addtogroup STM32G0xx_System_Exported_types
* @{
*/
/* This variable is updated in three ways:
1) by calling CMSIS function SystemCoreClockUpdate()
2) by calling HAL API function HAL_RCC_GetSysClockFreq()
3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency
Note: If you use this function to configure the system clock; then there
is no need to call the 2 first functions listed above, since SystemCoreClock
variable is updated automatically.
*/
extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */

extern const uint32_t AHBPrescTable[16]; /*!< AHB prescalers table values */
extern const uint32_t APBPrescTable[8]; /*!< APB prescalers table values */

/**
* @}
*/

/** @addtogroup STM32G0xx_System_Exported_Constants
* @{
*/

/**
* @}
*/

/** @addtogroup STM32G0xx_System_Exported_Macros
* @{
*/

/**
* @}
*/

/** @addtogroup STM32G0xx_System_Exported_Functions
* @{
*/

extern void SystemInit(void);
extern void SystemCoreClockUpdate(void);
/**
* @}
*/

#ifdef __cplusplus
}
#endif

#endif /*SYSTEM_STM32G0XX_H */

/**
* @}
*/

/**
* @}
*/
Loading