ext/hal: stm32cube: STM32L4: Enable legacy CAN API

A new CAN API has been delivered on recent L4 stm32cube.
This new API breaks current CAN driver. Disable the new API and
enable the legacy API.

Fixes #8931

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
Erwan Gouriou 2018-07-31 11:52:39 +02:00 committed by Anas Nashif
commit ee29e60325
4 changed files with 1500 additions and 7 deletions

View file

@ -7,7 +7,7 @@ zephyr_sources(drivers/src/stm32l4xx_hal.c)
zephyr_sources(drivers/src/stm32l4xx_hal_rcc.c) zephyr_sources(drivers/src/stm32l4xx_hal_rcc.c)
zephyr_sources_ifdef(CONFIG_USE_STM32_HAL_ADC drivers/src/stm32l4xx_hal_adc.c) zephyr_sources_ifdef(CONFIG_USE_STM32_HAL_ADC drivers/src/stm32l4xx_hal_adc.c)
zephyr_sources_ifdef(CONFIG_USE_STM32_HAL_ADC_EX drivers/src/stm32l4xx_hal_adc_ex.c) zephyr_sources_ifdef(CONFIG_USE_STM32_HAL_ADC_EX drivers/src/stm32l4xx_hal_adc_ex.c)
zephyr_sources_ifdef(CONFIG_USE_STM32_HAL_CAN drivers/src/stm32l4xx_hal_can.c) zephyr_sources_ifdef(CONFIG_USE_STM32_HAL_CAN drivers/src/Legacy/stm32l4xx_hal_can.c)
zephyr_sources_ifdef(CONFIG_USE_STM32_HAL_COMP drivers/src/stm32l4xx_hal_comp.c) zephyr_sources_ifdef(CONFIG_USE_STM32_HAL_COMP drivers/src/stm32l4xx_hal_comp.c)
zephyr_sources_ifdef(CONFIG_USE_STM32_HAL_CORTEX drivers/src/stm32l4xx_hal_cortex.c) zephyr_sources_ifdef(CONFIG_USE_STM32_HAL_CORTEX drivers/src/stm32l4xx_hal_cortex.c)
zephyr_sources_ifdef(CONFIG_USE_STM32_HAL_CRC drivers/src/stm32l4xx_hal_crc.c) zephyr_sources_ifdef(CONFIG_USE_STM32_HAL_CRC drivers/src/stm32l4xx_hal_crc.c)

View file

@ -43,3 +43,14 @@ Patch List:
Impacted files: Impacted files:
ext/hal/st/stm32cube/stm32l4xx/drivers/include/stm32l4xx_ll_pwr.h ext/hal/st/stm32cube/stm32l4xx/drivers/include/stm32l4xx_ll_pwr.h
ST Bug tracker ID: 47844 ST Bug tracker ID: 47844
*Disable new CAN API and enable Legacy API
A new CAN API has been delivered on recent L4 stm32cube.
This new API breaks current CAN driver. Disable the new API and enable the
legacy API.
Disable related systematic warning message
Impacted files:
CMakeLists.txt
drivers/include/stm32l4xx_hal_conf.h
drivers/src/Legacy/stm32l4_hal_can.c

View file

@ -52,8 +52,8 @@
*/ */
#define HAL_MODULE_ENABLED #define HAL_MODULE_ENABLED
#define HAL_ADC_MODULE_ENABLED #define HAL_ADC_MODULE_ENABLED
#define HAL_CAN_MODULE_ENABLED /* #define HAL_CAN_MODULE_ENABLED */
/* #define HAL_CAN_LEGACY_MODULE_ENABLED */ #define HAL_CAN_LEGACY_MODULE_ENABLED
#define HAL_COMP_MODULE_ENABLED #define HAL_COMP_MODULE_ENABLED
#define HAL_CORTEX_MODULE_ENABLED #define HAL_CORTEX_MODULE_ENABLED
#define HAL_CRC_MODULE_ENABLED #define HAL_CRC_MODULE_ENABLED
@ -138,7 +138,7 @@
* When the CRS is not used, the HSI48 RC oscillator runs on it default frequency * When the CRS is not used, the HSI48 RC oscillator runs on it default frequency
* which is subject to manufacturing process variations. * which is subject to manufacturing process variations.
*/ */
#if !defined (HSI48_VALUE) #if !defined (HSI48_VALUE)
#define HSI48_VALUE 48000000U /*!< Value of the Internal High Speed oscillator for USB FS/SDMMC/RNG in Hz. #define HSI48_VALUE 48000000U /*!< Value of the Internal High Speed oscillator for USB FS/SDMMC/RNG in Hz.
The real value my vary depending on manufacturing process variations.*/ The real value my vary depending on manufacturing process variations.*/
#endif /* HSI48_VALUE */ #endif /* HSI48_VALUE */
@ -146,7 +146,7 @@
/** /**
* @brief Internal Low Speed oscillator (LSI) value. * @brief Internal Low Speed oscillator (LSI) value.
*/ */
#if !defined (LSI_VALUE) #if !defined (LSI_VALUE)
#define LSI_VALUE 32000U /*!< LSI Typical Value in Hz*/ #define LSI_VALUE 32000U /*!< LSI Typical Value in Hz*/
#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz #endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz
The real value may vary depending on the variations The real value may vary depending on the variations
@ -165,7 +165,7 @@
/** /**
* @brief External clock source for SAI1 peripheral * @brief External clock source for SAI1 peripheral
* This value is used by the RCC HAL module to compute the SAI1 & SAI2 clock source * This value is used by the RCC HAL module to compute the SAI1 & SAI2 clock source
* frequency. * frequency.
*/ */
#if !defined (EXTERNAL_SAI1_CLOCK_VALUE) #if !defined (EXTERNAL_SAI1_CLOCK_VALUE)
@ -174,7 +174,7 @@
/** /**
* @brief External clock source for SAI2 peripheral * @brief External clock source for SAI2 peripheral
* This value is used by the RCC HAL module to compute the SAI1 & SAI2 clock source * This value is used by the RCC HAL module to compute the SAI1 & SAI2 clock source
* frequency. * frequency.
*/ */
#if !defined (EXTERNAL_SAI2_CLOCK_VALUE) #if !defined (EXTERNAL_SAI2_CLOCK_VALUE)

File diff suppressed because it is too large Load diff