mbed library sources

Dependents:   Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more

Superseded

This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Committer:
mbed_official
Date:
Wed Mar 19 10:15:22 2014 +0000
Revision:
125:23cc3068a9e4
Synchronized with git revision ace35dfba3748c7cdc102eb38ec6b9e1067c3252

Full URL: https://github.com/mbedmicro/mbed/commit/ace35dfba3748c7cdc102eb38ec6b9e1067c3252/

[NUCLEO_F302R8] Add cmsis and hal files + change F401RE clock to 84MHz

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 125:23cc3068a9e4 1 /**
mbed_official 125:23cc3068a9e4 2 ******************************************************************************
mbed_official 125:23cc3068a9e4 3 * @file stm32f30x_syscfg.h
mbed_official 125:23cc3068a9e4 4 * @author MCD Application Team
mbed_official 125:23cc3068a9e4 5 * @version V1.1.0
mbed_official 125:23cc3068a9e4 6 * @date 27-February-2014
mbed_official 125:23cc3068a9e4 7 * @brief This file contains all the functions prototypes for the SYSCFG firmware
mbed_official 125:23cc3068a9e4 8 * library.
mbed_official 125:23cc3068a9e4 9 ******************************************************************************
mbed_official 125:23cc3068a9e4 10 * @attention
mbed_official 125:23cc3068a9e4 11 *
mbed_official 125:23cc3068a9e4 12 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
mbed_official 125:23cc3068a9e4 13 *
mbed_official 125:23cc3068a9e4 14 * Redistribution and use in source and binary forms, with or without modification,
mbed_official 125:23cc3068a9e4 15 * are permitted provided that the following conditions are met:
mbed_official 125:23cc3068a9e4 16 * 1. Redistributions of source code must retain the above copyright notice,
mbed_official 125:23cc3068a9e4 17 * this list of conditions and the following disclaimer.
mbed_official 125:23cc3068a9e4 18 * 2. Redistributions in binary form must reproduce the above copyright notice,
mbed_official 125:23cc3068a9e4 19 * this list of conditions and the following disclaimer in the documentation
mbed_official 125:23cc3068a9e4 20 * and/or other materials provided with the distribution.
mbed_official 125:23cc3068a9e4 21 * 3. Neither the name of STMicroelectronics nor the names of its contributors
mbed_official 125:23cc3068a9e4 22 * may be used to endorse or promote products derived from this software
mbed_official 125:23cc3068a9e4 23 * without specific prior written permission.
mbed_official 125:23cc3068a9e4 24 *
mbed_official 125:23cc3068a9e4 25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
mbed_official 125:23cc3068a9e4 26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
mbed_official 125:23cc3068a9e4 27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
mbed_official 125:23cc3068a9e4 28 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
mbed_official 125:23cc3068a9e4 29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
mbed_official 125:23cc3068a9e4 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
mbed_official 125:23cc3068a9e4 31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
mbed_official 125:23cc3068a9e4 32 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
mbed_official 125:23cc3068a9e4 33 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
mbed_official 125:23cc3068a9e4 34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mbed_official 125:23cc3068a9e4 35 *
mbed_official 125:23cc3068a9e4 36 ******************************************************************************
mbed_official 125:23cc3068a9e4 37 */
mbed_official 125:23cc3068a9e4 38
mbed_official 125:23cc3068a9e4 39 /*!< Define to prevent recursive inclusion -----------------------------------*/
mbed_official 125:23cc3068a9e4 40 #ifndef __STM32F30x_SYSCFG_H
mbed_official 125:23cc3068a9e4 41 #define __STM32F30x_SYSCFG_H
mbed_official 125:23cc3068a9e4 42
mbed_official 125:23cc3068a9e4 43 #ifdef __cplusplus
mbed_official 125:23cc3068a9e4 44 extern "C" {
mbed_official 125:23cc3068a9e4 45 #endif
mbed_official 125:23cc3068a9e4 46
mbed_official 125:23cc3068a9e4 47 /*!< Includes ----------------------------------------------------------------*/
mbed_official 125:23cc3068a9e4 48 #include "stm32f30x.h"
mbed_official 125:23cc3068a9e4 49
mbed_official 125:23cc3068a9e4 50 /** @addtogroup STM32F30x_StdPeriph_Driver
mbed_official 125:23cc3068a9e4 51 * @{
mbed_official 125:23cc3068a9e4 52 */
mbed_official 125:23cc3068a9e4 53
mbed_official 125:23cc3068a9e4 54 /** @addtogroup SYSCFG
mbed_official 125:23cc3068a9e4 55 * @{
mbed_official 125:23cc3068a9e4 56 */
mbed_official 125:23cc3068a9e4 57
mbed_official 125:23cc3068a9e4 58 /* Exported types ------------------------------------------------------------*/
mbed_official 125:23cc3068a9e4 59 /* Exported constants --------------------------------------------------------*/
mbed_official 125:23cc3068a9e4 60
mbed_official 125:23cc3068a9e4 61 /** @defgroup SYSCFG_Exported_Constants
mbed_official 125:23cc3068a9e4 62 * @{
mbed_official 125:23cc3068a9e4 63 */
mbed_official 125:23cc3068a9e4 64
mbed_official 125:23cc3068a9e4 65 /** @defgroup SYSCFG_EXTI_Port_Sources
mbed_official 125:23cc3068a9e4 66 * @{
mbed_official 125:23cc3068a9e4 67 */
mbed_official 125:23cc3068a9e4 68 #define EXTI_PortSourceGPIOA ((uint8_t)0x00)
mbed_official 125:23cc3068a9e4 69 #define EXTI_PortSourceGPIOB ((uint8_t)0x01)
mbed_official 125:23cc3068a9e4 70 #define EXTI_PortSourceGPIOC ((uint8_t)0x02)
mbed_official 125:23cc3068a9e4 71 #define EXTI_PortSourceGPIOD ((uint8_t)0x03)
mbed_official 125:23cc3068a9e4 72 #define EXTI_PortSourceGPIOE ((uint8_t)0x04)
mbed_official 125:23cc3068a9e4 73 #define EXTI_PortSourceGPIOF ((uint8_t)0x05)
mbed_official 125:23cc3068a9e4 74
mbed_official 125:23cc3068a9e4 75 #define IS_EXTI_PORT_SOURCE(PORTSOURCE) (((PORTSOURCE) == EXTI_PortSourceGPIOA) || \
mbed_official 125:23cc3068a9e4 76 ((PORTSOURCE) == EXTI_PortSourceGPIOB) || \
mbed_official 125:23cc3068a9e4 77 ((PORTSOURCE) == EXTI_PortSourceGPIOC) || \
mbed_official 125:23cc3068a9e4 78 ((PORTSOURCE) == EXTI_PortSourceGPIOD) || \
mbed_official 125:23cc3068a9e4 79 ((PORTSOURCE) == EXTI_PortSourceGPIOE) || \
mbed_official 125:23cc3068a9e4 80 ((PORTSOURCE) == EXTI_PortSourceGPIOF))
mbed_official 125:23cc3068a9e4 81 /**
mbed_official 125:23cc3068a9e4 82 * @}
mbed_official 125:23cc3068a9e4 83 */
mbed_official 125:23cc3068a9e4 84
mbed_official 125:23cc3068a9e4 85 /** @defgroup SYSCFG_EXTI_Pin_sources
mbed_official 125:23cc3068a9e4 86 * @{
mbed_official 125:23cc3068a9e4 87 */
mbed_official 125:23cc3068a9e4 88 #define EXTI_PinSource0 ((uint8_t)0x00)
mbed_official 125:23cc3068a9e4 89 #define EXTI_PinSource1 ((uint8_t)0x01)
mbed_official 125:23cc3068a9e4 90 #define EXTI_PinSource2 ((uint8_t)0x02)
mbed_official 125:23cc3068a9e4 91 #define EXTI_PinSource3 ((uint8_t)0x03)
mbed_official 125:23cc3068a9e4 92 #define EXTI_PinSource4 ((uint8_t)0x04)
mbed_official 125:23cc3068a9e4 93 #define EXTI_PinSource5 ((uint8_t)0x05)
mbed_official 125:23cc3068a9e4 94 #define EXTI_PinSource6 ((uint8_t)0x06)
mbed_official 125:23cc3068a9e4 95 #define EXTI_PinSource7 ((uint8_t)0x07)
mbed_official 125:23cc3068a9e4 96 #define EXTI_PinSource8 ((uint8_t)0x08)
mbed_official 125:23cc3068a9e4 97 #define EXTI_PinSource9 ((uint8_t)0x09)
mbed_official 125:23cc3068a9e4 98 #define EXTI_PinSource10 ((uint8_t)0x0A)
mbed_official 125:23cc3068a9e4 99 #define EXTI_PinSource11 ((uint8_t)0x0B)
mbed_official 125:23cc3068a9e4 100 #define EXTI_PinSource12 ((uint8_t)0x0C)
mbed_official 125:23cc3068a9e4 101 #define EXTI_PinSource13 ((uint8_t)0x0D)
mbed_official 125:23cc3068a9e4 102 #define EXTI_PinSource14 ((uint8_t)0x0E)
mbed_official 125:23cc3068a9e4 103 #define EXTI_PinSource15 ((uint8_t)0x0F)
mbed_official 125:23cc3068a9e4 104
mbed_official 125:23cc3068a9e4 105 #define IS_EXTI_PIN_SOURCE(PINSOURCE) (((PINSOURCE) == EXTI_PinSource0) || \
mbed_official 125:23cc3068a9e4 106 ((PINSOURCE) == EXTI_PinSource1) || \
mbed_official 125:23cc3068a9e4 107 ((PINSOURCE) == EXTI_PinSource2) || \
mbed_official 125:23cc3068a9e4 108 ((PINSOURCE) == EXTI_PinSource3) || \
mbed_official 125:23cc3068a9e4 109 ((PINSOURCE) == EXTI_PinSource4) || \
mbed_official 125:23cc3068a9e4 110 ((PINSOURCE) == EXTI_PinSource5) || \
mbed_official 125:23cc3068a9e4 111 ((PINSOURCE) == EXTI_PinSource6) || \
mbed_official 125:23cc3068a9e4 112 ((PINSOURCE) == EXTI_PinSource7) || \
mbed_official 125:23cc3068a9e4 113 ((PINSOURCE) == EXTI_PinSource8) || \
mbed_official 125:23cc3068a9e4 114 ((PINSOURCE) == EXTI_PinSource9) || \
mbed_official 125:23cc3068a9e4 115 ((PINSOURCE) == EXTI_PinSource10) || \
mbed_official 125:23cc3068a9e4 116 ((PINSOURCE) == EXTI_PinSource11) || \
mbed_official 125:23cc3068a9e4 117 ((PINSOURCE) == EXTI_PinSource12) || \
mbed_official 125:23cc3068a9e4 118 ((PINSOURCE) == EXTI_PinSource13) || \
mbed_official 125:23cc3068a9e4 119 ((PINSOURCE) == EXTI_PinSource14) || \
mbed_official 125:23cc3068a9e4 120 ((PINSOURCE) == EXTI_PinSource15))
mbed_official 125:23cc3068a9e4 121 /**
mbed_official 125:23cc3068a9e4 122 * @}
mbed_official 125:23cc3068a9e4 123 */
mbed_official 125:23cc3068a9e4 124
mbed_official 125:23cc3068a9e4 125 /** @defgroup SYSCFG_Memory_Remap_Config
mbed_official 125:23cc3068a9e4 126 * @{
mbed_official 125:23cc3068a9e4 127 */
mbed_official 125:23cc3068a9e4 128 #define SYSCFG_MemoryRemap_Flash ((uint8_t)0x00)
mbed_official 125:23cc3068a9e4 129 #define SYSCFG_MemoryRemap_SystemMemory ((uint8_t)0x01)
mbed_official 125:23cc3068a9e4 130 #define SYSCFG_MemoryRemap_SRAM ((uint8_t)0x03)
mbed_official 125:23cc3068a9e4 131
mbed_official 125:23cc3068a9e4 132
mbed_official 125:23cc3068a9e4 133 #define IS_SYSCFG_MEMORY_REMAP(REMAP) (((REMAP) == SYSCFG_MemoryRemap_Flash) || \
mbed_official 125:23cc3068a9e4 134 ((REMAP) == SYSCFG_MemoryRemap_SystemMemory) || \
mbed_official 125:23cc3068a9e4 135 ((REMAP) == SYSCFG_MemoryRemap_SRAM))
mbed_official 125:23cc3068a9e4 136
mbed_official 125:23cc3068a9e4 137 /**
mbed_official 125:23cc3068a9e4 138 * @}
mbed_official 125:23cc3068a9e4 139 */
mbed_official 125:23cc3068a9e4 140
mbed_official 125:23cc3068a9e4 141 /** @defgroup SYSCFG_DMA_Remap_Config
mbed_official 125:23cc3068a9e4 142 * @{
mbed_official 125:23cc3068a9e4 143 */
mbed_official 125:23cc3068a9e4 144 #define SYSCFG_DMARemap_TIM17 SYSCFG_CFGR1_TIM17_DMA_RMP /*!< Remap TIM17 DMA requests from channel1 to channel2 */
mbed_official 125:23cc3068a9e4 145 #define SYSCFG_DMARemap_TIM16 SYSCFG_CFGR1_TIM16_DMA_RMP /*!< Remap TIM16 DMA requests from channel3 to channel4 */
mbed_official 125:23cc3068a9e4 146 #define SYSCFG_DMARemap_ADC2ADC4 SYSCFG_CFGR1_ADC24_DMA_RMP /*!< Remap ADC2 and ADC4 DMA requests */
mbed_official 125:23cc3068a9e4 147
mbed_official 125:23cc3068a9e4 148 #define SYSCFG_DMARemap_TIM6DAC1Ch1 SYSCFG_CFGR1_TIM6DAC1Ch1_DMA_RMP /* Remap TIM6/DAC1 Ch1 DMA requests */
mbed_official 125:23cc3068a9e4 149 #define SYSCFG_DMARemap_TIM7DAC1Ch2 SYSCFG_CFGR1_TIM7DAC1Ch2_DMA_RMP /* Remap TIM7/DAC1 Ch2 DMA requests */
mbed_official 125:23cc3068a9e4 150 #define SYSCFG_DMARemap_DAC2Ch1 SYSCFG_CFGR1_DAC2Ch1_DMA_RMP /* Remap DAC2 Ch1 DMA requests */
mbed_official 125:23cc3068a9e4 151
mbed_official 125:23cc3068a9e4 152 #define SYSCFG_DMARemapCh2_SPI1_RX ((uint32_t)0x80000003) /* Remap SPI1 RX DMA CH2 requests */
mbed_official 125:23cc3068a9e4 153 #define SYSCFG_DMARemapCh4_SPI1_RX ((uint32_t)0x80000001) /* Remap SPI1 RX DMA CH4 requests */
mbed_official 125:23cc3068a9e4 154 #define SYSCFG_DMARemapCh6_SPI1_RX ((uint32_t)0x80000002) /* Remap SPI1 RX DMA CH6 requests */
mbed_official 125:23cc3068a9e4 155
mbed_official 125:23cc3068a9e4 156 #define SYSCFG_DMARemapCh3_SPI1_TX ((uint32_t)0x8000000C) /* Remap SPI1 TX DMA CH2 requests */
mbed_official 125:23cc3068a9e4 157 #define SYSCFG_DMARemapCh5_SPI1_TX ((uint32_t)0x80000004) /* Remap SPI1 TX DMA CH5 requests */
mbed_official 125:23cc3068a9e4 158 #define SYSCFG_DMARemapCh7_SPI1_TX ((uint32_t)0x80000008) /* Remap SPI1 TX DMA CH7 requests */
mbed_official 125:23cc3068a9e4 159
mbed_official 125:23cc3068a9e4 160 #define SYSCFG_DMARemapCh7_I2C1_RX ((uint32_t)0x80000030) /* Remap I2C1 RX DMA CH7 requests */
mbed_official 125:23cc3068a9e4 161 #define SYSCFG_DMARemapCh3_I2C1_RX ((uint32_t)0x80000010) /* Remap I2C1 RX DMA CH3 requests */
mbed_official 125:23cc3068a9e4 162 #define SYSCFG_DMARemapCh5_I2C1_RX ((uint32_t)0x80000020) /* Remap I2C1 RX DMA CH5 requests */
mbed_official 125:23cc3068a9e4 163
mbed_official 125:23cc3068a9e4 164 #define SYSCFG_DMARemapCh6_I2C1_TX ((uint32_t)0x800000C0) /* Remap I2C1 TX DMA CH6 requests */
mbed_official 125:23cc3068a9e4 165 #define SYSCFG_DMARemapCh2_I2C1_TX ((uint32_t)0x80000040) /* Remap I2C1 TX DMA CH2 requests */
mbed_official 125:23cc3068a9e4 166 #define SYSCFG_DMARemapCh4_I2C1_TX ((uint32_t)0x80000080) /* Remap I2C1 TX DMA CH4 requests */
mbed_official 125:23cc3068a9e4 167
mbed_official 125:23cc3068a9e4 168 #define SYSCFG_DMARemapCh4_ADC2 ((uint32_t)0x80000300) /* Remap ADC2 DMA1 Ch4 requests */
mbed_official 125:23cc3068a9e4 169 #define SYSCFG_DMARemapCh2_ADC2 ((uint32_t)0x80000200) /* Remap ADC2 DMA1 Ch2 requests */
mbed_official 125:23cc3068a9e4 170
mbed_official 125:23cc3068a9e4 171 /* SYSCFG_DMA_Remap_Legacy */
mbed_official 125:23cc3068a9e4 172 #define SYSCFG_DMARemap_TIM6DAC1 SYSCFG_DMARemap_TIM6DAC1Ch1 /*!< Remap TIM6/DAC1 DMA requests */
mbed_official 125:23cc3068a9e4 173 #define SYSCFG_DMARemap_TIM7DAC2 SYSCFG_DMARemap_TIM7DAC1Ch2 /*!< Remap TIM7/DAC2 DMA requests */
mbed_official 125:23cc3068a9e4 174
mbed_official 125:23cc3068a9e4 175 #define IS_SYSCFG_DMA_REMAP(REMAP) (((REMAP) == SYSCFG_DMARemap_TIM17) || \
mbed_official 125:23cc3068a9e4 176 ((REMAP) == SYSCFG_DMARemap_TIM16) || \
mbed_official 125:23cc3068a9e4 177 ((REMAP) == SYSCFG_DMARemap_ADC2ADC4) || \
mbed_official 125:23cc3068a9e4 178 ((REMAP) == SYSCFG_DMARemap_TIM6DAC1Ch1) || \
mbed_official 125:23cc3068a9e4 179 ((REMAP) == SYSCFG_DMARemap_TIM7DAC1Ch2) || \
mbed_official 125:23cc3068a9e4 180 ((REMAP) == SYSCFG_DMARemap_DAC2Ch1) || \
mbed_official 125:23cc3068a9e4 181 ((REMAP) == SYSCFG_DMARemapCh2_SPI1_RX) || \
mbed_official 125:23cc3068a9e4 182 ((REMAP) == SYSCFG_DMARemapCh4_SPI1_RX) || \
mbed_official 125:23cc3068a9e4 183 ((REMAP) == SYSCFG_DMARemapCh6_SPI1_RX) || \
mbed_official 125:23cc3068a9e4 184 ((REMAP) == SYSCFG_DMARemapCh5_SPI1_TX) || \
mbed_official 125:23cc3068a9e4 185 ((REMAP) == SYSCFG_DMARemapCh5_SPI1_TX) || \
mbed_official 125:23cc3068a9e4 186 ((REMAP) == SYSCFG_DMARemapCh7_SPI1_TX) || \
mbed_official 125:23cc3068a9e4 187 ((REMAP) == SYSCFG_DMARemapCh7_I2C1_RX) || \
mbed_official 125:23cc3068a9e4 188 ((REMAP) == SYSCFG_DMARemapCh3_I2C1_RX) || \
mbed_official 125:23cc3068a9e4 189 ((REMAP) == SYSCFG_DMARemapCh5_I2C1_RX) || \
mbed_official 125:23cc3068a9e4 190 ((REMAP) == SYSCFG_DMARemapCh6_I2C1_TX) || \
mbed_official 125:23cc3068a9e4 191 ((REMAP) == SYSCFG_DMARemapCh2_I2C1_TX) || \
mbed_official 125:23cc3068a9e4 192 ((REMAP) == SYSCFG_DMARemapCh4_I2C1_TX) || \
mbed_official 125:23cc3068a9e4 193 ((REMAP) == SYSCFG_DMARemapCh4_ADC2) || \
mbed_official 125:23cc3068a9e4 194 ((REMAP) == SYSCFG_DMARemapCh2_ADC2))
mbed_official 125:23cc3068a9e4 195
mbed_official 125:23cc3068a9e4 196 /**
mbed_official 125:23cc3068a9e4 197 * @}
mbed_official 125:23cc3068a9e4 198 */
mbed_official 125:23cc3068a9e4 199
mbed_official 125:23cc3068a9e4 200 /** @defgroup SYSCFG_Trigger_Remap_Config
mbed_official 125:23cc3068a9e4 201 * @{
mbed_official 125:23cc3068a9e4 202 */
mbed_official 125:23cc3068a9e4 203 #define SYSCFG_TriggerRemap_DACTIM3 SYSCFG_CFGR1_DAC1_TRIG1_RMP /*!< Remap DAC trigger to TIM3 */
mbed_official 125:23cc3068a9e4 204 #define SYSCFG_TriggerRemap_TIM1TIM17 SYSCFG_CFGR1_TIM1_ITR3_RMP /*!< Remap TIM1 ITR3 to TIM17 OC */
mbed_official 125:23cc3068a9e4 205 #define SYSCFG_TriggerRemap_DACHRTIM1_TRIG1 ((uint32_t)0x80010000) /*!< Remap DAC trigger to HRTIM1 TRIG1 */
mbed_official 125:23cc3068a9e4 206 #define SYSCFG_TriggerRemap_DACHRTIM1_TRIG2 ((uint32_t)0x80020000) /*!< Remap DAC trigger to HRTIM1 TRIG2 */
mbed_official 125:23cc3068a9e4 207
mbed_official 125:23cc3068a9e4 208 #define IS_SYSCFG_TRIGGER_REMAP(REMAP) (((REMAP) == SYSCFG_TriggerRemap_DACTIM3) || \
mbed_official 125:23cc3068a9e4 209 ((REMAP) == SYSCFG_TriggerRemap_DACHRTIM1_TRIG1) || \
mbed_official 125:23cc3068a9e4 210 ((REMAP) == SYSCFG_TriggerRemap_DACHRTIM1_TRIG2) || \
mbed_official 125:23cc3068a9e4 211 ((REMAP) == SYSCFG_TriggerRemap_TIM1TIM17))
mbed_official 125:23cc3068a9e4 212
mbed_official 125:23cc3068a9e4 213 /**
mbed_official 125:23cc3068a9e4 214 * @}
mbed_official 125:23cc3068a9e4 215 */
mbed_official 125:23cc3068a9e4 216
mbed_official 125:23cc3068a9e4 217 /** @defgroup SYSCFG_EncoderRemap_Config
mbed_official 125:23cc3068a9e4 218 * @{
mbed_official 125:23cc3068a9e4 219 */
mbed_official 125:23cc3068a9e4 220 #define SYSCFG_EncoderRemap_No ((uint32_t)0x00000000) /*!< No redirection */
mbed_official 125:23cc3068a9e4 221 #define SYSCFG_EncoderRemap_TIM2 SYSCFG_CFGR1_ENCODER_MODE_0 /*!< Timer 2 IC1 and IC2 connected to TIM15 IC1 and IC2 */
mbed_official 125:23cc3068a9e4 222 #define SYSCFG_EncoderRemap_TIM3 SYSCFG_CFGR1_ENCODER_MODE_1 /*!< Timer 3 IC1 and IC2 connected to TIM15 IC1 and IC2 */
mbed_official 125:23cc3068a9e4 223 #define SYSCFG_EncoderRemap_TIM4 SYSCFG_CFGR1_ENCODER_MODE /*!< Timer 4 IC1 and IC2 connected to TIM15 IC1 and IC2 */
mbed_official 125:23cc3068a9e4 224
mbed_official 125:23cc3068a9e4 225 #define IS_SYSCFG_ENCODER_REMAP(REMAP) (((REMAP) == SYSCFG_EncoderRemap_No) || \
mbed_official 125:23cc3068a9e4 226 ((REMAP) == SYSCFG_EncoderRemap_TIM2) || \
mbed_official 125:23cc3068a9e4 227 ((REMAP) == SYSCFG_EncoderRemap_TIM3) || \
mbed_official 125:23cc3068a9e4 228 ((REMAP) == SYSCFG_EncoderRemap_TIM4))
mbed_official 125:23cc3068a9e4 229
mbed_official 125:23cc3068a9e4 230 /**
mbed_official 125:23cc3068a9e4 231 * @}
mbed_official 125:23cc3068a9e4 232 */
mbed_official 125:23cc3068a9e4 233
mbed_official 125:23cc3068a9e4 234 /** @defgroup SYSCFG_I2C_FastModePlus_Config
mbed_official 125:23cc3068a9e4 235 * @{
mbed_official 125:23cc3068a9e4 236 */
mbed_official 125:23cc3068a9e4 237 #define SYSCFG_I2CFastModePlus_PB6 SYSCFG_CFGR1_I2C_PB6_FMP /*!< Enable Fast Mode Plus on PB6 */
mbed_official 125:23cc3068a9e4 238 #define SYSCFG_I2CFastModePlus_PB7 SYSCFG_CFGR1_I2C_PB7_FMP /*!< Enable Fast Mode Plus on PB7 */
mbed_official 125:23cc3068a9e4 239 #define SYSCFG_I2CFastModePlus_PB8 SYSCFG_CFGR1_I2C_PB8_FMP /*!< Enable Fast Mode Plus on PB8 */
mbed_official 125:23cc3068a9e4 240 #define SYSCFG_I2CFastModePlus_PB9 SYSCFG_CFGR1_I2C_PB9_FMP /*!< Enable Fast Mode Plus on PB9 */
mbed_official 125:23cc3068a9e4 241 #define SYSCFG_I2CFastModePlus_I2C1 SYSCFG_CFGR1_I2C1_FMP /*!< Enable Fast Mode Plus on I2C1 pins */
mbed_official 125:23cc3068a9e4 242 #define SYSCFG_I2CFastModePlus_I2C2 SYSCFG_CFGR1_I2C2_FMP /*!< Enable Fast Mode Plus on I2C2 pins */
mbed_official 125:23cc3068a9e4 243
mbed_official 125:23cc3068a9e4 244 #define IS_SYSCFG_I2C_FMP(PIN) (((PIN) == SYSCFG_I2CFastModePlus_PB6) || \
mbed_official 125:23cc3068a9e4 245 ((PIN) == SYSCFG_I2CFastModePlus_PB7) || \
mbed_official 125:23cc3068a9e4 246 ((PIN) == SYSCFG_I2CFastModePlus_PB8) || \
mbed_official 125:23cc3068a9e4 247 ((PIN) == SYSCFG_I2CFastModePlus_PB9) || \
mbed_official 125:23cc3068a9e4 248 ((PIN) == SYSCFG_I2CFastModePlus_I2C1) || \
mbed_official 125:23cc3068a9e4 249 ((PIN) == SYSCFG_I2CFastModePlus_I2C2))
mbed_official 125:23cc3068a9e4 250
mbed_official 125:23cc3068a9e4 251 /**
mbed_official 125:23cc3068a9e4 252 * @}
mbed_official 125:23cc3068a9e4 253 */
mbed_official 125:23cc3068a9e4 254
mbed_official 125:23cc3068a9e4 255 /** @defgroup SYSCFG_FPU_Interrupt_Config
mbed_official 125:23cc3068a9e4 256 * @{
mbed_official 125:23cc3068a9e4 257 */
mbed_official 125:23cc3068a9e4 258 #define SYSCFG_IT_IXC SYSCFG_CFGR1_FPU_IE_5 /*!< Inexact Interrupt enable (interrupt disabled by default) */
mbed_official 125:23cc3068a9e4 259 #define SYSCFG_IT_IDC SYSCFG_CFGR1_FPU_IE_4 /*!< Input denormal Interrupt enable */
mbed_official 125:23cc3068a9e4 260 #define SYSCFG_IT_OFC SYSCFG_CFGR1_FPU_IE_3 /*!< Overflow Interrupt enable */
mbed_official 125:23cc3068a9e4 261 #define SYSCFG_IT_UFC SYSCFG_CFGR1_FPU_IE_2 /*!< Underflow Interrupt enable */
mbed_official 125:23cc3068a9e4 262 #define SYSCFG_IT_DZC SYSCFG_CFGR1_FPU_IE_1 /*!< Divide-by-zero Interrupt enable */
mbed_official 125:23cc3068a9e4 263 #define SYSCFG_IT_IOC SYSCFG_CFGR1_FPU_IE_0 /*!< Invalid operation Interrupt enable */
mbed_official 125:23cc3068a9e4 264
mbed_official 125:23cc3068a9e4 265 #define IS_SYSCFG_IT(IT) ((((IT) & (uint32_t)0x03FFFFFF) == 0) && ((IT) != 0))
mbed_official 125:23cc3068a9e4 266
mbed_official 125:23cc3068a9e4 267 /**
mbed_official 125:23cc3068a9e4 268 * @}
mbed_official 125:23cc3068a9e4 269 */
mbed_official 125:23cc3068a9e4 270
mbed_official 125:23cc3068a9e4 271 /** @defgroup SYSCFG_Lock_Config
mbed_official 125:23cc3068a9e4 272 * @{
mbed_official 125:23cc3068a9e4 273 */
mbed_official 125:23cc3068a9e4 274 #define SYSCFG_Break_PVD SYSCFG_CFGR2_PVD_LOCK /*!< Enables and locks the PVD connection with TIM1/8/15/16/17 Break Input and also the PVD_EN and PVDSEL[2:0] bits of the Power Control Interface */
mbed_official 125:23cc3068a9e4 275 #define SYSCFG_Break_SRAMParity SYSCFG_CFGR2_SRAM_PARITY_LOCK /*!< Enables and locks the SRAM_PARITY error signal with Break Input of TIM1/8/15/16/17 */
mbed_official 125:23cc3068a9e4 276 #define SYSCFG_Break_Lockup SYSCFG_CFGR2_LOCKUP_LOCK /*!< Enables and locks the LOCKUP output of CortexM4 with Break Input of TIM1/8/15/16/17 */
mbed_official 125:23cc3068a9e4 277
mbed_official 125:23cc3068a9e4 278 #define IS_SYSCFG_LOCK_CONFIG(CONFIG) (((CONFIG) == SYSCFG_Break_PVD) || \
mbed_official 125:23cc3068a9e4 279 ((CONFIG) == SYSCFG_Break_SRAMParity) || \
mbed_official 125:23cc3068a9e4 280 ((CONFIG) == SYSCFG_Break_Lockup))
mbed_official 125:23cc3068a9e4 281
mbed_official 125:23cc3068a9e4 282 /**
mbed_official 125:23cc3068a9e4 283 * @}
mbed_official 125:23cc3068a9e4 284 */
mbed_official 125:23cc3068a9e4 285
mbed_official 125:23cc3068a9e4 286 /** @defgroup SYSCFG_SRAMWRP_Config
mbed_official 125:23cc3068a9e4 287 * @{
mbed_official 125:23cc3068a9e4 288 */
mbed_official 125:23cc3068a9e4 289 #define SYSCFG_SRAMWRP_Page0 SYSCFG_RCR_PAGE0 /*!< ICODE SRAM Write protection page 0 */
mbed_official 125:23cc3068a9e4 290 #define SYSCFG_SRAMWRP_Page1 SYSCFG_RCR_PAGE1 /*!< ICODE SRAM Write protection page 1 */
mbed_official 125:23cc3068a9e4 291 #define SYSCFG_SRAMWRP_Page2 SYSCFG_RCR_PAGE2 /*!< ICODE SRAM Write protection page 2 */
mbed_official 125:23cc3068a9e4 292 #define SYSCFG_SRAMWRP_Page3 SYSCFG_RCR_PAGE3 /*!< ICODE SRAM Write protection page 3 */
mbed_official 125:23cc3068a9e4 293 #define SYSCFG_SRAMWRP_Page4 SYSCFG_RCR_PAGE4 /*!< ICODE SRAM Write protection page 4 */
mbed_official 125:23cc3068a9e4 294 #define SYSCFG_SRAMWRP_Page5 SYSCFG_RCR_PAGE5 /*!< ICODE SRAM Write protection page 5 */
mbed_official 125:23cc3068a9e4 295 #define SYSCFG_SRAMWRP_Page6 SYSCFG_RCR_PAGE6 /*!< ICODE SRAM Write protection page 6 */
mbed_official 125:23cc3068a9e4 296 #define SYSCFG_SRAMWRP_Page7 SYSCFG_RCR_PAGE7 /*!< ICODE SRAM Write protection page 7 */
mbed_official 125:23cc3068a9e4 297
mbed_official 125:23cc3068a9e4 298 #define IS_SYSCFG_PAGE(PAGE)((((PAGE) & (uint32_t)0xFFFFFF00) == 0x00000000) && ((PAGE) != 0x00000000))
mbed_official 125:23cc3068a9e4 299
mbed_official 125:23cc3068a9e4 300 /**
mbed_official 125:23cc3068a9e4 301 * @}
mbed_official 125:23cc3068a9e4 302 */
mbed_official 125:23cc3068a9e4 303
mbed_official 125:23cc3068a9e4 304 /** @defgroup SYSCFG_flags_definition
mbed_official 125:23cc3068a9e4 305 * @{
mbed_official 125:23cc3068a9e4 306 */
mbed_official 125:23cc3068a9e4 307
mbed_official 125:23cc3068a9e4 308 #define SYSCFG_FLAG_PE SYSCFG_CFGR2_SRAM_PE
mbed_official 125:23cc3068a9e4 309
mbed_official 125:23cc3068a9e4 310 #define IS_SYSCFG_FLAG(FLAG) (((FLAG) == SYSCFG_FLAG_PE))
mbed_official 125:23cc3068a9e4 311
mbed_official 125:23cc3068a9e4 312 /**
mbed_official 125:23cc3068a9e4 313 * @}
mbed_official 125:23cc3068a9e4 314 */
mbed_official 125:23cc3068a9e4 315
mbed_official 125:23cc3068a9e4 316 /**
mbed_official 125:23cc3068a9e4 317 * @}
mbed_official 125:23cc3068a9e4 318 */
mbed_official 125:23cc3068a9e4 319
mbed_official 125:23cc3068a9e4 320 /* Exported macro ------------------------------------------------------------*/
mbed_official 125:23cc3068a9e4 321 /* Exported functions ------------------------------------------------------- */
mbed_official 125:23cc3068a9e4 322
mbed_official 125:23cc3068a9e4 323 /* Function used to set the SYSCFG configuration to the default reset state **/
mbed_official 125:23cc3068a9e4 324 void SYSCFG_DeInit(void);
mbed_official 125:23cc3068a9e4 325
mbed_official 125:23cc3068a9e4 326 /* SYSCFG configuration functions *********************************************/
mbed_official 125:23cc3068a9e4 327 void SYSCFG_MemoryRemapConfig(uint32_t SYSCFG_MemoryRemap);
mbed_official 125:23cc3068a9e4 328 void SYSCFG_DMAChannelRemapConfig(uint32_t SYSCFG_DMARemap, FunctionalState NewState);
mbed_official 125:23cc3068a9e4 329 void SYSCFG_TriggerRemapConfig(uint32_t SYSCFG_TriggerRemap, FunctionalState NewState);
mbed_official 125:23cc3068a9e4 330 void SYSCFG_EncoderRemapConfig(uint32_t SYSCFG_EncoderRemap);
mbed_official 125:23cc3068a9e4 331 void SYSCFG_USBInterruptLineRemapCmd(FunctionalState NewState);
mbed_official 125:23cc3068a9e4 332 void SYSCFG_I2CFastModePlusConfig(uint32_t SYSCFG_I2CFastModePlus, FunctionalState NewState);
mbed_official 125:23cc3068a9e4 333 void SYSCFG_ITConfig(uint32_t SYSCFG_IT, FunctionalState NewState);
mbed_official 125:23cc3068a9e4 334 void SYSCFG_EXTILineConfig(uint8_t EXTI_PortSourceGPIOx, uint8_t EXTI_PinSourcex);
mbed_official 125:23cc3068a9e4 335 void SYSCFG_BreakConfig(uint32_t SYSCFG_Break);
mbed_official 125:23cc3068a9e4 336 void SYSCFG_BypassParityCheckDisable(void);
mbed_official 125:23cc3068a9e4 337 void SYSCFG_SRAMWRPEnable(uint32_t SYSCFG_SRAMWRP);
mbed_official 125:23cc3068a9e4 338 FlagStatus SYSCFG_GetFlagStatus(uint32_t SYSCFG_Flag);
mbed_official 125:23cc3068a9e4 339 void SYSCFG_ClearFlag(uint32_t SYSCFG_Flag);
mbed_official 125:23cc3068a9e4 340
mbed_official 125:23cc3068a9e4 341 #ifdef __cplusplus
mbed_official 125:23cc3068a9e4 342 }
mbed_official 125:23cc3068a9e4 343 #endif
mbed_official 125:23cc3068a9e4 344
mbed_official 125:23cc3068a9e4 345 #endif /*__STM32F30x_SYSCFG_H */
mbed_official 125:23cc3068a9e4 346
mbed_official 125:23cc3068a9e4 347 /**
mbed_official 125:23cc3068a9e4 348 * @}
mbed_official 125:23cc3068a9e4 349 */
mbed_official 125:23cc3068a9e4 350
mbed_official 125:23cc3068a9e4 351 /**
mbed_official 125:23cc3068a9e4 352 * @}
mbed_official 125:23cc3068a9e4 353 */
mbed_official 125:23cc3068a9e4 354
mbed_official 125:23cc3068a9e4 355 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/