mbed official / mbed

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

Committer:
<>
Date:
Tue Nov 08 17:28:34 2016 +0000
Revision:
129:0ab6a29f35bf
Parent:
128:9bcdf88f62b0
Child:
135:176b8275d35d
Release 129 of the mbed library

Ports for Upcoming Targets

3011: Add u-blox Sara-N target. https://github.com/ARMmbed/mbed-os/pull/3011
3099: MAX32625 https://github.com/ARMmbed/mbed-os/pull/3099
3151: Add support for FRDM-K82F https://github.com/ARMmbed/mbed-os/pull/3151
3177: New mcu k22512 fixing pr 3136 https://github.com/ARMmbed/mbed-os/pull/3177

Fixes and Changes

3008: NUCLEO_F072RB: Fix wrong timer channel number on pwm PB_5 pin https://github.com/ARMmbed/mbed-os/pull/3008
3013: STM32xx - Change how the ADC internal pins are checked before pinmap_ https://github.com/ARMmbed/mbed-os/pull/3013
3041: [nRF5] - added implementation of API of serial port flow control configuration. https://github.com/ARMmbed/mbed-os/pull/3041
3084: [nrf5] fix in Digital I/O : a gpioe pin was uninitialized badly https://github.com/ARMmbed/mbed-os/pull/3084
3009: TRNG enabled. TRNG APIs implemented. REV A/B/C/D flags removed. Warnings removed https://github.com/ARMmbed/mbed-os/pull/3009
3074: Target stm init gcc alignement https://github.com/ARMmbed/mbed-os/pull/3074
2988: Update of can_api.c fixing #2987 https://github.com/ARMmbed/mbed-os/pull/2988
3173: [Exporters] Add a device_name to microbit entry in targets.json https://github.com/ARMmbed/mbed-os/pull/3173
2969: [nRF52] - switch irq priorities of driver handlers to the lowest level https://github.com/ARMmbed/mbed-os/pull/2969
3184: #3183 Compiler warning in trng_api.c with K64F https://github.com/ARMmbed/mbed-os/pull/3184
3104: [NuMaker] Support CAN and fix PWM CLK error https://github.com/ARMmbed/mbed-os/pull/3104
3186: MultiTech mDot - add back SPI3 pins https://github.com/ARMmbed/mbed-os/pull/3186
3075: nsapi - Add standardized return types for size and errors https://github.com/ARMmbed/mbed-os/pull/3075
3221: u-blox odin w2 drivers update https://github.com/ARMmbed/mbed-os/pull/3221

Who changed what in which revision?

UserRevisionLine numberNew contents of line
<> 128:9bcdf88f62b0 1 /**
<> 128:9bcdf88f62b0 2 ******************************************************************************
<> 128:9bcdf88f62b0 3 * @file stm32f3xx.h
<> 128:9bcdf88f62b0 4 * @author MCD Application Team
<> 128:9bcdf88f62b0 5 * @version V2.3.0
<> 128:9bcdf88f62b0 6 * @date 29-April-2015
<> 128:9bcdf88f62b0 7 * @brief CMSIS STM32F3xx Device Peripheral Access Layer Header File.
<> 128:9bcdf88f62b0 8 *
<> 128:9bcdf88f62b0 9 * The file is the unique include file that the application programmer
<> 128:9bcdf88f62b0 10 * is using in the C source code, usually in main.c. This file contains:
<> 128:9bcdf88f62b0 11 * - Configuration section that allows to select:
<> 128:9bcdf88f62b0 12 * - The STM32F3xx device used in the target application
<> 128:9bcdf88f62b0 13 * - To use or not the peripheral’s drivers in application code(i.e.
<> 128:9bcdf88f62b0 14 * code will be based on direct access to peripheral’s registers
<> 128:9bcdf88f62b0 15 * rather than drivers API), this option is controlled by
<> 128:9bcdf88f62b0 16 * "#define USE_HAL_DRIVER"
<> 128:9bcdf88f62b0 17 *
<> 128:9bcdf88f62b0 18 ******************************************************************************
<> 128:9bcdf88f62b0 19 * @attention
<> 128:9bcdf88f62b0 20 *
<> 128:9bcdf88f62b0 21 * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
<> 128:9bcdf88f62b0 22 *
<> 128:9bcdf88f62b0 23 * Redistribution and use in source and binary forms, with or without modification,
<> 128:9bcdf88f62b0 24 * are permitted provided that the following conditions are met:
<> 128:9bcdf88f62b0 25 * 1. Redistributions of source code must retain the above copyright notice,
<> 128:9bcdf88f62b0 26 * this list of conditions and the following disclaimer.
<> 128:9bcdf88f62b0 27 * 2. Redistributions in binary form must reproduce the above copyright notice,
<> 128:9bcdf88f62b0 28 * this list of conditions and the following disclaimer in the documentation
<> 128:9bcdf88f62b0 29 * and/or other materials provided with the distribution.
<> 128:9bcdf88f62b0 30 * 3. Neither the name of STMicroelectronics nor the names of its contributors
<> 128:9bcdf88f62b0 31 * may be used to endorse or promote products derived from this software
<> 128:9bcdf88f62b0 32 * without specific prior written permission.
<> 128:9bcdf88f62b0 33 *
<> 128:9bcdf88f62b0 34 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
<> 128:9bcdf88f62b0 35 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
<> 128:9bcdf88f62b0 36 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
<> 128:9bcdf88f62b0 37 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
<> 128:9bcdf88f62b0 38 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
<> 128:9bcdf88f62b0 39 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
<> 128:9bcdf88f62b0 40 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
<> 128:9bcdf88f62b0 41 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
<> 128:9bcdf88f62b0 42 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
<> 128:9bcdf88f62b0 43 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<> 128:9bcdf88f62b0 44 *
<> 128:9bcdf88f62b0 45 ******************************************************************************
<> 128:9bcdf88f62b0 46 */
<> 128:9bcdf88f62b0 47
<> 128:9bcdf88f62b0 48 /** @addtogroup CMSIS
<> 128:9bcdf88f62b0 49 * @{
<> 128:9bcdf88f62b0 50 */
<> 128:9bcdf88f62b0 51
<> 128:9bcdf88f62b0 52 /** @addtogroup stm32f3xx
<> 128:9bcdf88f62b0 53 * @{
<> 128:9bcdf88f62b0 54 */
<> 128:9bcdf88f62b0 55
<> 128:9bcdf88f62b0 56 #ifndef __STM32F3xx_H
<> 128:9bcdf88f62b0 57 #define __STM32F3xx_H
<> 128:9bcdf88f62b0 58
<> 128:9bcdf88f62b0 59 #ifdef __cplusplus
<> 128:9bcdf88f62b0 60 extern "C" {
<> 128:9bcdf88f62b0 61 #endif /* __cplusplus */
<> 128:9bcdf88f62b0 62
<> 128:9bcdf88f62b0 63 /** @addtogroup Library_configuration_section
<> 128:9bcdf88f62b0 64 * @{
<> 128:9bcdf88f62b0 65 */
<> 128:9bcdf88f62b0 66
<> 128:9bcdf88f62b0 67 /**
<> 128:9bcdf88f62b0 68 * @brief STM32 Family
<> 128:9bcdf88f62b0 69 */
<> 128:9bcdf88f62b0 70 #if !defined (STM32F3)
<> 128:9bcdf88f62b0 71 #define STM32F3
<> 128:9bcdf88f62b0 72 #endif /* STM32F3 */
<> 128:9bcdf88f62b0 73
<> 128:9bcdf88f62b0 74 /* Uncomment the line below according to the target STM32 device used in your
<> 128:9bcdf88f62b0 75 application
<> 128:9bcdf88f62b0 76 */
<> 128:9bcdf88f62b0 77
<> 128:9bcdf88f62b0 78 #if !defined (STM32F301x8) && !defined (STM32F302x8) && !defined (STM32F318xx) && \
<> 128:9bcdf88f62b0 79 !defined (STM32F302xC) && !defined (STM32F303xC) && !defined (STM32F358xx) && \
<> 128:9bcdf88f62b0 80 !defined (STM32F303x8) && !defined (STM32F334x8) && !defined (STM32F328xx) && \
<> 128:9bcdf88f62b0 81 !defined (STM32F302xE) && !defined (STM32F303xE) && !defined (STM32F398xx) && \
<> 128:9bcdf88f62b0 82 !defined (STM32F373xC) && !defined (STM32F378xx)
<> 128:9bcdf88f62b0 83
<> 128:9bcdf88f62b0 84 /* #define STM32F301x8 */ /*!< STM32F301K6, STM32F301K8, STM32F301C6, STM32F301C8,
<> 128:9bcdf88f62b0 85 STM32F301R6 and STM32F301R8 Devices */
<> 128:9bcdf88f62b0 86 #define STM32F302x8 /*!< STM32F302K6, STM32F302K8, STM32F302C6, STM32F302C8,
<> 128:9bcdf88f62b0 87 STM32F302R6 and STM32F302R8 Devices */
<> 128:9bcdf88f62b0 88 /* #define STM32F302xC */ /*!< STM32F302CB, STM32F302CC, STM32F302RB, STM32F302RC,
<> 128:9bcdf88f62b0 89 STM32F302VB and STM32F302VC Devices */
<> 128:9bcdf88f62b0 90 /* #define STM32F302xE */ /*!< STM32F302RE, STM32F302VE, STM32F302ZE, STM32F302RD,
<> 128:9bcdf88f62b0 91 STM32F302VD and STM32F302ZD Devices */
<> 128:9bcdf88f62b0 92 /* #define STM32F303x8 */ /*!< STM32F303K6, STM32F303K8, STM32F303C6, STM32F303C8,
<> 128:9bcdf88f62b0 93 STM32F303R6 and STM32F303R8 Devices */
<> 128:9bcdf88f62b0 94 /* #define STM32F303xC */ /*!< STM32F303CB, STM32F303CC, STM32F303RB, STM32F303RC,
<> 128:9bcdf88f62b0 95 STM32F303VB and STM32F303VC Devices */
<> 128:9bcdf88f62b0 96 /* #define STM32F303xE */ /*!< STM32F303RE, STM32F303VE, STM32F303ZE, STM32F303RD,
<> 128:9bcdf88f62b0 97 STM32F303VD and STM32F303ZD Devices */
<> 128:9bcdf88f62b0 98 /* #define STM32F373xC */ /*!< STM32F373C8, STM32F373CB, STM32F373CC,
<> 128:9bcdf88f62b0 99 STM32F373R8, STM32F373RB, STM32F373RC,
<> 128:9bcdf88f62b0 100 STM32F373V8, STM32F373VB and STM32F373VC Devices */
<> 128:9bcdf88f62b0 101 /* #define STM32F334x8 */ /*!< STM32F334K4, STM32F334K6, STM32F334K8,
<> 128:9bcdf88f62b0 102 STM32F334C4, STM32F334C6, STM32F334C8,
<> 128:9bcdf88f62b0 103 STM32F334R4, STM32F334R6 and STM32F334R8 Devices */
<> 128:9bcdf88f62b0 104 /* #define STM32F318xx */ /*!< STM32F318K8, STM32F318C8: STM32F301x8 with regulator off: STM32F318xx Devices */
<> 128:9bcdf88f62b0 105 /* #define STM32F328xx */ /*!< STM32F328C8, STM32F328R8: STM32F334x8 with regulator off: STM32F328xx Devices */
<> 128:9bcdf88f62b0 106 /* #define STM32F358xx */ /*!< STM32F358CC, STM32F358RC, STM32F358VC: STM32F303xC with regulator off: STM32F358xx Devices */
<> 128:9bcdf88f62b0 107 /* #define STM32F378xx */ /*!< STM32F378CC, STM32F378RC, STM32F378VC: STM32F373xC with regulator off: STM32F378xx Devices */
<> 128:9bcdf88f62b0 108 /* #define STM32F398xx */ /*!< STM32F398VE: STM32F303xE with regulator off: STM32F398xx Devices */
<> 128:9bcdf88f62b0 109 #endif
<> 128:9bcdf88f62b0 110
<> 128:9bcdf88f62b0 111 /* Tip: To avoid modifying this file each time you need to switch between these
<> 128:9bcdf88f62b0 112 devices, you can define the device in your toolchain compiler preprocessor.
<> 128:9bcdf88f62b0 113 */
<> 128:9bcdf88f62b0 114 #if !defined (USE_HAL_DRIVER)
<> 128:9bcdf88f62b0 115 /**
<> 128:9bcdf88f62b0 116 * @brief Comment the line below if you will not use the peripherals drivers.
<> 128:9bcdf88f62b0 117 In this case, these drivers will not be included and the application code will
<> 128:9bcdf88f62b0 118 be based on direct access to peripherals registers
<> 128:9bcdf88f62b0 119 */
<> 128:9bcdf88f62b0 120 #define USE_HAL_DRIVER
<> 128:9bcdf88f62b0 121 #endif /* USE_HAL_DRIVER */
<> 128:9bcdf88f62b0 122
<> 128:9bcdf88f62b0 123 /**
<> 128:9bcdf88f62b0 124 * @brief CMSIS Device version number V2.3.0
<> 128:9bcdf88f62b0 125 */
<> 128:9bcdf88f62b0 126 #define __STM32F3_CMSIS_VERSION_MAIN (0x02) /*!< [31:24] main version */
<> 128:9bcdf88f62b0 127 #define __STM32F3_CMSIS_VERSION_SUB1 (0x03) /*!< [23:16] sub1 version */
<> 128:9bcdf88f62b0 128 #define __STM32F3_CMSIS_VERSION_SUB2 (0x00) /*!< [15:8] sub2 version */
<> 128:9bcdf88f62b0 129 #define __STM32F3_CMSIS_VERSION_RC (0x00) /*!< [7:0] release candidate */
<> 128:9bcdf88f62b0 130 #define __STM32F3_CMSIS_VERSION ((__STM32F3_CMSIS_VERSION_MAIN << 24)\
<> 128:9bcdf88f62b0 131 |(__STM32F3_CMSIS_VERSION_SUB1 << 16)\
<> 128:9bcdf88f62b0 132 |(__STM32F3_CMSIS_VERSION_SUB2 << 8 )\
<> 128:9bcdf88f62b0 133 |(__STM32F3_CMSIS_VERSION_RC))
<> 128:9bcdf88f62b0 134
<> 128:9bcdf88f62b0 135 /**
<> 128:9bcdf88f62b0 136 * @}
<> 128:9bcdf88f62b0 137 */
<> 128:9bcdf88f62b0 138
<> 128:9bcdf88f62b0 139 /** @addtogroup Device_Included
<> 128:9bcdf88f62b0 140 * @{
<> 128:9bcdf88f62b0 141 */
<> 128:9bcdf88f62b0 142
<> 128:9bcdf88f62b0 143 #if defined(STM32F301x8)
<> 128:9bcdf88f62b0 144 #include "stm32f301x8.h"
<> 128:9bcdf88f62b0 145 #elif defined(STM32F302x8)
<> 128:9bcdf88f62b0 146 #include "stm32f302x8.h"
<> 128:9bcdf88f62b0 147 #elif defined(STM32F302xC)
<> 128:9bcdf88f62b0 148 #include "stm32f302xc.h"
<> 128:9bcdf88f62b0 149 #elif defined(STM32F302xE)
<> 128:9bcdf88f62b0 150 #include "stm32f302xe.h"
<> 128:9bcdf88f62b0 151 #elif defined(STM32F303x8)
<> 128:9bcdf88f62b0 152 #include "stm32f303x8.h"
<> 128:9bcdf88f62b0 153 #elif defined(STM32F303xC)
<> 128:9bcdf88f62b0 154 #include "stm32f303xc.h"
<> 128:9bcdf88f62b0 155 #elif defined(STM32F303xE)
<> 128:9bcdf88f62b0 156 #include "stm32f303xe.h"
<> 128:9bcdf88f62b0 157 #elif defined(STM32F373xC)
<> 128:9bcdf88f62b0 158 #include "stm32f373xc.h"
<> 128:9bcdf88f62b0 159 #elif defined(STM32F334x8)
<> 128:9bcdf88f62b0 160 #include "stm32f334x8.h"
<> 128:9bcdf88f62b0 161 #elif defined(STM32F318xx)
<> 128:9bcdf88f62b0 162 #include "stm32f318xx.h"
<> 128:9bcdf88f62b0 163 #elif defined(STM32F328xx)
<> 128:9bcdf88f62b0 164 #include "stm32f328xx.h"
<> 128:9bcdf88f62b0 165 #elif defined(STM32F358xx)
<> 128:9bcdf88f62b0 166 #include "stm32f358xx.h"
<> 128:9bcdf88f62b0 167 #elif defined(STM32F378xx)
<> 128:9bcdf88f62b0 168 #include "stm32f378xx.h"
<> 128:9bcdf88f62b0 169 #elif defined(STM32F398xx)
<> 128:9bcdf88f62b0 170 #include "stm32f398xx.h"
<> 128:9bcdf88f62b0 171 #else
<> 128:9bcdf88f62b0 172 #error "Please select first the target STM32F3xx device used in your application (in stm32f3xx.h file)"
<> 128:9bcdf88f62b0 173 #endif
<> 128:9bcdf88f62b0 174
<> 128:9bcdf88f62b0 175 /**
<> 128:9bcdf88f62b0 176 * @}
<> 128:9bcdf88f62b0 177 */
<> 128:9bcdf88f62b0 178
<> 128:9bcdf88f62b0 179 /** @addtogroup Exported_types
<> 128:9bcdf88f62b0 180 * @{
<> 128:9bcdf88f62b0 181 */
<> 128:9bcdf88f62b0 182 typedef enum
<> 128:9bcdf88f62b0 183 {
<> 128:9bcdf88f62b0 184 RESET = 0,
<> 128:9bcdf88f62b0 185 SET = !RESET
<> 128:9bcdf88f62b0 186 } FlagStatus, ITStatus;
<> 128:9bcdf88f62b0 187
<> 128:9bcdf88f62b0 188 typedef enum
<> 128:9bcdf88f62b0 189 {
<> 128:9bcdf88f62b0 190 DISABLE = 0,
<> 128:9bcdf88f62b0 191 ENABLE = !DISABLE
<> 128:9bcdf88f62b0 192 } FunctionalState;
<> 128:9bcdf88f62b0 193 #define IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) || ((STATE) == ENABLE))
<> 128:9bcdf88f62b0 194
<> 128:9bcdf88f62b0 195 typedef enum
<> 128:9bcdf88f62b0 196 {
<> 128:9bcdf88f62b0 197 ERROR = 0,
<> 128:9bcdf88f62b0 198 SUCCESS = !ERROR
<> 128:9bcdf88f62b0 199 } ErrorStatus;
<> 128:9bcdf88f62b0 200
<> 128:9bcdf88f62b0 201 /**
<> 128:9bcdf88f62b0 202 * @}
<> 128:9bcdf88f62b0 203 */
<> 128:9bcdf88f62b0 204
<> 128:9bcdf88f62b0 205
<> 128:9bcdf88f62b0 206 /** @addtogroup Exported_macros
<> 128:9bcdf88f62b0 207 * @{
<> 128:9bcdf88f62b0 208 */
<> 128:9bcdf88f62b0 209 #define SET_BIT(REG, BIT) ((REG) |= (BIT))
<> 128:9bcdf88f62b0 210
<> 128:9bcdf88f62b0 211 #define CLEAR_BIT(REG, BIT) ((REG) &= ~(BIT))
<> 128:9bcdf88f62b0 212
<> 128:9bcdf88f62b0 213 #define READ_BIT(REG, BIT) ((REG) & (BIT))
<> 128:9bcdf88f62b0 214
<> 128:9bcdf88f62b0 215 #define CLEAR_REG(REG) ((REG) = (0x0))
<> 128:9bcdf88f62b0 216
<> 128:9bcdf88f62b0 217 #define WRITE_REG(REG, VAL) ((REG) = (VAL))
<> 128:9bcdf88f62b0 218
<> 128:9bcdf88f62b0 219 #define READ_REG(REG) ((REG))
<> 128:9bcdf88f62b0 220
<> 128:9bcdf88f62b0 221 #define MODIFY_REG(REG, CLEARMASK, SETMASK) WRITE_REG((REG), (((READ_REG(REG)) & (~(CLEARMASK))) | (SETMASK)))
<> 128:9bcdf88f62b0 222
<> 128:9bcdf88f62b0 223 #define POSITION_VAL(VAL) (__CLZ(__RBIT(VAL)))
<> 128:9bcdf88f62b0 224
<> 128:9bcdf88f62b0 225
<> 128:9bcdf88f62b0 226 #if defined (USE_HAL_DRIVER)
<> 128:9bcdf88f62b0 227 #include "stm32f3xx_hal.h"
<> 128:9bcdf88f62b0 228 #endif /* USE_HAL_DRIVER */
<> 128:9bcdf88f62b0 229
<> 128:9bcdf88f62b0 230
<> 128:9bcdf88f62b0 231 /**
<> 128:9bcdf88f62b0 232 * @}
<> 128:9bcdf88f62b0 233 */
<> 128:9bcdf88f62b0 234
<> 128:9bcdf88f62b0 235
<> 128:9bcdf88f62b0 236 #ifdef __cplusplus
<> 128:9bcdf88f62b0 237 }
<> 128:9bcdf88f62b0 238 #endif /* __cplusplus */
<> 128:9bcdf88f62b0 239
<> 128:9bcdf88f62b0 240 #endif /* __STM32F3xx_H */
<> 128:9bcdf88f62b0 241 /**
<> 128:9bcdf88f62b0 242 * @}
<> 128:9bcdf88f62b0 243 */
<> 128:9bcdf88f62b0 244
<> 128:9bcdf88f62b0 245 /**
<> 128:9bcdf88f62b0 246 * @}
<> 128:9bcdf88f62b0 247 */
<> 128:9bcdf88f62b0 248
<> 128:9bcdf88f62b0 249
<> 128:9bcdf88f62b0 250
<> 128:9bcdf88f62b0 251
<> 128:9bcdf88f62b0 252 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/