From e2b37fc68d5005d929152096cad4082b16610ec4 Mon Sep 17 00:00:00 2001 From: bcostm Date: Wed, 19 Aug 2015 10:48:17 +0200 Subject: [PATCH] Add missing PWM_12 and update map and system files to be in line with latest official version. --- .../TARGET_DISCO_F401VC/stm32f401xc.h | 14 ++- .../TARGET_DISCO_F401VC/stm32f4xx.h | 8 +- .../TARGET_DISCO_F401VC/system_stm32f4xx.h | 4 +- .../TARGET_DISCO_F429ZI/stm32f429xx.h | 15 ++-- .../TARGET_DISCO_F429ZI/stm32f4xx.h | 8 +- .../TARGET_DISCO_F429ZI/system_stm32f4xx.h | 4 +- .../TARGET_MTS_DRAGONFLY_F411RE/stm32f411xe.h | 14 ++- .../TARGET_MTS_DRAGONFLY_F411RE/stm32f4xx.h | 8 +- .../system_stm32f4xx.h | 4 +- .../TARGET_MTS_MDOT_F405RG/stm32f405xx.h | 60 +++++++++---- .../TARGET_MTS_MDOT_F405RG/stm32f4xx.h | 8 +- .../stm32f4xx_hal_conf.h | 89 ++++++++++++------- .../TARGET_MTS_MDOT_F405RG/system_stm32f4xx.h | 4 +- .../TARGET_MTS_MDOT_F411RE/stm32f411xe.h | 14 ++- .../TARGET_MTS_MDOT_F411RE/stm32f4xx.h | 8 +- .../TARGET_MTS_MDOT_F411RE/system_stm32f4xx.h | 4 +- .../TARGET_NUCLEO_F401RE/stm32f401xe.h | 14 ++- .../TARGET_NUCLEO_F401RE/stm32f4xx.h | 8 +- .../TARGET_NUCLEO_F401RE/system_stm32f4xx.h | 4 +- .../TARGET_NUCLEO_F411RE/stm32f411xe.h | 14 ++- .../TARGET_NUCLEO_F411RE/stm32f4xx.h | 8 +- .../TARGET_NUCLEO_F411RE/system_stm32f4xx.h | 4 +- .../TARGET_STM32F407VG/stm32f407xx.h | 58 ++++++++---- .../TARGET_STM32F407VG/stm32f4xx.h | 8 +- .../TARGET_STM32F407VG/system_stm32f4xx.h | 4 +- .../TARGET_UBLOX_C029/stm32f439xx.h | 41 +++++---- .../TARGET_UBLOX_C029/stm32f4xx.h | 8 +- .../TARGET_UBLOX_C029/system_stm32f4xx.h | 4 +- .../TARGET_DISCO_F407VG/PeripheralNames.h | 1 + .../TARGET_DISCO_F429ZI/PeripheralNames.h | 1 + .../TARGET_MTS_MDOT_F405RG/PeripheralNames.h | 1 + .../TARGET_UBLOX_C029/PeripheralNames.h | 1 + .../TARGET_STM/TARGET_STM32F4/pwmout_api.c | 7 +- 33 files changed, 262 insertions(+), 190 deletions(-) diff --git a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F4/TARGET_DISCO_F401VC/stm32f401xc.h b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F4/TARGET_DISCO_F401VC/stm32f401xc.h index add80683f4..2dd2c6797e 100644 --- a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F4/TARGET_DISCO_F401VC/stm32f401xc.h +++ b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F4/TARGET_DISCO_F401VC/stm32f401xc.h @@ -2,8 +2,8 @@ ****************************************************************************** * @file stm32f401xc.h * @author MCD Application Team - * @version V2.3.0 - * @date 02-March-2015 + * @version V2.3.2 + * @date 26-June-2015 * @brief CMSIS STM32F401xCxx Device Peripheral Access Layer Header File. * * This file contains: @@ -665,15 +665,12 @@ USB_OTG_HostChannelTypeDef; #define CCMDATARAM_BASE ((uint32_t)0x10000000) /*!< CCM(core coupled memory) data RAM(64 KB) base address in the alias region */ #define SRAM1_BASE ((uint32_t)0x20000000) /*!< SRAM1(112 KB) base address in the alias region */ #define SRAM2_BASE ((uint32_t)0x2001C000) /*!< SRAM2(16 KB) base address in the alias region */ -#define SRAM3_BASE ((uint32_t)0x20020000) /*!< SRAM3(64 KB) base address in the alias region */ #define PERIPH_BASE ((uint32_t)0x40000000) /*!< Peripheral base address in the alias region */ #define BKPSRAM_BASE ((uint32_t)0x40024000) /*!< Backup SRAM(4 KB) base address in the alias region */ -#define CCMDATARAM_BB_BASE ((uint32_t)0x12000000) /*!< CCM(core coupled memory) data RAM(64 KB) base address in the bit-band region */ #define SRAM1_BB_BASE ((uint32_t)0x22000000) /*!< SRAM1(112 KB) base address in the bit-band region */ -#define SRAM2_BB_BASE ((uint32_t)0x2201C000) /*!< SRAM2(16 KB) base address in the bit-band region */ -#define SRAM3_BB_BASE ((uint32_t)0x22020000) /*!< SRAM3(64 KB) base address in the bit-band region */ +#define SRAM2_BB_BASE ((uint32_t)0x22380000) /*!< SRAM2(16 KB) base address in the bit-band region */ #define PERIPH_BB_BASE ((uint32_t)0x42000000) /*!< Peripheral base address in the bit-band region */ -#define BKPSRAM_BB_BASE ((uint32_t)0x42024000) /*!< Backup SRAM(4 KB) base address in the bit-band region */ +#define BKPSRAM_BB_BASE ((uint32_t)0x42480000) /*!< Backup SRAM(4 KB) base address in the bit-band region */ #define FLASH_END ((uint32_t)0x0803FFFF) /*!< FLASH end address */ /* Legacy defines */ @@ -2447,7 +2444,6 @@ USB_OTG_HostChannelTypeDef; #define RCC_AHB1LPENR_SRAM1LPEN ((uint32_t)0x00010000) #define RCC_AHB1LPENR_SRAM2LPEN ((uint32_t)0x00020000) #define RCC_AHB1LPENR_BKPSRAMLPEN ((uint32_t)0x00040000) -#define RCC_AHB1LPENR_SRAM3LPEN ((uint32_t)0x00080000) #define RCC_AHB1LPENR_DMA1LPEN ((uint32_t)0x00200000) #define RCC_AHB1LPENR_DMA2LPEN ((uint32_t)0x00400000) @@ -2643,7 +2639,7 @@ USB_OTG_HostChannelTypeDef; /******************** Bits definition for RTC_PRER register *****************/ #define RTC_PRER_PREDIV_A ((uint32_t)0x007F0000) -#define RTC_PRER_PREDIV_S ((uint32_t)0x00001FFF) +#define RTC_PRER_PREDIV_S ((uint32_t)0x00007FFF) /******************** Bits definition for RTC_WUTR register *****************/ #define RTC_WUTR_WUT ((uint32_t)0x0000FFFF) diff --git a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F4/TARGET_DISCO_F401VC/stm32f4xx.h b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F4/TARGET_DISCO_F401VC/stm32f4xx.h index 0c7d396d03..bb60306ad3 100644 --- a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F4/TARGET_DISCO_F401VC/stm32f4xx.h +++ b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F4/TARGET_DISCO_F401VC/stm32f4xx.h @@ -2,8 +2,8 @@ ****************************************************************************** * @file stm32f4xx.h * @author MCD Application Team - * @version V2.3.0 - * @date 02-March-2015 + * @version V2.3.2 + * @date 26-June-2015 * @brief CMSIS STM32F4xx Device Peripheral Access Layer Header File. * * The file is the unique include file that the application programmer @@ -107,11 +107,11 @@ #endif /* USE_HAL_DRIVER */ /** - * @brief CMSIS Device version number V2.3.0 + * @brief CMSIS Device version number V2.3.2 */ #define __STM32F4xx_CMSIS_DEVICE_VERSION_MAIN (0x02) /*!< [31:24] main version */ #define __STM32F4xx_CMSIS_DEVICE_VERSION_SUB1 (0x03) /*!< [23:16] sub1 version */ -#define __STM32F4xx_CMSIS_DEVICE_VERSION_SUB2 (0x00) /*!< [15:8] sub2 version */ +#define __STM32F4xx_CMSIS_DEVICE_VERSION_SUB2 (0x02) /*!< [15:8] sub2 version */ #define __STM32F4xx_CMSIS_DEVICE_VERSION_RC (0x00) /*!< [7:0] release candidate */ #define __STM32F4xx_CMSIS_DEVICE_VERSION ((__STM32F4xx_CMSIS_DEVICE_VERSION_MAIN << 24)\ |(__STM32F4xx_CMSIS_DEVICE_VERSION_SUB1 << 16)\ diff --git a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F4/TARGET_DISCO_F401VC/system_stm32f4xx.h b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F4/TARGET_DISCO_F401VC/system_stm32f4xx.h index ea2f070a6b..aba880196b 100644 --- a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F4/TARGET_DISCO_F401VC/system_stm32f4xx.h +++ b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F4/TARGET_DISCO_F401VC/system_stm32f4xx.h @@ -2,8 +2,8 @@ ****************************************************************************** * @file system_stm32f4xx.h * @author MCD Application Team - * @version V2.3.0 - * @date 02-March-2015 + * @version V2.3.2 + * @date 26-June-2015 * @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices. ****************************************************************************** * @attention diff --git a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F4/TARGET_DISCO_F429ZI/stm32f429xx.h b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F4/TARGET_DISCO_F429ZI/stm32f429xx.h index 647565dfc1..1da4d8cb72 100644 --- a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F4/TARGET_DISCO_F429ZI/stm32f429xx.h +++ b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F4/TARGET_DISCO_F429ZI/stm32f429xx.h @@ -2,8 +2,8 @@ ****************************************************************************** * @file stm32f429xx.h * @author MCD Application Team - * @version V2.3.0 - * @date 02-March-2015 + * @version V2.3.2 + * @date 26-June-2015 * @brief CMSIS STM32F429xx Device Peripheral Access Layer Header File. * * This file contains: @@ -1060,12 +1060,11 @@ USB_OTG_HostChannelTypeDef; #define PERIPH_BASE ((uint32_t)0x40000000) /*!< Peripheral base address in the alias region */ #define BKPSRAM_BASE ((uint32_t)0x40024000) /*!< Backup SRAM(4 KB) base address in the alias region */ #define FMC_R_BASE ((uint32_t)0xA0000000) /*!< FMC registers base address */ -#define CCMDATARAM_BB_BASE ((uint32_t)0x12000000) /*!< CCM(core coupled memory) data RAM(64 KB) base address in the bit-band region */ #define SRAM1_BB_BASE ((uint32_t)0x22000000) /*!< SRAM1(112 KB) base address in the bit-band region */ -#define SRAM2_BB_BASE ((uint32_t)0x2201C000) /*!< SRAM2(16 KB) base address in the bit-band region */ -#define SRAM3_BB_BASE ((uint32_t)0x22020000) /*!< SRAM3(64 KB) base address in the bit-band region */ +#define SRAM2_BB_BASE ((uint32_t)0x22380000) /*!< SRAM2(16 KB) base address in the bit-band region */ +#define SRAM3_BB_BASE ((uint32_t)0x22400000) /*!< SRAM3(64 KB) base address in the bit-band region */ #define PERIPH_BB_BASE ((uint32_t)0x42000000) /*!< Peripheral base address in the bit-band region */ -#define BKPSRAM_BB_BASE ((uint32_t)0x42024000) /*!< Backup SRAM(4 KB) base address in the bit-band region */ +#define BKPSRAM_BB_BASE ((uint32_t)0x42480000) /*!< Backup SRAM(4 KB) base address in the bit-band region */ #define FLASH_END ((uint32_t)0x081FFFFF) /*!< FLASH end address */ #define CCMDATARAM_END ((uint32_t)0x1000FFFF) /*!< CCM data RAM end address */ @@ -6112,7 +6111,7 @@ USB_OTG_HostChannelTypeDef; /******************** Bits definition for RTC_PRER register *****************/ #define RTC_PRER_PREDIV_A ((uint32_t)0x007F0000) -#define RTC_PRER_PREDIV_S ((uint32_t)0x00001FFF) +#define RTC_PRER_PREDIV_S ((uint32_t)0x00007FFF) /******************** Bits definition for RTC_WUTR register *****************/ #define RTC_WUTR_WUT ((uint32_t)0x0000FFFF) @@ -6517,7 +6516,7 @@ USB_OTG_HostChannelTypeDef; #define SAI_xSR_FLVL ((uint32_t)0x00070000) /*!pwm == PWM_9) __HAL_RCC_TIM9_CLK_ENABLE(); if (obj->pwm == PWM_10) __HAL_RCC_TIM10_CLK_ENABLE(); if (obj->pwm == PWM_11) __HAL_RCC_TIM11_CLK_ENABLE(); +#if defined(TIM12_BASE) + if (obj->pwm == PWM_12) __HAL_RCC_TIM12_CLK_ENABLE(); +#endif #if defined(TIM13_BASE) if (obj->pwm == PWM_13) __HAL_RCC_TIM13_CLK_ENABLE(); #endif @@ -180,7 +183,7 @@ void pwmout_period_us(pwmout_t* obj, int us) #if defined(TIM12_BASE) case PWM_12: #endif -#if defined(TIM13_BASE) +#if defined(TIM13_BASE) case PWM_13: #endif #if defined(TIM14_BASE) @@ -192,7 +195,7 @@ void pwmout_period_us(pwmout_t* obj, int us) // APB2 clock case PWM_1: -#if defined(TIM8_BASE) +#if defined(TIM8_BASE) case PWM_8: #endif case PWM_9: