Skip to content

Commit 8b42748

Browse files
committed
[L4] Update STM32L4xx HAL Drivers to v1.11.0
Included in STM32CubeL4 FW V1.15.0 Note: Trailing spaces have been cleaned. Signed-off-by: Frederic Pillon <[email protected]>
1 parent 5eea48a commit 8b42748

File tree

145 files changed

+19923
-5289
lines changed

Some content is hidden

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

145 files changed

+19923
-5289
lines changed

system/Drivers/STM32L4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h

Lines changed: 264 additions & 21 deletions
Large diffs are not rendered by default.

system/Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,20 +72,22 @@
7272

7373
#if defined (STM32L471xx) || defined (STM32L475xx) || defined (STM32L476xx) || defined (STM32L485xx) || defined (STM32L486xx) || \
7474
defined (STM32L496xx) || defined (STM32L4A6xx) || \
75+
defined (STM32L4P5xx) || defined (STM32L4Q5xx) || \
7576
defined (STM32L4R5xx) || defined (STM32L4R7xx) || defined (STM32L4R9xx) || defined (STM32L4S5xx) || defined (STM32L4S7xx) || defined (STM32L4S9xx)
7677
#define SYSCFG_BOOT_FMC SYSCFG_MEMRMP_MEM_MODE_1
7778
#endif /* STM32L471xx || STM32L475xx || STM32L476xx || STM32L485xx || STM32L486xx || */
7879
/* STM32L496xx || STM32L4A6xx || */
80+
/* STM32L4P5xx || STM32L4Q5xx || */
7981
/* STM32L4R5xx || STM32L4R7xx || STM32L4R9xx || STM32L4S5xx || STM32L4S7xx || STM32L4S9xx */
8082

8183
#define SYSCFG_BOOT_SRAM (SYSCFG_MEMRMP_MEM_MODE_1 | SYSCFG_MEMRMP_MEM_MODE_0)
8284

83-
#if defined (STM32L4R5xx) || defined (STM32L4R7xx) || defined (STM32L4R9xx) || defined (STM32L4S5xx) || defined (STM32L4S7xx) || defined (STM32L4S9xx)
85+
#if defined (STM32L4P5xx) || defined (STM32L4Q5xx) || defined (STM32L4R5xx) || defined (STM32L4R7xx) || defined (STM32L4R9xx) || defined (STM32L4S5xx) || defined (STM32L4S7xx) || defined (STM32L4S9xx)
8486
#define SYSCFG_BOOT_OCTOPSPI1 (SYSCFG_MEMRMP_MEM_MODE_2)
8587
#define SYSCFG_BOOT_OCTOPSPI2 (SYSCFG_MEMRMP_MEM_MODE_2 | SYSCFG_MEMRMP_MEM_MODE_0)
8688
#else
8789
#define SYSCFG_BOOT_QUADSPI (SYSCFG_MEMRMP_MEM_MODE_2 | SYSCFG_MEMRMP_MEM_MODE_1)
88-
#endif /* STM32L4R5xx || STM32L4R7xx || STM32L4R9xx || STM32L4S5xx || STM32L4S7xx || STM32L4S9xx */
90+
#endif /* STM32L4P5xx || STM32L4Q5xx || STM32L4R5xx || STM32L4R7xx || STM32L4R9xx || STM32L4S5xx || STM32L4S7xx || STM32L4S9xx */
8991

9092
/**
9193
* @}
@@ -385,6 +387,7 @@
385387

386388
#if defined (STM32L471xx) || defined (STM32L475xx) || defined (STM32L476xx) || defined (STM32L485xx) || defined (STM32L486xx) || \
387389
defined (STM32L496xx) || defined (STM32L4A6xx) || \
390+
defined (STM32L4P5xx) || defined (STM32L4Q5xx) || \
388391
defined (STM32L4R5xx) || defined (STM32L4R7xx) || defined (STM32L4R9xx) || defined (STM32L4S5xx) || defined (STM32L4S7xx) || defined (STM32L4S9xx)
389392

390393
/** @brief FMC Bank1 (NOR/PSRAM 1 and 2) mapped at 0x00000000.
@@ -393,9 +396,10 @@
393396

394397
#endif /* STM32L471xx || STM32L475xx || STM32L476xx || STM32L485xx || STM32L486xx || */
395398
/* STM32L496xx || STM32L4A6xx || */
399+
/* STM32L4P5xx || STM32L4Q5xx || */
396400
/* STM32L4R5xx || STM32L4R7xx || STM32L4R9xx || STM32L4S5xx || STM32L4S7xx || STM32L4S9xx */
397401

398-
#if defined (STM32L4R5xx) || defined (STM32L4R7xx) || defined (STM32L4R9xx) || defined (STM32L4S5xx) || defined (STM32L4S7xx) || defined (STM32L4S9xx)
402+
#if defined (STM32L4P5xx) || defined (STM32L4Q5xx) || defined (STM32L4R5xx) || defined (STM32L4R7xx) || defined (STM32L4R9xx) || defined (STM32L4S5xx) || defined (STM32L4S7xx) || defined (STM32L4S9xx)
399403

400404
/** @brief OCTOSPI mapped at 0x00000000.
401405
*/
@@ -408,7 +412,7 @@
408412
*/
409413
#define __HAL_SYSCFG_REMAPMEMORY_QUADSPI() MODIFY_REG(SYSCFG->MEMRMP, SYSCFG_MEMRMP_MEM_MODE, (SYSCFG_MEMRMP_MEM_MODE_2|SYSCFG_MEMRMP_MEM_MODE_1))
410414

411-
#endif /* STM32L4R5xx || STM32L4R7xx || STM32L4R9xx || STM32L4S5xx || STM32L4S7xx || STM32L4S9xx */
415+
#endif /* STM32L4P5xx || STM32L4Q5xx || STM32L4R5xx || STM32L4R7xx || STM32L4R9xx || STM32L4S5xx || STM32L4S7xx || STM32L4S9xx */
412416

413417
/**
414418
* @brief Return the boot mode as configured by user.
@@ -420,7 +424,18 @@
420424
* @arg @ref SYSCFG_BOOT_FMC
421425
@endif
422426
* @arg @ref SYSCFG_BOOT_SRAM
427+
@if STM32L422xx
423428
* @arg @ref SYSCFG_BOOT_QUADSPI
429+
@endif
430+
@if STM32L443xx
431+
* @arg @ref SYSCFG_BOOT_QUADSPI
432+
@endif
433+
@if STM32L462xx
434+
* @arg @ref SYSCFG_BOOT_QUADSPI
435+
@endif
436+
@if STM32L486xx
437+
* @arg @ref SYSCFG_BOOT_QUADSPI
438+
@endif
424439
*/
425440
#define __HAL_SYSCFG_GET_BOOT_MODE() READ_BIT(SYSCFG->MEMRMP, SYSCFG_MEMRMP_MEM_MODE)
426441

system/Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_adc_ex.h

Lines changed: 50 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ typedef struct
477477
)
478478
#elif defined (STM32L431xx) || defined (STM32L432xx) || defined (STM32L433xx) || defined (STM32L442xx) || defined (STM32L443xx) || defined (STM32L451xx) || defined (STM32L452xx) || defined (STM32L462xx) || defined (STM32L4R5xx) || defined (STM32L4R7xx) || defined (STM32L4R9xx) || defined (STM32L4S5xx) || defined (STM32L4S7xx) || defined (STM32L4S9xx)
479479
#define ADC_IS_INDEPENDENT(__HANDLE__) (SET)
480-
#elif defined (STM32L412xx) || defined (STM32L422xx)
480+
#elif defined (STM32L412xx) || defined (STM32L422xx) || defined (STM32L4P5xx) || defined (STM32L4Q5xx)
481481
#define ADC_IS_INDEPENDENT(__HANDLE__) (RESET)
482482
#endif
483483

@@ -636,7 +636,7 @@ typedef struct
636636
*/
637637
#if defined(ADC_MULTIMODE_SUPPORT)
638638
#define ADC_CLEAR_COMMON_CONTROL_REGISTER(__HANDLE__) CLEAR_BIT(__LL_ADC_COMMON_INSTANCE((__HANDLE__)->Instance)->CCR, \
639-
ADC_CCR_CKMODE | \
639+
ADC_CCR_CKMODE | \
640640
ADC_CCR_PRESC | \
641641
ADC_CCR_VBATEN | \
642642
ADC_CCR_TSEN | \
@@ -655,7 +655,7 @@ typedef struct
655655

656656
#endif /* ADC_MULTIMODE_SUPPORT */
657657

658-
#if defined (STM32L412xx) || defined (STM32L422xx) || defined (STM32L471xx) || defined (STM32L475xx) || defined (STM32L476xx) || defined (STM32L485xx) || defined (STM32L486xx) || defined (STM32L496xx) || defined (STM32L4A6xx)
658+
#if defined (STM32L412xx) || defined (STM32L422xx) || defined (STM32L471xx) || defined (STM32L475xx) || defined (STM32L476xx) || defined (STM32L485xx) || defined (STM32L486xx) || defined (STM32L496xx) || defined (STM32L4A6xx) || defined (STM32L4P5xx) || defined (STM32L4Q5xx)
659659
/**
660660
* @brief Set handle instance of the ADC slave associated to the ADC master.
661661
* @param __HANDLE_MASTER__ ADC master handle.
@@ -673,7 +673,7 @@ typedef struct
673673
* @param __HANDLE__ ADC handle.
674674
* @retval SET (ADC instance is valid) or RESET (ADC instance is invalid)
675675
*/
676-
#if defined (STM32L412xx) || defined (STM32L422xx) || defined (STM32L431xx) || defined (STM32L432xx) || defined (STM32L433xx) || defined (STM32L442xx) || defined (STM32L443xx) || defined (STM32L451xx) || defined (STM32L452xx) || defined (STM32L462xx) || defined (STM32L4R5xx) || defined (STM32L4R7xx) || defined (STM32L4R9xx) || defined (STM32L4S5xx) || defined (STM32L4S7xx) || defined (STM32L4S9xx)
676+
#if defined (STM32L412xx) || defined (STM32L422xx) || defined (STM32L431xx) || defined (STM32L432xx) || defined (STM32L433xx) || defined (STM32L442xx) || defined (STM32L443xx) || defined (STM32L451xx) || defined (STM32L452xx) || defined (STM32L462xx) || defined (STM32L4P5xx) || defined (STM32L4Q5xx) || defined (STM32L4R5xx) || defined (STM32L4R7xx) || defined (STM32L4R9xx) || defined (STM32L4S5xx) || defined (STM32L4S7xx) || defined (STM32L4S9xx)
677677
/* The temperature sensor measurement path (channel 17) is available on ADC1 */
678678
#define ADC_TEMPERATURE_SENSOR_INSTANCE(__HANDLE__) (((__HANDLE__)->Instance) == ADC1)
679679
#elif defined (STM32L471xx) || defined (STM32L475xx) || defined (STM32L476xx) || defined (STM32L485xx) || defined (STM32L486xx) || defined (STM32L496xx) || defined (STM32L4A6xx)
@@ -686,7 +686,7 @@ typedef struct
686686
* @param __HANDLE__ ADC handle.
687687
* @retval SET (ADC instance is valid) or RESET (ADC instance is invalid)
688688
*/
689-
#if defined (STM32L412xx) || defined (STM32L422xx) || defined (STM32L431xx) || defined (STM32L432xx) || defined (STM32L433xx) || defined (STM32L442xx) || defined (STM32L443xx) || defined (STM32L451xx) || defined (STM32L452xx) || defined (STM32L462xx) || defined (STM32L4R5xx) || defined (STM32L4R7xx) || defined (STM32L4R9xx) || defined (STM32L4S5xx) || defined (STM32L4S7xx) || defined (STM32L4S9xx)
689+
#if defined (STM32L412xx) || defined (STM32L422xx) || defined (STM32L431xx) || defined (STM32L432xx) || defined (STM32L433xx) || defined (STM32L442xx) || defined (STM32L443xx) || defined (STM32L451xx) || defined (STM32L452xx) || defined (STM32L462xx) || defined (STM32L4P5xx) || defined (STM32L4Q5xx) || defined (STM32L4R5xx) || defined (STM32L4R7xx) || defined (STM32L4R9xx) || defined (STM32L4S5xx) || defined (STM32L4S7xx) || defined (STM32L4S9xx)
690690
/* The battery voltage measurement path (channel 18) is available on ADC1 */
691691
#define ADC_BATTERY_VOLTAGE_INSTANCE(__HANDLE__) (((__HANDLE__)->Instance) == ADC1)
692692
#elif defined (STM32L471xx) || defined (STM32L475xx) || defined (STM32L476xx) || defined (STM32L485xx) || defined (STM32L486xx) || defined (STM32L496xx) || defined (STM32L4A6xx)
@@ -784,6 +784,50 @@ typedef struct
784784
((__CHANNEL__) == ADC_CHANNEL_14) || \
785785
((__CHANNEL__) == ADC_CHANNEL_15) || \
786786
((__CHANNEL__) == ADC_CHANNEL_16) )))
787+
#elif defined (STM32L4P5xx) || defined (STM32L4Q5xx)
788+
#define IS_ADC_CHANNEL(__HANDLE__, __CHANNEL__) (((((__HANDLE__)->Instance) == ADC1) && \
789+
(((__CHANNEL__) == ADC_CHANNEL_1) || \
790+
((__CHANNEL__) == ADC_CHANNEL_2) || \
791+
((__CHANNEL__) == ADC_CHANNEL_3) || \
792+
((__CHANNEL__) == ADC_CHANNEL_4) || \
793+
((__CHANNEL__) == ADC_CHANNEL_5) || \
794+
((__CHANNEL__) == ADC_CHANNEL_6) || \
795+
((__CHANNEL__) == ADC_CHANNEL_7) || \
796+
((__CHANNEL__) == ADC_CHANNEL_8) || \
797+
((__CHANNEL__) == ADC_CHANNEL_9) || \
798+
((__CHANNEL__) == ADC_CHANNEL_10) || \
799+
((__CHANNEL__) == ADC_CHANNEL_11) || \
800+
((__CHANNEL__) == ADC_CHANNEL_12) || \
801+
((__CHANNEL__) == ADC_CHANNEL_13) || \
802+
((__CHANNEL__) == ADC_CHANNEL_14) || \
803+
((__CHANNEL__) == ADC_CHANNEL_15) || \
804+
((__CHANNEL__) == ADC_CHANNEL_16) || \
805+
((__CHANNEL__) == ADC_CHANNEL_17) || \
806+
((__CHANNEL__) == ADC_CHANNEL_18) || \
807+
((__CHANNEL__) == ADC_CHANNEL_VREFINT) || \
808+
((__CHANNEL__) == ADC_CHANNEL_TEMPSENSOR) || \
809+
((__CHANNEL__) == ADC_CHANNEL_VBAT))) || \
810+
((((__HANDLE__)->Instance) == ADC2) && \
811+
(((__CHANNEL__) == ADC_CHANNEL_1) || \
812+
((__CHANNEL__) == ADC_CHANNEL_2) || \
813+
((__CHANNEL__) == ADC_CHANNEL_3) || \
814+
((__CHANNEL__) == ADC_CHANNEL_4) || \
815+
((__CHANNEL__) == ADC_CHANNEL_5) || \
816+
((__CHANNEL__) == ADC_CHANNEL_6) || \
817+
((__CHANNEL__) == ADC_CHANNEL_7) || \
818+
((__CHANNEL__) == ADC_CHANNEL_8) || \
819+
((__CHANNEL__) == ADC_CHANNEL_9) || \
820+
((__CHANNEL__) == ADC_CHANNEL_10) || \
821+
((__CHANNEL__) == ADC_CHANNEL_11) || \
822+
((__CHANNEL__) == ADC_CHANNEL_12) || \
823+
((__CHANNEL__) == ADC_CHANNEL_13) || \
824+
((__CHANNEL__) == ADC_CHANNEL_14) || \
825+
((__CHANNEL__) == ADC_CHANNEL_15) || \
826+
((__CHANNEL__) == ADC_CHANNEL_16) || \
827+
((__CHANNEL__) == ADC_CHANNEL_17) || \
828+
((__CHANNEL__) == ADC_CHANNEL_18) || \
829+
((__CHANNEL__) == ADC_CHANNEL_DAC1CH1_ADC2)|| \
830+
((__CHANNEL__) == ADC_CHANNEL_DAC1CH2_ADC2) )))
787831
#elif defined (STM32L471xx) || defined (STM32L475xx) || defined (STM32L476xx) || defined (STM32L485xx) || defined (STM32L486xx) || defined (STM32L496xx) || defined (STM32L4A6xx)
788832
#define IS_ADC_CHANNEL(__HANDLE__, __CHANNEL__) (((((__HANDLE__)->Instance) == ADC1) && \
789833
(((__CHANNEL__) == ADC_CHANNEL_1) || \
@@ -853,7 +897,7 @@ typedef struct
853897
* @param __CHANNEL__ programmed ADC channel.
854898
* @retval SET (__CHANNEL__ is valid) or RESET (__CHANNEL__ is invalid)
855899
*/
856-
#if defined (STM32L412xx) || defined (STM32L422xx) || defined (STM32L431xx) || defined (STM32L432xx) || defined (STM32L433xx) || defined (STM32L442xx) || defined (STM32L443xx) || defined (STM32L451xx) || defined (STM32L452xx) || defined (STM32L462xx) || defined (STM32L4R5xx) || defined (STM32L4R7xx) || defined (STM32L4R9xx) || defined (STM32L4S5xx) || defined (STM32L4S7xx) || defined (STM32L4S9xx)
900+
#if defined (STM32L412xx) || defined (STM32L422xx) || defined (STM32L431xx) || defined (STM32L432xx) || defined (STM32L433xx) || defined (STM32L442xx) || defined (STM32L443xx) || defined (STM32L451xx) || defined (STM32L452xx) || defined (STM32L462xx) || defined (STM32L4P5xx) || defined (STM32L4Q5xx) || defined (STM32L4R5xx) || defined (STM32L4R7xx) || defined (STM32L4R9xx) || defined (STM32L4S5xx) || defined (STM32L4S7xx) || defined (STM32L4S9xx)
857901
#define IS_ADC_DIFF_CHANNEL(__HANDLE__, __CHANNEL__) (((__CHANNEL__) == ADC_CHANNEL_1) || \
858902
((__CHANNEL__) == ADC_CHANNEL_2) || \
859903
((__CHANNEL__) == ADC_CHANNEL_3) || \

system/Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_conf_template.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@
6767
#define HAL_OPAMP_MODULE_ENABLED
6868
#define HAL_OSPI_MODULE_ENABLED
6969
#define HAL_PCD_MODULE_ENABLED
70+
#define HAL_PKA_MODULE_ENABLED
71+
#define HAL_PSSI_MODULE_ENABLED
7072
#define HAL_PWR_MODULE_ENABLED
7173
#define HAL_QSPI_MODULE_ENABLED
7274
#define HAL_RCC_MODULE_ENABLED
@@ -379,6 +381,14 @@
379381
#include "stm32l4xx_hal_pcd.h"
380382
#endif /* HAL_PCD_MODULE_ENABLED */
381383

384+
#ifdef HAL_PKA_MODULE_ENABLED
385+
#include "stm32l4xx_hal_pka.h"
386+
#endif /* HAL_PKA_MODULE_ENABLED */
387+
388+
#ifdef HAL_PSSI_MODULE_ENABLED
389+
#include "stm32l4xx_hal_pssi.h"
390+
#endif /* HAL_PSSI_MODULE_ENABLED */
391+
382392
#ifdef HAL_PWR_MODULE_ENABLED
383393
#include "stm32l4xx_hal_pwr.h"
384394
#endif /* HAL_PWR_MODULE_ENABLED */
@@ -447,7 +457,7 @@
447457
#ifdef USE_FULL_ASSERT
448458
/**
449459
* @brief The assert_param macro is used for function's parameters check.
450-
* @param expr: If expr is false, it calls assert_failed function
460+
* @param expr If expr is false, it calls assert_failed function
451461
* which reports the name of the source file and the source
452462
* line number of the call that failed.
453463
* If expr is true, it returns no value.

0 commit comments

Comments
 (0)