mbed library sources modified for open wear
Dependents: openwear-lifelogger-example
Fork of mbed-src by
targets/cmsis/TARGET_STM/TARGET_NUCLEO_F334R8/stm32f3xx_hal.h@310:6188e0254baa, 2014-09-16 (annotated)
- Committer:
- janekm
- Date:
- Tue Sep 16 22:42:01 2014 +0000
- Revision:
- 310:6188e0254baa
- Parent:
- 237:f3da66175598
N/A
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 237:f3da66175598 | 1 | /** |
mbed_official | 237:f3da66175598 | 2 | ****************************************************************************** |
mbed_official | 237:f3da66175598 | 3 | * @file stm32f3xx_hal.h |
mbed_official | 237:f3da66175598 | 4 | * @author MCD Application Team |
mbed_official | 237:f3da66175598 | 5 | * @version V1.0.1 |
mbed_official | 237:f3da66175598 | 6 | * @date 18-June-2014 |
mbed_official | 237:f3da66175598 | 7 | * @brief This file contains all the functions prototypes for the HAL |
mbed_official | 237:f3da66175598 | 8 | * module driver. |
mbed_official | 237:f3da66175598 | 9 | ****************************************************************************** |
mbed_official | 237:f3da66175598 | 10 | * @attention |
mbed_official | 237:f3da66175598 | 11 | * |
mbed_official | 237:f3da66175598 | 12 | * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> |
mbed_official | 237:f3da66175598 | 13 | * |
mbed_official | 237:f3da66175598 | 14 | * Redistribution and use in source and binary forms, with or without modification, |
mbed_official | 237:f3da66175598 | 15 | * are permitted provided that the following conditions are met: |
mbed_official | 237:f3da66175598 | 16 | * 1. Redistributions of source code must retain the above copyright notice, |
mbed_official | 237:f3da66175598 | 17 | * this list of conditions and the following disclaimer. |
mbed_official | 237:f3da66175598 | 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
mbed_official | 237:f3da66175598 | 19 | * this list of conditions and the following disclaimer in the documentation |
mbed_official | 237:f3da66175598 | 20 | * and/or other materials provided with the distribution. |
mbed_official | 237:f3da66175598 | 21 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
mbed_official | 237:f3da66175598 | 22 | * may be used to endorse or promote products derived from this software |
mbed_official | 237:f3da66175598 | 23 | * without specific prior written permission. |
mbed_official | 237:f3da66175598 | 24 | * |
mbed_official | 237:f3da66175598 | 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
mbed_official | 237:f3da66175598 | 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
mbed_official | 237:f3da66175598 | 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
mbed_official | 237:f3da66175598 | 28 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
mbed_official | 237:f3da66175598 | 29 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
mbed_official | 237:f3da66175598 | 30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
mbed_official | 237:f3da66175598 | 31 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
mbed_official | 237:f3da66175598 | 32 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
mbed_official | 237:f3da66175598 | 33 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
mbed_official | 237:f3da66175598 | 34 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
mbed_official | 237:f3da66175598 | 35 | * |
mbed_official | 237:f3da66175598 | 36 | ****************************************************************************** |
mbed_official | 237:f3da66175598 | 37 | */ |
mbed_official | 237:f3da66175598 | 38 | |
mbed_official | 237:f3da66175598 | 39 | /* Define to prevent recursive inclusion -------------------------------------*/ |
mbed_official | 237:f3da66175598 | 40 | #ifndef __STM32F3xx_HAL_H |
mbed_official | 237:f3da66175598 | 41 | #define __STM32F3xx_HAL_H |
mbed_official | 237:f3da66175598 | 42 | |
mbed_official | 237:f3da66175598 | 43 | #ifdef __cplusplus |
mbed_official | 237:f3da66175598 | 44 | extern "C" { |
mbed_official | 237:f3da66175598 | 45 | #endif |
mbed_official | 237:f3da66175598 | 46 | |
mbed_official | 237:f3da66175598 | 47 | /* Includes ------------------------------------------------------------------*/ |
mbed_official | 237:f3da66175598 | 48 | #include "stm32f3xx_hal_conf.h" |
mbed_official | 237:f3da66175598 | 49 | |
mbed_official | 237:f3da66175598 | 50 | /** @addtogroup STM32F3xx_HAL_Driver |
mbed_official | 237:f3da66175598 | 51 | * @{ |
mbed_official | 237:f3da66175598 | 52 | */ |
mbed_official | 237:f3da66175598 | 53 | |
mbed_official | 237:f3da66175598 | 54 | /** @addtogroup HAL |
mbed_official | 237:f3da66175598 | 55 | * @{ |
mbed_official | 237:f3da66175598 | 56 | */ |
mbed_official | 237:f3da66175598 | 57 | |
mbed_official | 237:f3da66175598 | 58 | /* Exported types ------------------------------------------------------------*/ |
mbed_official | 237:f3da66175598 | 59 | /* Exported constants --------------------------------------------------------*/ |
mbed_official | 237:f3da66175598 | 60 | |
mbed_official | 237:f3da66175598 | 61 | /** @defgroup SYSCFG_BitAddress_AliasRegion |
mbed_official | 237:f3da66175598 | 62 | * @brief SYSCFG registers bit address in the alias region |
mbed_official | 237:f3da66175598 | 63 | * @{ |
mbed_official | 237:f3da66175598 | 64 | */ |
mbed_official | 237:f3da66175598 | 65 | /* ------------ SYSCFG registers bit address in the alias region -------------*/ |
mbed_official | 237:f3da66175598 | 66 | #define SYSCFG_OFFSET (SYSCFG_BASE - PERIPH_BASE) |
mbed_official | 237:f3da66175598 | 67 | /* --- CFGR2 Register ---*/ |
mbed_official | 237:f3da66175598 | 68 | /* Alias word address of BYP_ADDR_PAR bit */ |
mbed_official | 237:f3da66175598 | 69 | #define CFGR2_OFFSET (SYSCFG_OFFSET + 0x18) |
mbed_official | 237:f3da66175598 | 70 | #define BYPADDRPAR_BitNumber 0x04 |
mbed_official | 237:f3da66175598 | 71 | #define CFGR2_BYPADDRPAR_BB (PERIPH_BB_BASE + (CFGR2_OFFSET * 32) + (BYPADDRPAR_BitNumber * 4)) |
mbed_official | 237:f3da66175598 | 72 | /** |
mbed_official | 237:f3da66175598 | 73 | * @} |
mbed_official | 237:f3da66175598 | 74 | */ |
mbed_official | 237:f3da66175598 | 75 | |
mbed_official | 237:f3da66175598 | 76 | #if defined(SYSCFG_CFGR1_DMA_RMP) |
mbed_official | 237:f3da66175598 | 77 | /** @defgroup HAL_DMA_Remapping |
mbed_official | 237:f3da66175598 | 78 | * Elements values convention: 0xXXYYYYYY |
mbed_official | 237:f3da66175598 | 79 | * - YYYYYY : Position in the register |
mbed_official | 237:f3da66175598 | 80 | * - XX : Register index |
mbed_official | 237:f3da66175598 | 81 | * - 00: CFGR1 register in SYSCFG |
mbed_official | 237:f3da66175598 | 82 | * - 01: CFGR3 register in SYSCFG (not available on STM32F373xC/STM32F378xx devices) |
mbed_official | 237:f3da66175598 | 83 | * @{ |
mbed_official | 237:f3da66175598 | 84 | */ |
mbed_official | 237:f3da66175598 | 85 | #define HAL_REMAPDMA_ADC24_DMA2_CH34 ((uint32_t)0x00000100) /*!< ADC24 DMA remap (STM32F303xB/C/E and STM32F358xx devices) |
mbed_official | 237:f3da66175598 | 86 | 1: Remap (ADC24 DMA requests mapped on DMA2 channels 3 and 4) */ |
mbed_official | 237:f3da66175598 | 87 | #define HAL_REMAPDMA_TIM16_DMA1_CH6 ((uint32_t)0x00000800) /*!< TIM16 DMA request remap |
mbed_official | 237:f3da66175598 | 88 | 1: Remap (TIM16_CH1 and TIM16_UP DMA requests mapped on DMA1 channel 6) */ |
mbed_official | 237:f3da66175598 | 89 | #define HAL_REMAPDMA_TIM17_DMA1_CH7 ((uint32_t)0x00001000) /*!< TIM17 DMA request remap |
mbed_official | 237:f3da66175598 | 90 | 1: Remap (TIM17_CH1 and TIM17_UP DMA requests mapped on DMA1 channel 7) */ |
mbed_official | 237:f3da66175598 | 91 | #define HAL_REMAPDMA_TIM6_DAC1_CH1_DMA1_CH3 ((uint32_t)0x00002000) /*!< TIM6 and DAC channel1 DMA remap (STM32F303xB/C/E and STM32F358xx devices) |
mbed_official | 237:f3da66175598 | 92 | 1: Remap (TIM6_UP and DAC_CH1 DMA requests mapped on DMA1 channel 3) */ |
mbed_official | 237:f3da66175598 | 93 | #define HAL_REMAPDMA_TIM7_DAC1_CH2_DMA1_CH4 ((uint32_t)0x00004000) /*!< TIM7 and DAC channel2 DMA remap (STM32F303xB/C/E and STM32F358xx devices) |
mbed_official | 237:f3da66175598 | 94 | 1: Remap (TIM7_UP and DAC_CH2 DMA requests mapped on DMA1 channel 4) */ |
mbed_official | 237:f3da66175598 | 95 | #define HAL_REMAPDMA_DAC2_CH1_DMA1_CH5 ((uint32_t)0x00008000) /*!< DAC2 channel1 DMA remap (STM32F303x4/6/8 devices only) |
mbed_official | 237:f3da66175598 | 96 | 1: Remap (DAC2_CH1 DMA requests mapped on DMA1 channel 5) */ |
mbed_official | 237:f3da66175598 | 97 | #define HAL_REMAPDMA_TIM18_DAC2_CH1_DMA1_CH5 ((uint32_t)0x00008000) /*!< DAC2 channel1 DMA remap (STM32F303x4/6/8 devices only) |
mbed_official | 237:f3da66175598 | 98 | 1: Remap (DAC2_CH1 DMA requests mapped on DMA1 channel 5) */ |
mbed_official | 237:f3da66175598 | 99 | #if defined(SYSCFG_CFGR3_DMA_RMP) |
mbed_official | 237:f3da66175598 | 100 | #if !defined(HAL_REMAP_CFGR3_MASK) |
mbed_official | 237:f3da66175598 | 101 | #define HAL_REMAP_CFGR3_MASK ((uint32_t)0x01000000) |
mbed_official | 237:f3da66175598 | 102 | #endif |
mbed_official | 237:f3da66175598 | 103 | |
mbed_official | 237:f3da66175598 | 104 | #define HAL_REMAPDMA_SPI1_RX_DMA1_CH2 ((uint32_t)0x01000003) /*!< SPI1_RX DMA remap (STM32F303x4/6/8 devices only) |
mbed_official | 237:f3da66175598 | 105 | 11: Map on DMA1 channel 2 */ |
mbed_official | 237:f3da66175598 | 106 | #define HAL_REMAPDMA_SPI1_RX_DMA1_CH4 ((uint32_t)0x01000001) /*!< SPI1_RX DMA remap (STM32F303x4/6/8 devices only) |
mbed_official | 237:f3da66175598 | 107 | 01: Map on DMA1 channel 4 */ |
mbed_official | 237:f3da66175598 | 108 | #define HAL_REMAPDMA_SPI1_RX_DMA1_CH6 ((uint32_t)0x01000002) /*!< SPI1_RX DMA remap (STM32F303x4/6/8 devices only) |
mbed_official | 237:f3da66175598 | 109 | 10: Map on DMA1 channel 6 */ |
mbed_official | 237:f3da66175598 | 110 | #define HAL_REMAPDMA_SPI1_TX_DMA1_CH3 ((uint32_t)0x0100000C) /*!< SPI1_TX DMA remap (STM32F303x4/6/8 devices only) |
mbed_official | 237:f3da66175598 | 111 | 11: Map on DMA1 channel 3 */ |
mbed_official | 237:f3da66175598 | 112 | #define HAL_REMAPDMA_SPI1_TX_DMA1_CH5 ((uint32_t)0x01000004) /*!< SPI1_TX DMA remap (STM32F303x4/6/8 devices only) |
mbed_official | 237:f3da66175598 | 113 | 01: Map on DMA1 channel 5 */ |
mbed_official | 237:f3da66175598 | 114 | #define HAL_REMAPDMA_SPI1_TX_DMA1_CH7 ((uint32_t)0x01000008) /*!< SPI1_TX DMA remap (STM32F303x4/6/8 devices only) |
mbed_official | 237:f3da66175598 | 115 | 10: Map on DMA1 channel 7 */ |
mbed_official | 237:f3da66175598 | 116 | #define HAL_REMAPDMA_I2C1_RX_DMA1_CH7 ((uint32_t)0x01000030) /*!< I2C1_RX DMA remap (STM32F303x4/6/8 devices only) |
mbed_official | 237:f3da66175598 | 117 | 11: Map on DMA1 channel 7 */ |
mbed_official | 237:f3da66175598 | 118 | #define HAL_REMAPDMA_I2C1_RX_DMA1_CH3 ((uint32_t)0x01000010) /*!< I2C1_RX DMA remap (STM32F303x4/6/8 devices only) |
mbed_official | 237:f3da66175598 | 119 | 01: Map on DMA1 channel 3 */ |
mbed_official | 237:f3da66175598 | 120 | #define HAL_REMAPDMA_I2C1_RX_DMA1_CH5 ((uint32_t)0x01000020) /*!< I2C1_RX DMA remap (STM32F303x4/6/8 devices only) |
mbed_official | 237:f3da66175598 | 121 | 10: Map on DMA1 channel 5 */ |
mbed_official | 237:f3da66175598 | 122 | #define HAL_REMAPDMA_I2C1_TX_DMA1_CH6 ((uint32_t)0x010000C0) /*!< I2C1_TX DMA remap (STM32F303x4/6/8 devices only) |
mbed_official | 237:f3da66175598 | 123 | 11: Map on DMA1 channel 6 */ |
mbed_official | 237:f3da66175598 | 124 | #define HAL_REMAPDMA_I2C1_TX_DMA1_CH2 ((uint32_t)0x01000040) /*!< I2C1_TX DMA remap (STM32F303x4/6/8 devices only) |
mbed_official | 237:f3da66175598 | 125 | 01: Map on DMA1 channel 2 */ |
mbed_official | 237:f3da66175598 | 126 | #define HAL_REMAPDMA_I2C1_TX_DMA1_CH4 ((uint32_t)0x01000080) /*!< I2C1_TX DMA remap (STM32F303x4/6/8 devices only) |
mbed_official | 237:f3da66175598 | 127 | 10: Map on DMA1 channel 4 */ |
mbed_official | 237:f3da66175598 | 128 | #define HAL_REMAPDMA_ADC2_DMA1_CH2 ((uint32_t)0x01000100) /*!< ADC2 DMA remap |
mbed_official | 237:f3da66175598 | 129 | x0: No remap (ADC2 on DMA2) |
mbed_official | 237:f3da66175598 | 130 | 10: Map on DMA1 channel 2 */ |
mbed_official | 237:f3da66175598 | 131 | #define HAL_REMAPDMA_ADC2_DMA1_CH4 ((uint32_t)0x01000300) /*!< ADC2 DMA remap |
mbed_official | 237:f3da66175598 | 132 | 11: Map on DMA1 channel 4 */ |
mbed_official | 237:f3da66175598 | 133 | #endif /* SYSCFG_CFGR3_DMA_RMP */ |
mbed_official | 237:f3da66175598 | 134 | |
mbed_official | 237:f3da66175598 | 135 | #if defined(SYSCFG_CFGR3_DMA_RMP) && defined(SYSCFG_CFGR1_DMA_RMP) |
mbed_official | 237:f3da66175598 | 136 | #define IS_HAL_REMAPDMA(RMP) ((((RMP) & HAL_REMAPDMA_ADC24_DMA2_CH34) == HAL_REMAPDMA_ADC24_DMA2_CH34) || \ |
mbed_official | 237:f3da66175598 | 137 | (((RMP) & HAL_REMAPDMA_TIM16_DMA1_CH6) == HAL_REMAPDMA_TIM16_DMA1_CH6) || \ |
mbed_official | 237:f3da66175598 | 138 | (((RMP) & HAL_REMAPDMA_TIM17_DMA1_CH7) == HAL_REMAPDMA_TIM17_DMA1_CH7) || \ |
mbed_official | 237:f3da66175598 | 139 | (((RMP) & HAL_REMAPDMA_TIM6_DAC1_CH1_DMA1_CH3) == HAL_REMAPDMA_TIM6_DAC1_CH1_DMA1_CH3) || \ |
mbed_official | 237:f3da66175598 | 140 | (((RMP) & HAL_REMAPDMA_TIM7_DAC1_CH2_DMA1_CH4) == HAL_REMAPDMA_TIM7_DAC1_CH2_DMA1_CH4) || \ |
mbed_official | 237:f3da66175598 | 141 | (((RMP) & HAL_REMAPDMA_DAC2_CH1_DMA1_CH5) == HAL_REMAPDMA_DAC2_CH1_DMA1_CH5) || \ |
mbed_official | 237:f3da66175598 | 142 | (((RMP) & HAL_REMAPDMA_TIM18_DAC2_CH1_DMA1_CH5) == HAL_REMAPDMA_TIM18_DAC2_CH1_DMA1_CH5) || \ |
mbed_official | 237:f3da66175598 | 143 | (((RMP) & HAL_REMAPDMA_SPI1_RX_DMA1_CH2) == HAL_REMAPDMA_SPI1_RX_DMA1_CH2) || \ |
mbed_official | 237:f3da66175598 | 144 | (((RMP) & HAL_REMAPDMA_SPI1_RX_DMA1_CH4) == HAL_REMAPDMA_SPI1_RX_DMA1_CH4) || \ |
mbed_official | 237:f3da66175598 | 145 | (((RMP) & HAL_REMAPDMA_SPI1_RX_DMA1_CH6) == HAL_REMAPDMA_SPI1_RX_DMA1_CH6) || \ |
mbed_official | 237:f3da66175598 | 146 | (((RMP) & HAL_REMAPDMA_SPI1_TX_DMA1_CH3) == HAL_REMAPDMA_SPI1_TX_DMA1_CH3) || \ |
mbed_official | 237:f3da66175598 | 147 | (((RMP) & HAL_REMAPDMA_SPI1_TX_DMA1_CH5) == HAL_REMAPDMA_SPI1_TX_DMA1_CH5) || \ |
mbed_official | 237:f3da66175598 | 148 | (((RMP) & HAL_REMAPDMA_SPI1_TX_DMA1_CH7) == HAL_REMAPDMA_SPI1_TX_DMA1_CH7) || \ |
mbed_official | 237:f3da66175598 | 149 | (((RMP) & HAL_REMAPDMA_I2C1_RX_DMA1_CH7) == HAL_REMAPDMA_I2C1_RX_DMA1_CH7) || \ |
mbed_official | 237:f3da66175598 | 150 | (((RMP) & HAL_REMAPDMA_I2C1_RX_DMA1_CH3) == HAL_REMAPDMA_I2C1_RX_DMA1_CH3) || \ |
mbed_official | 237:f3da66175598 | 151 | (((RMP) & HAL_REMAPDMA_I2C1_RX_DMA1_CH5) == HAL_REMAPDMA_I2C1_RX_DMA1_CH5) || \ |
mbed_official | 237:f3da66175598 | 152 | (((RMP) & HAL_REMAPDMA_I2C1_TX_DMA1_CH6) == HAL_REMAPDMA_I2C1_TX_DMA1_CH6) || \ |
mbed_official | 237:f3da66175598 | 153 | (((RMP) & HAL_REMAPDMA_I2C1_TX_DMA1_CH2) == HAL_REMAPDMA_I2C1_TX_DMA1_CH2) || \ |
mbed_official | 237:f3da66175598 | 154 | (((RMP) & HAL_REMAPDMA_I2C1_TX_DMA1_CH4) == HAL_REMAPDMA_I2C1_TX_DMA1_CH4) || \ |
mbed_official | 237:f3da66175598 | 155 | (((RMP) & HAL_REMAPDMA_ADC2_DMA1_CH2) == HAL_REMAPDMA_ADC2_DMA1_CH2) || \ |
mbed_official | 237:f3da66175598 | 156 | (((RMP) & HAL_REMAPDMA_ADC2_DMA1_CH4) == HAL_REMAPDMA_ADC2_DMA1_CH4)) |
mbed_official | 237:f3da66175598 | 157 | #elif defined(SYSCFG_CFGR1_DMA_RMP) |
mbed_official | 237:f3da66175598 | 158 | #define IS_HAL_REMAPDMA(RMP) ((((RMP) & HAL_REMAPDMA_ADC24_DMA2_CH34) == HAL_REMAPDMA_ADC24_DMA2_CH34) || \ |
mbed_official | 237:f3da66175598 | 159 | (((RMP) & HAL_REMAPDMA_TIM16_DMA1_CH6) == HAL_REMAPDMA_TIM16_DMA1_CH6) || \ |
mbed_official | 237:f3da66175598 | 160 | (((RMP) & HAL_REMAPDMA_TIM17_DMA1_CH7) == HAL_REMAPDMA_TIM17_DMA1_CH7) || \ |
mbed_official | 237:f3da66175598 | 161 | (((RMP) & HAL_REMAPDMA_TIM6_DAC1_CH1_DMA1_CH3) == HAL_REMAPDMA_TIM6_DAC1_CH1_DMA1_CH3) || \ |
mbed_official | 237:f3da66175598 | 162 | (((RMP) & HAL_REMAPDMA_TIM7_DAC1_CH2_DMA1_CH4) == HAL_REMAPDMA_TIM7_DAC1_CH2_DMA1_CH4) || \ |
mbed_official | 237:f3da66175598 | 163 | (((RMP) & HAL_REMAPDMA_DAC2_CH1_DMA1_CH5) == HAL_REMAPDMA_DAC2_CH1_DMA1_CH5) || \ |
mbed_official | 237:f3da66175598 | 164 | (((RMP) & HAL_REMAPDMA_TIM18_DAC2_CH1_DMA1_CH5) == HAL_REMAPDMA_TIM18_DAC2_CH1_DMA1_CH5)) |
mbed_official | 237:f3da66175598 | 165 | #endif /* SYSCFG_CFGR3_DMA_RMP && SYSCFG_CFGR1_DMA_RMP*/ |
mbed_official | 237:f3da66175598 | 166 | /** |
mbed_official | 237:f3da66175598 | 167 | * @} |
mbed_official | 237:f3da66175598 | 168 | */ |
mbed_official | 237:f3da66175598 | 169 | #endif /* SYSCFG_CFGR1_DMA_RMP */ |
mbed_official | 237:f3da66175598 | 170 | |
mbed_official | 237:f3da66175598 | 171 | /** @defgroup HAL_Trigger_Remapping |
mbed_official | 237:f3da66175598 | 172 | * Elements values convention: 0xXXYYYYYY |
mbed_official | 237:f3da66175598 | 173 | * - YYYYYY : Position in the register |
mbed_official | 237:f3da66175598 | 174 | * - XX : Register index |
mbed_official | 237:f3da66175598 | 175 | * - 00: CFGR1 register in SYSCFG |
mbed_official | 237:f3da66175598 | 176 | * - 01: CFGR3 register in SYSCFG |
mbed_official | 237:f3da66175598 | 177 | * @{ |
mbed_official | 237:f3da66175598 | 178 | */ |
mbed_official | 237:f3da66175598 | 179 | #define HAL_REMAPTRIGGER_DAC1_TRIG ((uint32_t)0x00000080) /*!< DAC trigger remap (when TSEL = 001 on STM32F303xB/C and STM32F358xx devices) |
mbed_official | 237:f3da66175598 | 180 | 0: No remap (DAC trigger is TIM8_TRGO) |
mbed_official | 237:f3da66175598 | 181 | 1: Remap (DAC trigger is TIM3_TRGO) */ |
mbed_official | 237:f3da66175598 | 182 | #define HAL_REMAPTRIGGER_TIM1_ITR3 ((uint32_t)0x00000040) /*!< TIM1 ITR3 trigger remap |
mbed_official | 237:f3da66175598 | 183 | 0: No remap |
mbed_official | 237:f3da66175598 | 184 | 1: Remap (TIM1_TRG3 = TIM17_OC) */ |
mbed_official | 237:f3da66175598 | 185 | #if defined(SYSCFG_CFGR3_TRIGGER_RMP) |
mbed_official | 237:f3da66175598 | 186 | #if !defined(HAL_REMAP_CFGR3_MASK) |
mbed_official | 237:f3da66175598 | 187 | #define HAL_REMAP_CFGR3_MASK ((uint32_t)0x01000000) |
mbed_official | 237:f3da66175598 | 188 | #endif |
mbed_official | 237:f3da66175598 | 189 | #define HAL_REMAPTRIGGER_DAC1_TRIG3 ((uint32_t)0x01010000) /*!< DAC1_CH1 / DAC1_CH2 Trigger remap |
mbed_official | 237:f3da66175598 | 190 | 0: Remap (DAC trigger is TIM15_TRGO) |
mbed_official | 237:f3da66175598 | 191 | 1: Remap (DAC trigger is HRTIM1_DAC1_TRIG1) */ |
mbed_official | 237:f3da66175598 | 192 | #define HAL_REMAPTRIGGER_DAC1_TRIG5 ((uint32_t)0x01020000) /*!< DAC1_CH1 / DAC1_CH2 Trigger remap |
mbed_official | 237:f3da66175598 | 193 | 0: No remap |
mbed_official | 237:f3da66175598 | 194 | 1: Remap (DAC trigger is HRTIM1_DAC1_TRIG2) */ |
mbed_official | 237:f3da66175598 | 195 | #endif /* SYSCFG_CFGR3_TRIGGER_RMP */ |
mbed_official | 237:f3da66175598 | 196 | |
mbed_official | 237:f3da66175598 | 197 | #if defined(SYSCFG_CFGR3_TRIGGER_RMP) |
mbed_official | 237:f3da66175598 | 198 | #define IS_HAL_REMAPTRIGGER(RMP) ((((RMP) & HAL_REMAPTRIGGER_DAC1) == HAL_REMAPTRIGGER_DAC1) || \ |
mbed_official | 237:f3da66175598 | 199 | (((RMP) & HAL_REMAPTRIGGER_TIM1_ITR3) == HAL_REMAPTRIGGER_TIM1_ITR3) || \ |
mbed_official | 237:f3da66175598 | 200 | (((RMP) & HAL_REMAPTRIGGER_DAC1_TRIG3) == HAL_REMAPTRIGGER_DAC1_TRIG3) || \ |
mbed_official | 237:f3da66175598 | 201 | (((RMP) & HAL_REMAPTRIGGER_DAC1_TRIG5) == HAL_REMAPTRIGGER_DAC1_TRIG5)) |
mbed_official | 237:f3da66175598 | 202 | #else |
mbed_official | 237:f3da66175598 | 203 | #define IS_HAL_REMAPTRIGGER(RMP) ((((RMP) & HAL_REMAPTRIGGER_DAC1) == HAL_REMAPTRIGGER_DAC1) || \ |
mbed_official | 237:f3da66175598 | 204 | (((RMP) & HAL_REMAPTRIGGER_TIM1_ITR3) == HAL_REMAPTRIGGER_TIM1_ITR3)) |
mbed_official | 237:f3da66175598 | 205 | #endif /* SYSCFG_CFGR3_TRIGGER_RMP */ |
mbed_official | 237:f3da66175598 | 206 | /** |
mbed_official | 237:f3da66175598 | 207 | * @} |
mbed_official | 237:f3da66175598 | 208 | */ |
mbed_official | 237:f3da66175598 | 209 | |
mbed_official | 237:f3da66175598 | 210 | /** @defgroup HAL_FastModePlus_I2C |
mbed_official | 237:f3da66175598 | 211 | * @{ |
mbed_official | 237:f3da66175598 | 212 | */ |
mbed_official | 237:f3da66175598 | 213 | #if defined(SYSCFG_CFGR1_I2C1_FMP) |
mbed_official | 237:f3da66175598 | 214 | #define HAL_SYSCFG_FASTMODEPLUS_I2C1 ((uint32_t)SYSCFG_CFGR1_I2C1_FMP) /*!< I2C1 fast mode Plus driving capability activation |
mbed_official | 237:f3da66175598 | 215 | 0: FM+ mode is not enabled on I2C1 pins selected through AF selection bits |
mbed_official | 237:f3da66175598 | 216 | 1: FM+ mode is enabled on I2C1 pins selected through AF selection bits */ |
mbed_official | 237:f3da66175598 | 217 | #endif /* SYSCFG_CFGR1_I2C1_FMP */ |
mbed_official | 237:f3da66175598 | 218 | |
mbed_official | 237:f3da66175598 | 219 | #if defined(SYSCFG_CFGR1_I2C2_FMP) |
mbed_official | 237:f3da66175598 | 220 | #define HAL_SYSCFG_FASTMODEPLUS_I2C2 ((uint32_t)SYSCFG_CFGR1_I2C2_FMP) /*!< I2C2 fast mode Plus driving capability activation |
mbed_official | 237:f3da66175598 | 221 | 0: FM+ mode is not enabled on I2C2 pins selected through AF selection bits |
mbed_official | 237:f3da66175598 | 222 | 1: FM+ mode is enabled on I2C2 pins selected through AF selection bits */ |
mbed_official | 237:f3da66175598 | 223 | #endif /* SYSCFG_CFGR1_I2C2_FMP */ |
mbed_official | 237:f3da66175598 | 224 | |
mbed_official | 237:f3da66175598 | 225 | #if defined(SYSCFG_CFGR1_I2C3_FMP) |
mbed_official | 237:f3da66175598 | 226 | #define HAL_SYSCFG_FASTMODEPLUS_I2C3 ((uint32_t)SYSCFG_CFGR1_I2C3_FMP) /*!< I2C3 fast mode Plus driving capability activation |
mbed_official | 237:f3da66175598 | 227 | 0: FM+ mode is not enabled on I2C3 pins selected through AF selection bits |
mbed_official | 237:f3da66175598 | 228 | 1: FM+ mode is enabled on I2C3 pins selected through AF selection bits */ |
mbed_official | 237:f3da66175598 | 229 | #endif /* SYSCFG_CFGR1_I2C3_FMP */ |
mbed_official | 237:f3da66175598 | 230 | |
mbed_official | 237:f3da66175598 | 231 | #if defined(SYSCFG_CFGR1_I2C_PB6_FMP) |
mbed_official | 237:f3da66175598 | 232 | #define HAL_SYSCFG_FASTMODEPLUS_I2C_PB6 ((uint32_t)SYSCFG_CFGR1_I2C_PB6_FMP) /*!< Fast Mode Plus (FM+) driving capability activation on the pad |
mbed_official | 237:f3da66175598 | 233 | 0: PB6 pin operates in standard mode |
mbed_official | 237:f3da66175598 | 234 | 1: I2C FM+ mode enabled on PB6 pin, and the Speed control is bypassed */ |
mbed_official | 237:f3da66175598 | 235 | #endif /* SYSCFG_CFGR1_I2C_PB6_FMP */ |
mbed_official | 237:f3da66175598 | 236 | |
mbed_official | 237:f3da66175598 | 237 | #if defined(SYSCFG_CFGR1_I2C_PB7_FMP) |
mbed_official | 237:f3da66175598 | 238 | #define HAL_SYSCFG_FASTMODEPLUS_I2C_PB7 ((uint32_t)SYSCFG_CFGR1_I2C_PB7_FMP) /*!< Fast Mode Plus (FM+) driving capability activation on the pad |
mbed_official | 237:f3da66175598 | 239 | 0: PB7 pin operates in standard mode |
mbed_official | 237:f3da66175598 | 240 | 1: I2C FM+ mode enabled on PB7 pin, and the Speed control is bypassed */ |
mbed_official | 237:f3da66175598 | 241 | #endif /* SYSCFG_CFGR1_I2C_PB7_FMP */ |
mbed_official | 237:f3da66175598 | 242 | |
mbed_official | 237:f3da66175598 | 243 | #if defined(SYSCFG_CFGR1_I2C_PB8_FMP) |
mbed_official | 237:f3da66175598 | 244 | #define HAL_SYSCFG_FASTMODEPLUS_I2C_PB8 ((uint32_t)SYSCFG_CFGR1_I2C_PB8_FMP) /*!< Fast Mode Plus (FM+) driving capability activation on the pad |
mbed_official | 237:f3da66175598 | 245 | 0: PB8 pin operates in standard mode |
mbed_official | 237:f3da66175598 | 246 | 1: I2C FM+ mode enabled on PB8 pin, and the Speed control is bypassed */ |
mbed_official | 237:f3da66175598 | 247 | #endif /* SYSCFG_CFGR1_I2C_PB8_FMP */ |
mbed_official | 237:f3da66175598 | 248 | |
mbed_official | 237:f3da66175598 | 249 | #if defined(SYSCFG_CFGR1_I2C_PB9_FMP) |
mbed_official | 237:f3da66175598 | 250 | #define HAL_SYSCFG_FASTMODEPLUS_I2C_PB9 ((uint32_t)SYSCFG_CFGR1_I2C_PB9_FMP) /*!< Fast Mode Plus (FM+) driving capability activation on the pad |
mbed_official | 237:f3da66175598 | 251 | 0: PB9 pin operates in standard mode |
mbed_official | 237:f3da66175598 | 252 | 1: I2C FM+ mode enabled on PB9 pin, and the Speed control is bypassed */ |
mbed_official | 237:f3da66175598 | 253 | #endif /* SYSCFG_CFGR1_I2C_PB9_FMP */ |
mbed_official | 237:f3da66175598 | 254 | |
mbed_official | 237:f3da66175598 | 255 | #if defined(SYSCFG_CFGR1_I2C1_FMP) && defined(SYSCFG_CFGR1_I2C2_FMP) && defined(SYSCFG_CFGR1_I2C3_FMP) |
mbed_official | 237:f3da66175598 | 256 | #define IS_HAL_SYSCFG_FASTMODEPLUS_CONFIG(CONFIG) ((((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C1) == HAL_SYSCFG_FASTMODEPLUS_I2C1) || \ |
mbed_official | 237:f3da66175598 | 257 | (((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C2) == HAL_SYSCFG_FASTMODEPLUS_I2C2) || \ |
mbed_official | 237:f3da66175598 | 258 | (((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C3) == HAL_SYSCFG_FASTMODEPLUS_I2C3) || \ |
mbed_official | 237:f3da66175598 | 259 | (((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C_PB6) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB6) || \ |
mbed_official | 237:f3da66175598 | 260 | (((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C_PB7) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB7) || \ |
mbed_official | 237:f3da66175598 | 261 | (((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C_PB8) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB8) || \ |
mbed_official | 237:f3da66175598 | 262 | (((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C_PB9) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB9)) |
mbed_official | 237:f3da66175598 | 263 | #elif defined(SYSCFG_CFGR1_I2C1_FMP) && defined(SYSCFG_CFGR1_I2C2_FMP) |
mbed_official | 237:f3da66175598 | 264 | #define IS_HAL_SYSCFG_FASTMODEPLUS_CONFIG(CONFIG) ((((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C1) == HAL_SYSCFG_FASTMODEPLUS_I2C1) || \ |
mbed_official | 237:f3da66175598 | 265 | (((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C2) == HAL_SYSCFG_FASTMODEPLUS_I2C2) || \ |
mbed_official | 237:f3da66175598 | 266 | (((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C_PB6) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB6) || \ |
mbed_official | 237:f3da66175598 | 267 | (((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C_PB7) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB7) || \ |
mbed_official | 237:f3da66175598 | 268 | (((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C_PB8) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB8) || \ |
mbed_official | 237:f3da66175598 | 269 | (((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C_PB9) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB9)) |
mbed_official | 237:f3da66175598 | 270 | #elif defined(SYSCFG_CFGR1_I2C1_FMP) |
mbed_official | 237:f3da66175598 | 271 | #define IS_HAL_SYSCFG_FASTMODEPLUS_CONFIG(CONFIG) ((((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C1) == HAL_SYSCFG_FASTMODEPLUS_I2C1) || \ |
mbed_official | 237:f3da66175598 | 272 | (((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C_PB6) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB6) || \ |
mbed_official | 237:f3da66175598 | 273 | (((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C_PB7) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB7) || \ |
mbed_official | 237:f3da66175598 | 274 | (((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C_PB8) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB8) || \ |
mbed_official | 237:f3da66175598 | 275 | (((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C_PB9) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB9)) |
mbed_official | 237:f3da66175598 | 276 | #endif /* SYSCFG_CFGR1_I2C1_FMP && SYSCFG_CFGR1_I2C2_FMP && SYSCFG_CFGR3_I2C1_FMP */ |
mbed_official | 237:f3da66175598 | 277 | /** |
mbed_official | 237:f3da66175598 | 278 | * @} |
mbed_official | 237:f3da66175598 | 279 | */ |
mbed_official | 237:f3da66175598 | 280 | |
mbed_official | 237:f3da66175598 | 281 | #if defined(SYSCFG_RCR_PAGE0) |
mbed_official | 237:f3da66175598 | 282 | /* CCM-SRAM defined */ |
mbed_official | 237:f3da66175598 | 283 | /** @defgroup HAL_Page_Write_Protection |
mbed_official | 237:f3da66175598 | 284 | * @{ |
mbed_official | 237:f3da66175598 | 285 | */ |
mbed_official | 237:f3da66175598 | 286 | #define HAL_SYSCFG_WP_PAGE0 (SYSCFG_RCR_PAGE0) /*!< ICODE SRAM Write protection page 0 */ |
mbed_official | 237:f3da66175598 | 287 | #define HAL_SYSCFG_WP_PAGE1 (SYSCFG_RCR_PAGE1) /*!< ICODE SRAM Write protection page 1 */ |
mbed_official | 237:f3da66175598 | 288 | #define HAL_SYSCFG_WP_PAGE2 (SYSCFG_RCR_PAGE2) /*!< ICODE SRAM Write protection page 2 */ |
mbed_official | 237:f3da66175598 | 289 | #define HAL_SYSCFG_WP_PAGE3 (SYSCFG_RCR_PAGE3) /*!< ICODE SRAM Write protection page 3 */ |
mbed_official | 237:f3da66175598 | 290 | #if defined(SYSCFG_RCR_PAGE4) |
mbed_official | 237:f3da66175598 | 291 | /* More than 4KB CCM-SRAM defined */ |
mbed_official | 237:f3da66175598 | 292 | #define HAL_SYSCFG_WP_PAGE4 (SYSCFG_RCR_PAGE4) /*!< ICODE SRAM Write protection page 4 */ |
mbed_official | 237:f3da66175598 | 293 | #define HAL_SYSCFG_WP_PAGE5 (SYSCFG_RCR_PAGE5) /*!< ICODE SRAM Write protection page 5 */ |
mbed_official | 237:f3da66175598 | 294 | #define HAL_SYSCFG_WP_PAGE6 (SYSCFG_RCR_PAGE6) /*!< ICODE SRAM Write protection page 6 */ |
mbed_official | 237:f3da66175598 | 295 | #define HAL_SYSCFG_WP_PAGE7 (SYSCFG_RCR_PAGE7) /*!< ICODE SRAM Write protection page 7 */ |
mbed_official | 237:f3da66175598 | 296 | #endif /* SYSCFG_RCR_PAGE4 */ |
mbed_official | 237:f3da66175598 | 297 | |
mbed_official | 237:f3da66175598 | 298 | #if defined(SYSCFG_RCR_PAGE4) |
mbed_official | 237:f3da66175598 | 299 | #define IS_HAL_SYSCFG_WP_PAGE(__PAGE__) (((__PAGE__) > 0) && ((__PAGE__) <= SYSCFG_RCR_PAGE7)) |
mbed_official | 237:f3da66175598 | 300 | #else |
mbed_official | 237:f3da66175598 | 301 | #define IS_HAL_SYSCFG_WP_PAGE(__PAGE__) (((__PAGE__) > 0) && ((__PAGE__) <= SYSCFG_RCR_PAGE3)) |
mbed_official | 237:f3da66175598 | 302 | #endif |
mbed_official | 237:f3da66175598 | 303 | /** |
mbed_official | 237:f3da66175598 | 304 | * @} |
mbed_official | 237:f3da66175598 | 305 | */ |
mbed_official | 237:f3da66175598 | 306 | #endif /* SYSCFG_RCR_PAGE0 */ |
mbed_official | 237:f3da66175598 | 307 | |
mbed_official | 237:f3da66175598 | 308 | /** @defgroup HAL_SYSCFG_Interrupts |
mbed_official | 237:f3da66175598 | 309 | * @{ |
mbed_official | 237:f3da66175598 | 310 | */ |
mbed_official | 237:f3da66175598 | 311 | #define HAL_SYSCFG_IT_FPU_IOC (SYSCFG_CFGR1_FPU_IE_0) /*!< Floating Point Unit Invalid operation Interrupt */ |
mbed_official | 237:f3da66175598 | 312 | #define HAL_SYSCFG_IT_FPU_DZC (SYSCFG_CFGR1_FPU_IE_1) /*!< Floating Point Unit Divide-by-zero Interrupt */ |
mbed_official | 237:f3da66175598 | 313 | #define HAL_SYSCFG_IT_FPU_UFC (SYSCFG_CFGR1_FPU_IE_2) /*!< Floating Point Unit Underflow Interrupt */ |
mbed_official | 237:f3da66175598 | 314 | #define HAL_SYSCFG_IT_FPU_OFC (SYSCFG_CFGR1_FPU_IE_3) /*!< Floating Point Unit Overflow Interrupt */ |
mbed_official | 237:f3da66175598 | 315 | #define HAL_SYSCFG_IT_FPU_IDC (SYSCFG_CFGR1_FPU_IE_4) /*!< Floating Point Unit Input denormal Interrupt */ |
mbed_official | 237:f3da66175598 | 316 | #define HAL_SYSCFG_IT_FPU_IXC (SYSCFG_CFGR1_FPU_IE_5) /*!< Floating Point Unit Inexact Interrupt */ |
mbed_official | 237:f3da66175598 | 317 | |
mbed_official | 237:f3da66175598 | 318 | #define IS_HAL_SYSCFG_INTERRUPT(__INTERRUPT__) ((((__INTERRUPT__) & SYSCFG_CFGR1_FPU_IE_0) == SYSCFG_CFGR1_FPU_IE_0) || \ |
mbed_official | 237:f3da66175598 | 319 | (((__INTERRUPT__) & SYSCFG_CFGR1_FPU_IE_1) == SYSCFG_CFGR1_FPU_IE_1) || \ |
mbed_official | 237:f3da66175598 | 320 | (((__INTERRUPT__) & SYSCFG_CFGR1_FPU_IE_2) == SYSCFG_CFGR1_FPU_IE_2) || \ |
mbed_official | 237:f3da66175598 | 321 | (((__INTERRUPT__) & SYSCFG_CFGR1_FPU_IE_3) == SYSCFG_CFGR1_FPU_IE_3) || \ |
mbed_official | 237:f3da66175598 | 322 | (((__INTERRUPT__) & SYSCFG_CFGR1_FPU_IE_4) == SYSCFG_CFGR1_FPU_IE_4) || \ |
mbed_official | 237:f3da66175598 | 323 | (((__INTERRUPT__) & SYSCFG_CFGR1_FPU_IE_5) == SYSCFG_CFGR1_FPU_IE_5)) |
mbed_official | 237:f3da66175598 | 324 | |
mbed_official | 237:f3da66175598 | 325 | /** |
mbed_official | 237:f3da66175598 | 326 | * @} |
mbed_official | 237:f3da66175598 | 327 | */ |
mbed_official | 237:f3da66175598 | 328 | |
mbed_official | 237:f3da66175598 | 329 | |
mbed_official | 237:f3da66175598 | 330 | /* Exported macro ------------------------------------------------------------*/ |
mbed_official | 237:f3da66175598 | 331 | |
mbed_official | 237:f3da66175598 | 332 | /** @brief Freeze/Unfreeze Peripherals in Debug mode |
mbed_official | 237:f3da66175598 | 333 | */ |
mbed_official | 237:f3da66175598 | 334 | #if defined(DBGMCU_APB1_FZ_DBG_RTC_STOP) |
mbed_official | 237:f3da66175598 | 335 | #define __HAL_FREEZE_RTC_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_RTC_STOP)) |
mbed_official | 237:f3da66175598 | 336 | #define __HAL_UNFREEZE_RTC_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_RTC_STOP)) |
mbed_official | 237:f3da66175598 | 337 | #endif /* DBGMCU_APB1_FZ_DBG_RTC_STOP */ |
mbed_official | 237:f3da66175598 | 338 | |
mbed_official | 237:f3da66175598 | 339 | #if defined(DBGMCU_APB1_FZ_DBG_WWDG_STOP) |
mbed_official | 237:f3da66175598 | 340 | #define __HAL_FREEZE_WWDG_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_WWDG_STOP)) |
mbed_official | 237:f3da66175598 | 341 | #define __HAL_UNFREEZE_WWDG_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_WWDG_STOP)) |
mbed_official | 237:f3da66175598 | 342 | #endif /* DBGMCU_APB1_FZ_DBG_WWDG_STOP */ |
mbed_official | 237:f3da66175598 | 343 | |
mbed_official | 237:f3da66175598 | 344 | #if defined(DBGMCU_APB1_FZ_DBG_IWDG_STOP) |
mbed_official | 237:f3da66175598 | 345 | #define __HAL_FREEZE_IWDG_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_IWDG_STOP)) |
mbed_official | 237:f3da66175598 | 346 | #define __HAL_UNFREEZE_IWDG_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_IWDG_STOP)) |
mbed_official | 237:f3da66175598 | 347 | #endif /* DBGMCU_APB1_FZ_DBG_IWDG_STOP */ |
mbed_official | 237:f3da66175598 | 348 | |
mbed_official | 237:f3da66175598 | 349 | #if defined(DBGMCU_APB2_FZ_DBG_TIM1_STOP) |
mbed_official | 237:f3da66175598 | 350 | #define __HAL_FREEZE_TIM1_DBGMCU() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM1_STOP)) |
mbed_official | 237:f3da66175598 | 351 | #define __HAL_UNFREEZE_TIM1_DBGMCU() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM1_STOP)) |
mbed_official | 237:f3da66175598 | 352 | #endif /* DBGMCU_APB2_FZ_DBG_TIM1_STOP */ |
mbed_official | 237:f3da66175598 | 353 | |
mbed_official | 237:f3da66175598 | 354 | #if defined(DBGMCU_APB1_FZ_DBG_TIM2_STOP) |
mbed_official | 237:f3da66175598 | 355 | #define __HAL_FREEZE_TIM2_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM2_STOP)) |
mbed_official | 237:f3da66175598 | 356 | #define __HAL_UNFREEZE_TIM2_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM2_STOP)) |
mbed_official | 237:f3da66175598 | 357 | #endif /* DBGMCU_APB1_FZ_DBG_TIM2_STOP */ |
mbed_official | 237:f3da66175598 | 358 | |
mbed_official | 237:f3da66175598 | 359 | #if defined(DBGMCU_APB1_FZ_DBG_TIM3_STOP) |
mbed_official | 237:f3da66175598 | 360 | #define __HAL_FREEZE_TIM3_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM3_STOP)) |
mbed_official | 237:f3da66175598 | 361 | #define __HAL_UNFREEZE_TIM3_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM3_STOP)) |
mbed_official | 237:f3da66175598 | 362 | #endif /* DBGMCU_APB1_FZ_DBG_TIM3_STOP */ |
mbed_official | 237:f3da66175598 | 363 | |
mbed_official | 237:f3da66175598 | 364 | #if defined(DBGMCU_APB1_FZ_DBG_TIM4_STOP) |
mbed_official | 237:f3da66175598 | 365 | #define __HAL_FREEZE_TIM4_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM4_STOP)) |
mbed_official | 237:f3da66175598 | 366 | #define __HAL_UNFREEZE_TIM4_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM4_STOP)) |
mbed_official | 237:f3da66175598 | 367 | #endif /* DBGMCU_APB1_FZ_DBG_TIM4_STOP */ |
mbed_official | 237:f3da66175598 | 368 | |
mbed_official | 237:f3da66175598 | 369 | #if defined(DBGMCU_APB1_FZ_DBG_TIM5_STOP) |
mbed_official | 237:f3da66175598 | 370 | #define __HAL_FREEZE_TIM5_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM5_STOP)) |
mbed_official | 237:f3da66175598 | 371 | #define __HAL_UNFREEZE_TIM5_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM5_STOP)) |
mbed_official | 237:f3da66175598 | 372 | #endif /* DBGMCU_APB1_FZ_DBG_TIM5_STOP */ |
mbed_official | 237:f3da66175598 | 373 | |
mbed_official | 237:f3da66175598 | 374 | #if defined(DBGMCU_APB1_FZ_DBG_TIM6_STOP) |
mbed_official | 237:f3da66175598 | 375 | #define __HAL_FREEZE_TIM6_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM6_STOP)) |
mbed_official | 237:f3da66175598 | 376 | #define __HAL_UNFREEZE_TIM6_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM6_STOP)) |
mbed_official | 237:f3da66175598 | 377 | #endif /* DBGMCU_APB1_FZ_DBG_TIM6_STOP */ |
mbed_official | 237:f3da66175598 | 378 | |
mbed_official | 237:f3da66175598 | 379 | #if defined(DBGMCU_APB1_FZ_DBG_TIM7_STOP) |
mbed_official | 237:f3da66175598 | 380 | #define __HAL_FREEZE_TIM7_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM7_STOP)) |
mbed_official | 237:f3da66175598 | 381 | #define __HAL_UNFREEZE_TIM7_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM7_STOP)) |
mbed_official | 237:f3da66175598 | 382 | #endif /* DBGMCU_APB1_FZ_DBG_TIM7_STOP */ |
mbed_official | 237:f3da66175598 | 383 | |
mbed_official | 237:f3da66175598 | 384 | #if defined(DBGMCU_APB2_FZ_DBG_TIM8_STOP) |
mbed_official | 237:f3da66175598 | 385 | #define __HAL_FREEZE_TIM8_DBGMCU() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM8_STOP)) |
mbed_official | 237:f3da66175598 | 386 | #define __HAL_UNFREEZE_TIM8_DBGMCU() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM8_STOP)) |
mbed_official | 237:f3da66175598 | 387 | #endif /* DBGMCU_APB2_FZ_DBG_TIM8_STOP */ |
mbed_official | 237:f3da66175598 | 388 | |
mbed_official | 237:f3da66175598 | 389 | #if defined(DBGMCU_APB1_FZ_DBG_TIM12_STOP) |
mbed_official | 237:f3da66175598 | 390 | #define __HAL_FREEZE_TIM12_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM12_STOP)) |
mbed_official | 237:f3da66175598 | 391 | #define __HAL_UNFREEZE_TIM12_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM12_STOP)) |
mbed_official | 237:f3da66175598 | 392 | #endif /* DBGMCU_APB1_FZ_DBG_TIM12_STOP */ |
mbed_official | 237:f3da66175598 | 393 | |
mbed_official | 237:f3da66175598 | 394 | #if defined(DBGMCU_APB1_FZ_DBG_TIM13_STOP) |
mbed_official | 237:f3da66175598 | 395 | #define __HAL_FREEZE_TIM13_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM13_STOP)) |
mbed_official | 237:f3da66175598 | 396 | #define __HAL_UNFREEZE_TIM13_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM13_STOP)) |
mbed_official | 237:f3da66175598 | 397 | #endif /* DBGMCU_APB1_FZ_DBG_TIM13_STOP */ |
mbed_official | 237:f3da66175598 | 398 | |
mbed_official | 237:f3da66175598 | 399 | #if defined(DBGMCU_APB1_FZ_DBG_TIM14_STOP) |
mbed_official | 237:f3da66175598 | 400 | #define __HAL_FREEZE_TIM14_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM14_STOP)) |
mbed_official | 237:f3da66175598 | 401 | #define __HAL_UNFREEZE_TIM14_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM14_STOP)) |
mbed_official | 237:f3da66175598 | 402 | #endif /* DBGMCU_APB1_FZ_DBG_TIM14_STOP */ |
mbed_official | 237:f3da66175598 | 403 | |
mbed_official | 237:f3da66175598 | 404 | #if defined(DBGMCU_APB2_FZ_DBG_TIM15_STOP) |
mbed_official | 237:f3da66175598 | 405 | #define __HAL_FREEZE_TIM15_DBGMCU() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM15_STOP)) |
mbed_official | 237:f3da66175598 | 406 | #define __HAL_UNFREEZE_TIM15_DBGMCU() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM15_STOP)) |
mbed_official | 237:f3da66175598 | 407 | #endif /* DBGMCU_APB2_FZ_DBG_TIM15_STOP */ |
mbed_official | 237:f3da66175598 | 408 | |
mbed_official | 237:f3da66175598 | 409 | #if defined(DBGMCU_APB2_FZ_DBG_TIM16_STOP) |
mbed_official | 237:f3da66175598 | 410 | #define __HAL_FREEZE_TIM16_DBGMCU() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM16_STOP)) |
mbed_official | 237:f3da66175598 | 411 | #define __HAL_UNFREEZE_TIM16_DBGMCU() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM16_STOP)) |
mbed_official | 237:f3da66175598 | 412 | #endif /* DBGMCU_APB2_FZ_DBG_TIM16_STOP */ |
mbed_official | 237:f3da66175598 | 413 | |
mbed_official | 237:f3da66175598 | 414 | #if defined(DBGMCU_APB2_FZ_DBG_TIM17_STOP) |
mbed_official | 237:f3da66175598 | 415 | #define __HAL_FREEZE_TIM17_DBGMCU() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM17_STOP)) |
mbed_official | 237:f3da66175598 | 416 | #define __HAL_UNFREEZE_TIM17_DBGMCU() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM17_STOP)) |
mbed_official | 237:f3da66175598 | 417 | #endif /* DBGMCU_APB2_FZ_DBG_TIM17_STOP */ |
mbed_official | 237:f3da66175598 | 418 | |
mbed_official | 237:f3da66175598 | 419 | #if defined(DBGMCU_APB2_FZ_DBG_TIM19_STOP) |
mbed_official | 237:f3da66175598 | 420 | #define __HAL_FREEZE_TIM19_DBGMCU() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM19_STOP)) |
mbed_official | 237:f3da66175598 | 421 | #define __HAL_UNFREEZE_TIM19_DBGMCU() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM19_STOP)) |
mbed_official | 237:f3da66175598 | 422 | #endif /* */ |
mbed_official | 237:f3da66175598 | 423 | |
mbed_official | 237:f3da66175598 | 424 | #if defined(DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT) |
mbed_official | 237:f3da66175598 | 425 | #define __HAL_FREEZE_I2C1_TIMEOUT_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT)) |
mbed_official | 237:f3da66175598 | 426 | #define __HAL_UNFREEZE_I2C1_TIMEOUT_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT)) |
mbed_official | 237:f3da66175598 | 427 | #endif /* DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT */ |
mbed_official | 237:f3da66175598 | 428 | |
mbed_official | 237:f3da66175598 | 429 | #if defined(DBGMCU_APB1_FZ_DBG_I2C2_SMBUS_TIMEOUT) |
mbed_official | 237:f3da66175598 | 430 | #define __HAL_FREEZE_I2C2_TIMEOUT_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_I2C2_SMBUS_TIMEOUT)) |
mbed_official | 237:f3da66175598 | 431 | #define __HAL_UNFREEZE_I2C2_TIMEOUT_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_I2C2_SMBUS_TIMEOUT)) |
mbed_official | 237:f3da66175598 | 432 | #endif /* DBGMCU_APB1_FZ_DBG_I2C2_SMBUS_TIMEOUT */ |
mbed_official | 237:f3da66175598 | 433 | |
mbed_official | 237:f3da66175598 | 434 | #if defined(DBGMCU_APB1_FZ_DBG_I2C3_SMBUS_TIMEOUT) |
mbed_official | 237:f3da66175598 | 435 | #define __HAL_FREEZE_I2C3_TIMEOUT_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_I2C3_SMBUS_TIMEOUT)) |
mbed_official | 237:f3da66175598 | 436 | #define __HAL_UNFREEZE_I2C3_TIMEOUT_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_I2C3_SMBUS_TIMEOUT)) |
mbed_official | 237:f3da66175598 | 437 | #endif /* DBGMCU_APB1_FZ_DBG_I2C3_SMBUS_TIMEOUT */ |
mbed_official | 237:f3da66175598 | 438 | |
mbed_official | 237:f3da66175598 | 439 | #if defined(DBGMCU_APB1_FZ_DBG_CAN_STOP) |
mbed_official | 237:f3da66175598 | 440 | #define __HAL_FREEZE_CAN_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_CAN_STOP)) |
mbed_official | 237:f3da66175598 | 441 | #define __HAL_UNFREEZE_CAN_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_CAN_STOP)) |
mbed_official | 237:f3da66175598 | 442 | #endif /* DBGMCU_APB1_FZ_DBG_CAN_STOP */ |
mbed_official | 237:f3da66175598 | 443 | |
mbed_official | 237:f3da66175598 | 444 | |
mbed_official | 237:f3da66175598 | 445 | #if defined(SYSCFG_CFGR1_MEM_MODE) |
mbed_official | 237:f3da66175598 | 446 | /** @brief Main Flash memory mapped at 0x00000000 |
mbed_official | 237:f3da66175598 | 447 | */ |
mbed_official | 237:f3da66175598 | 448 | #define __HAL_REMAPMEMORY_FLASH() (SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_MEM_MODE)) |
mbed_official | 237:f3da66175598 | 449 | #endif /* SYSCFG_CFGR1_MEM_MODE */ |
mbed_official | 237:f3da66175598 | 450 | |
mbed_official | 237:f3da66175598 | 451 | #if defined(SYSCFG_CFGR1_MEM_MODE_0) |
mbed_official | 237:f3da66175598 | 452 | /** @brief System Flash memory mapped at 0x00000000 |
mbed_official | 237:f3da66175598 | 453 | */ |
mbed_official | 237:f3da66175598 | 454 | #define __HAL_REMAPMEMORY_SYSTEMFLASH() do {SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_MEM_MODE); \ |
mbed_official | 237:f3da66175598 | 455 | SYSCFG->CFGR1 |= SYSCFG_CFGR1_MEM_MODE_0; \ |
mbed_official | 237:f3da66175598 | 456 | }while(0) |
mbed_official | 237:f3da66175598 | 457 | #endif /* SYSCFG_CFGR1_MEM_MODE_0 */ |
mbed_official | 237:f3da66175598 | 458 | |
mbed_official | 237:f3da66175598 | 459 | #if defined(SYSCFG_CFGR1_MEM_MODE_0) && defined(SYSCFG_CFGR1_MEM_MODE_1) |
mbed_official | 237:f3da66175598 | 460 | /** @brief Embedded SRAM mapped at 0x00000000 |
mbed_official | 237:f3da66175598 | 461 | */ |
mbed_official | 237:f3da66175598 | 462 | #define __HAL_REMAPMEMORY_SRAM() do {SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_MEM_MODE); \ |
mbed_official | 237:f3da66175598 | 463 | SYSCFG->CFGR1 |= (SYSCFG_CFGR1_MEM_MODE_0 | SYSCFG_CFGR1_MEM_MODE_1); \ |
mbed_official | 237:f3da66175598 | 464 | }while(0) |
mbed_official | 237:f3da66175598 | 465 | #endif /* SYSCFG_CFGR1_MEM_MODE_0 && SYSCFG_CFGR1_MEM_MODE_1 */ |
mbed_official | 237:f3da66175598 | 466 | |
mbed_official | 237:f3da66175598 | 467 | #if defined(SYSCFG_CFGR1_ENCODER_MODE) |
mbed_official | 237:f3da66175598 | 468 | /** @brief No Encoder mode |
mbed_official | 237:f3da66175598 | 469 | */ |
mbed_official | 237:f3da66175598 | 470 | #define __HAL_REMAPENCODER_NONE() (SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_ENCODER_MODE)) |
mbed_official | 237:f3da66175598 | 471 | #endif /* SYSCFG_CFGR1_ENCODER_MODE */ |
mbed_official | 237:f3da66175598 | 472 | |
mbed_official | 237:f3da66175598 | 473 | #if defined(SYSCFG_CFGR1_ENCODER_MODE_0) |
mbed_official | 237:f3da66175598 | 474 | /** @brief Encoder mode : TIM2 IC1 and TIM2 IC2 are connected to TIM15 IC1 and TIM15 IC2 respectively |
mbed_official | 237:f3da66175598 | 475 | */ |
mbed_official | 237:f3da66175598 | 476 | #define __HAL_REMAPENCODER_TIM2() do {SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_ENCODER_MODE); \ |
mbed_official | 237:f3da66175598 | 477 | SYSCFG->CFGR1 |= SYSCFG_CFGR1_ENCODER_MODE_0; \ |
mbed_official | 237:f3da66175598 | 478 | }while(0) |
mbed_official | 237:f3da66175598 | 479 | #endif /* SYSCFG_CFGR1_ENCODER_MODE_0 */ |
mbed_official | 237:f3da66175598 | 480 | |
mbed_official | 237:f3da66175598 | 481 | #if defined(SYSCFG_CFGR1_ENCODER_MODE_1) |
mbed_official | 237:f3da66175598 | 482 | /** @brief Encoder mode : TIM3 IC1 and TIM3 IC2 are connected to TIM15 IC1 and TIM15 IC2 respectively |
mbed_official | 237:f3da66175598 | 483 | */ |
mbed_official | 237:f3da66175598 | 484 | #define __HAL_REMAPENCODER_TIM3() do {SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_ENCODER_MODE); \ |
mbed_official | 237:f3da66175598 | 485 | SYSCFG->CFGR1 |= SYSCFG_CFGR1_ENCODER_MODE_1; \ |
mbed_official | 237:f3da66175598 | 486 | }while(0) |
mbed_official | 237:f3da66175598 | 487 | #endif /* SYSCFG_CFGR1_ENCODER_MODE_1 */ |
mbed_official | 237:f3da66175598 | 488 | |
mbed_official | 237:f3da66175598 | 489 | #if defined(SYSCFG_CFGR1_ENCODER_MODE_0) && defined(SYSCFG_CFGR1_ENCODER_MODE_1) |
mbed_official | 237:f3da66175598 | 490 | /** @brief Encoder mode : TIM4 IC1 and TIM4 IC2 are connected to TIM15 IC1 and TIM15 IC2 (STM32F303xB/C and STM32F358xx devices) |
mbed_official | 237:f3da66175598 | 491 | */ |
mbed_official | 237:f3da66175598 | 492 | #define __HAL_REMAPENCODER_TIM4() do {SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_ENCODER_MODE); \ |
mbed_official | 237:f3da66175598 | 493 | SYSCFG->CFGR1 |= (SYSCFG_CFGR1_ENCODER_MODE_0 | SYSCFG_CFGR1_ENCODER_MODE_1); \ |
mbed_official | 237:f3da66175598 | 494 | }while(0) |
mbed_official | 237:f3da66175598 | 495 | #endif /* SYSCFG_CFGR1_ENCODER_MODE_0 && SYSCFG_CFGR1_ENCODER_MODE_1 */ |
mbed_official | 237:f3da66175598 | 496 | |
mbed_official | 237:f3da66175598 | 497 | #if defined(SYSCFG_CFGR3_DMA_RMP) && defined(SYSCFG_CFGR1_DMA_RMP) |
mbed_official | 237:f3da66175598 | 498 | /** @brief DMA remapping enable/disable macros |
mbed_official | 237:f3da66175598 | 499 | * @param __DMA_REMAP__: This parameter can be a value of @ref HAL_DMA_Remapping |
mbed_official | 237:f3da66175598 | 500 | */ |
mbed_official | 237:f3da66175598 | 501 | #define __HAL_REMAPDMA_CHANNEL_ENABLE(__DMA_REMAP__) do {assert_param(IS_HAL_REMAPDMA((__DMA_REMAP__))); \ |
mbed_official | 237:f3da66175598 | 502 | (((__DMA_REMAP__) & HAL_REMAP_CFGR3_MASK) ? \ |
mbed_official | 237:f3da66175598 | 503 | (SYSCFG->CFGR3 |= ((__DMA_REMAP__) & ~HAL_REMAP_CFGR3_MASK)) : \ |
mbed_official | 237:f3da66175598 | 504 | (SYSCFG->CFGR1 |= (__DMA_REMAP__))); \ |
mbed_official | 237:f3da66175598 | 505 | }while(0) |
mbed_official | 237:f3da66175598 | 506 | #define __HAL_REMAPDMA_CHANNEL_DISABLE(__DMA_REMAP__) do {assert_param(IS_HAL_REMAPDMA((__DMA_REMAP__))); \ |
mbed_official | 237:f3da66175598 | 507 | (((__DMA_REMAP__) & HAL_REMAP_CFGR3_MASK) ? \ |
mbed_official | 237:f3da66175598 | 508 | (SYSCFG->CFGR3 &= (~(__DMA_REMAP__) | HAL_REMAP_CFGR3_MASK)) : \ |
mbed_official | 237:f3da66175598 | 509 | (SYSCFG->CFGR1 &= ~(__DMA_REMAP__))); \ |
mbed_official | 237:f3da66175598 | 510 | }while(0) |
mbed_official | 237:f3da66175598 | 511 | #elif defined(SYSCFG_CFGR1_DMA_RMP) |
mbed_official | 237:f3da66175598 | 512 | /** @brief DMA remapping enable/disable macros |
mbed_official | 237:f3da66175598 | 513 | * @param __DMA_REMAP__: This parameter can be a value of @ref HAL_DMA_Remapping |
mbed_official | 237:f3da66175598 | 514 | */ |
mbed_official | 237:f3da66175598 | 515 | #define __HAL_REMAPDMA_CHANNEL_ENABLE(__DMA_REMAP__) do {assert_param(IS_HAL_REMAPDMA((__DMA_REMAP__))); \ |
mbed_official | 237:f3da66175598 | 516 | SYSCFG->CFGR1 |= (__DMA_REMAP__); \ |
mbed_official | 237:f3da66175598 | 517 | }while(0) |
mbed_official | 237:f3da66175598 | 518 | #define __HAL_REMAPDMA_CHANNEL_DISABLE(__DMA_REMAP__) do {assert_param(IS_HAL_REMAPDMA((__DMA_REMAP__))); \ |
mbed_official | 237:f3da66175598 | 519 | SYSCFG->CFGR1 &= ~(__DMA_REMAP__); \ |
mbed_official | 237:f3da66175598 | 520 | }while(0) |
mbed_official | 237:f3da66175598 | 521 | #endif /* SYSCFG_CFGR3_DMA_RMP || SYSCFG_CFGR1_DMA_RMP */ |
mbed_official | 237:f3da66175598 | 522 | |
mbed_official | 237:f3da66175598 | 523 | /** @brief Fast mode Plus driving capability enable/disable macros |
mbed_official | 237:f3da66175598 | 524 | * @param __FASTMODEPLUS__: This parameter can be a value of @ref HAL_FastModePlus_I2C |
mbed_official | 237:f3da66175598 | 525 | */ |
mbed_official | 237:f3da66175598 | 526 | #define __HAL_SYSCFG_FASTMODEPLUS_ENABLE(__FASTMODEPLUS__) do {assert_param(IS_HAL_SYSCFG_FASTMODEPLUS_CONFIG((__FASTMODEPLUS__))); \ |
mbed_official | 237:f3da66175598 | 527 | SYSCFG->CFGR1 |= (__FASTMODEPLUS__); \ |
mbed_official | 237:f3da66175598 | 528 | }while(0) |
mbed_official | 237:f3da66175598 | 529 | |
mbed_official | 237:f3da66175598 | 530 | #define __HAL_SYSCFG_FASTMODEPLUS_DISABLE(__FASTMODEPLUS__) do {assert_param(IS_HAL_SYSCFG_FASTMODEPLUS_CONFIG((__FASTMODEPLUS__))); \ |
mbed_official | 237:f3da66175598 | 531 | SYSCFG->CFGR1 &= ~(__FASTMODEPLUS__); \ |
mbed_official | 237:f3da66175598 | 532 | }while(0) |
mbed_official | 237:f3da66175598 | 533 | |
mbed_official | 237:f3da66175598 | 534 | /** @brief SYSCFG interrupt enable/disable macros |
mbed_official | 237:f3da66175598 | 535 | * @param __INTERRUPT__: This parameter can be a value of @ref HAL_SYSCFG_Interrupts |
mbed_official | 237:f3da66175598 | 536 | */ |
mbed_official | 237:f3da66175598 | 537 | #define __HAL_SYSCFG_INTERRUPT_ENABLE(__INTERRUPT__) do {assert_param(IS_HAL_SYSCFG_INTERRUPT((__INTERRUPT__))); \ |
mbed_official | 237:f3da66175598 | 538 | SYSCFG->CFGR1 |= (__INTERRUPT__); \ |
mbed_official | 237:f3da66175598 | 539 | }while(0) |
mbed_official | 237:f3da66175598 | 540 | |
mbed_official | 237:f3da66175598 | 541 | #define __HAL_SYSCFG_INTERRUPT_DISABLE(__INTERRUPT__) do {assert_param(IS_HAL_SYSCFG_INTERRUPT((__INTERRUPT__))); \ |
mbed_official | 237:f3da66175598 | 542 | SYSCFG->CFGR1 &= ~(__INTERRUPT__); \ |
mbed_official | 237:f3da66175598 | 543 | }while(0) |
mbed_official | 237:f3da66175598 | 544 | |
mbed_official | 237:f3da66175598 | 545 | #if defined(SYSCFG_CFGR1_USB_IT_RMP) |
mbed_official | 237:f3da66175598 | 546 | /** @brief USB interrupt remapping enable/disable macros |
mbed_official | 237:f3da66175598 | 547 | */ |
mbed_official | 237:f3da66175598 | 548 | #define __HAL_REMAPINTERRUPT_USB_ENABLE() (SYSCFG->CFGR1 |= (SYSCFG_CFGR1_USB_IT_RMP)) |
mbed_official | 237:f3da66175598 | 549 | #define __HAL_REMAPINTERRUPT_USB_DISABLE() (SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_USB_IT_RMP)) |
mbed_official | 237:f3da66175598 | 550 | #endif /* SYSCFG_CFGR1_USB_IT_RMP */ |
mbed_official | 237:f3da66175598 | 551 | |
mbed_official | 237:f3da66175598 | 552 | #if defined(SYSCFG_CFGR1_VBAT) |
mbed_official | 237:f3da66175598 | 553 | /** @brief SYSCFG interrupt enable/disable macros |
mbed_official | 237:f3da66175598 | 554 | */ |
mbed_official | 237:f3da66175598 | 555 | #define __HAL_SYSCFG_VBAT_MONITORING_ENABLE() (SYSCFG->CFGR1 |= (SYSCFG_CFGR1_VBAT)) |
mbed_official | 237:f3da66175598 | 556 | #define __HAL_SYSCFG_VBAT_MONITORING_DISABLE() (SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_VBAT)) |
mbed_official | 237:f3da66175598 | 557 | #endif /* SYSCFG_CFGR1_VBAT */ |
mbed_official | 237:f3da66175598 | 558 | |
mbed_official | 237:f3da66175598 | 559 | #if defined(SYSCFG_CFGR2_LOCKUP_LOCK) |
mbed_official | 237:f3da66175598 | 560 | /** @brief SYSCFG Break Lockup lock |
mbed_official | 237:f3da66175598 | 561 | * Enables and locks the connection of Cortex-M4 LOCKUP (Hardfault) output to TIM1/15/16/17 Break input |
mbed_official | 237:f3da66175598 | 562 | * @note The selected configuration is locked and can be unlocked by system reset |
mbed_official | 237:f3da66175598 | 563 | */ |
mbed_official | 237:f3da66175598 | 564 | #define __HAL_SYSCFG_BREAK_LOCKUP_LOCK() do {SYSCFG->CFGR2 &= ~(SYSCFG_CFGR2_LOCKUP_LOCK); \ |
mbed_official | 237:f3da66175598 | 565 | SYSCFG->CFGR2 |= SYSCFG_CFGR2_LOCKUP_LOCK; \ |
mbed_official | 237:f3da66175598 | 566 | }while(0) |
mbed_official | 237:f3da66175598 | 567 | #endif /* SYSCFG_CFGR2_LOCKUP_LOCK */ |
mbed_official | 237:f3da66175598 | 568 | |
mbed_official | 237:f3da66175598 | 569 | #if defined(SYSCFG_CFGR2_PVD_LOCK) |
mbed_official | 237:f3da66175598 | 570 | /** @brief SYSCFG Break PVD lock |
mbed_official | 237:f3da66175598 | 571 | * Enables and locks the PVD connection with Timer1/8/15/16/17 Break Input, , as well as the PVDE and PLS[2:0] in the PWR_CR register |
mbed_official | 237:f3da66175598 | 572 | * @note The selected configuration is locked and can be unlocked by system reset |
mbed_official | 237:f3da66175598 | 573 | */ |
mbed_official | 237:f3da66175598 | 574 | #define __HAL_SYSCFG_BREAK_PVD_LOCK() do {SYSCFG->CFGR2 &= ~(SYSCFG_CFGR2_PVD_LOCK); \ |
mbed_official | 237:f3da66175598 | 575 | SYSCFG->CFGR2 |= SYSCFG_CFGR2_PVD_LOCK; \ |
mbed_official | 237:f3da66175598 | 576 | }while(0) |
mbed_official | 237:f3da66175598 | 577 | #endif /* SYSCFG_CFGR2_PVD_LOCK */ |
mbed_official | 237:f3da66175598 | 578 | |
mbed_official | 237:f3da66175598 | 579 | #if defined(SYSCFG_CFGR2_SRAM_PARITY_LOCK) |
mbed_official | 237:f3da66175598 | 580 | /** @brief SYSCFG Break SRAM PARITY lock |
mbed_official | 237:f3da66175598 | 581 | * Enables and locks the SRAM_PARITY error signal with Break Input of TIMER1/8/15/16/17 |
mbed_official | 237:f3da66175598 | 582 | * @note The selected configuration is locked and can be unlocked by system reset |
mbed_official | 237:f3da66175598 | 583 | */ |
mbed_official | 237:f3da66175598 | 584 | #define __HAL_SYSCFG_BREAK_SRAMPARITY_LOCK() do {SYSCFG->CFGR2 &= ~(SYSCFG_CFGR2_SRAM_PARITY_LOCK); \ |
mbed_official | 237:f3da66175598 | 585 | SYSCFG->CFGR2 |= SYSCFG_CFGR2_SRAM_PARITY_LOCK; \ |
mbed_official | 237:f3da66175598 | 586 | }while(0) |
mbed_official | 237:f3da66175598 | 587 | #endif /* SYSCFG_CFGR2_SRAM_PARITY_LOCK */ |
mbed_official | 237:f3da66175598 | 588 | |
mbed_official | 237:f3da66175598 | 589 | #if defined(SYSCFG_CFGR3_TRIGGER_RMP) |
mbed_official | 237:f3da66175598 | 590 | /** @brief Trigger remapping enable/disable macros |
mbed_official | 237:f3da66175598 | 591 | * @param __TRIGGER_REMAP__: This parameter can be a value of @ref HAL_Trigger_Remapping |
mbed_official | 237:f3da66175598 | 592 | */ |
mbed_official | 237:f3da66175598 | 593 | #define __HAL_REMAPTRIGGER_ENABLE(__TRIGGER_REMAP__) do {assert_param(IS_HAL_REMAPTRIGGER((__TRIGGER_REMAP__))); \ |
mbed_official | 237:f3da66175598 | 594 | (((__TRIGGER_REMAP__) & HAL_REMAP_CFGR3_MASK) ? \ |
mbed_official | 237:f3da66175598 | 595 | (SYSCFG->CFGR3 |= ((__TRIGGER_REMAP__) & ~HAL_REMAP_CFGR3_MASK)) : \ |
mbed_official | 237:f3da66175598 | 596 | (SYSCFG->CFGR1 |= (__TRIGGER_REMAP__))); \ |
mbed_official | 237:f3da66175598 | 597 | }while(0) |
mbed_official | 237:f3da66175598 | 598 | #define __HAL_REMAPTRIGGER_DISABLE(__TRIGGER_REMAP__) do {assert_param(IS_HAL_REMAPTRIGGER((__TRIGGER_REMAP__))); \ |
mbed_official | 237:f3da66175598 | 599 | (((__TRIGGER_REMAP__) & HAL_REMAP_CFGR3_MASK) ? \ |
mbed_official | 237:f3da66175598 | 600 | (SYSCFG->CFGR3 &= (~(__TRIGGER_REMAP__) | HAL_REMAP_CFGR3_MASK)) : \ |
mbed_official | 237:f3da66175598 | 601 | (SYSCFG->CFGR1 &= ~(__TRIGGER_REMAP__))); \ |
mbed_official | 237:f3da66175598 | 602 | }while(0) |
mbed_official | 237:f3da66175598 | 603 | #else |
mbed_official | 237:f3da66175598 | 604 | /** @brief Trigger remapping enable/disable macros |
mbed_official | 237:f3da66175598 | 605 | * @param __TRIGGER_REMAP__: This parameter can be a value of @ref HAL_Trigger_Remapping |
mbed_official | 237:f3da66175598 | 606 | */ |
mbed_official | 237:f3da66175598 | 607 | #define __HAL_REMAPTRIGGER_ENABLE(__TRIGGER_REMAP__) do {assert_param(IS_HAL_REMAPTRIGGER((__TRIGGER_REMAP__))); \ |
mbed_official | 237:f3da66175598 | 608 | (SYSCFG->CFGR1 |= (__TRIGGER_REMAP__)); \ |
mbed_official | 237:f3da66175598 | 609 | }while(0) |
mbed_official | 237:f3da66175598 | 610 | #define __HAL_REMAPTRIGGER_DISABLE(__TRIGGER_REMAP__) do {assert_param(IS_HAL_REMAPTRIGGER((__TRIGGER_REMAP__))); \ |
mbed_official | 237:f3da66175598 | 611 | (SYSCFG->CFGR1 &= ~(__TRIGGER_REMAP__)); \ |
mbed_official | 237:f3da66175598 | 612 | }while(0) |
mbed_official | 237:f3da66175598 | 613 | #endif /* SYSCFG_CFGR3_TRIGGER_RMP */ |
mbed_official | 237:f3da66175598 | 614 | |
mbed_official | 237:f3da66175598 | 615 | #if defined(SYSCFG_CFGR2_BYP_ADDR_PAR) |
mbed_official | 237:f3da66175598 | 616 | /** |
mbed_official | 237:f3da66175598 | 617 | * @brief Parity check on RAM disable macro |
mbed_official | 237:f3da66175598 | 618 | * @note Disabling the parity check on RAM locks the configuration bit. |
mbed_official | 237:f3da66175598 | 619 | * To re-enable the parity check on RAM perform a system reset. |
mbed_official | 237:f3da66175598 | 620 | */ |
mbed_official | 237:f3da66175598 | 621 | #define __HAL_SYSCFG_RAM_PARITYCHECK_DISABLE() (*(__IO uint32_t *) CFGR2_BYPADDRPAR_BB = (uint32_t)0x00000001) |
mbed_official | 237:f3da66175598 | 622 | #endif /* SYSCFG_CFGR2_BYP_ADDR_PAR */ |
mbed_official | 237:f3da66175598 | 623 | |
mbed_official | 237:f3da66175598 | 624 | #if defined(SYSCFG_RCR_PAGE0) |
mbed_official | 237:f3da66175598 | 625 | /** @brief CCM RAM page write protection enable macro |
mbed_official | 237:f3da66175598 | 626 | * @param __PAGE_WP__: This parameter can be a value of @ref HAL_Page_Write_Protection |
mbed_official | 237:f3da66175598 | 627 | * @note write protection can only be disabled by a system reset |
mbed_official | 237:f3da66175598 | 628 | */ |
mbed_official | 237:f3da66175598 | 629 | #define __HAL_SYSCFG_SRAM_WRP_ENABLE(__PAGE_WP__) do {assert_param(IS_HAL_SYSCFG_WP_PAGE((__PAGE_WP__))); \ |
mbed_official | 237:f3da66175598 | 630 | SYSCFG->RCR |= (__PAGE_WP__); \ |
mbed_official | 237:f3da66175598 | 631 | }while(0) |
mbed_official | 237:f3da66175598 | 632 | #endif /* SYSCFG_RCR_PAGE0 */ |
mbed_official | 237:f3da66175598 | 633 | |
mbed_official | 237:f3da66175598 | 634 | |
mbed_official | 237:f3da66175598 | 635 | /* Exported functions --------------------------------------------------------*/ |
mbed_official | 237:f3da66175598 | 636 | |
mbed_official | 237:f3da66175598 | 637 | /* Initialization and de-initialization functions ******************************/ |
mbed_official | 237:f3da66175598 | 638 | HAL_StatusTypeDef HAL_Init(void); |
mbed_official | 237:f3da66175598 | 639 | HAL_StatusTypeDef HAL_DeInit(void); |
mbed_official | 237:f3da66175598 | 640 | void HAL_MspInit(void); |
mbed_official | 237:f3da66175598 | 641 | void HAL_MspDeInit(void); |
mbed_official | 237:f3da66175598 | 642 | HAL_StatusTypeDef HAL_InitTick (uint32_t TickPriority); |
mbed_official | 237:f3da66175598 | 643 | |
mbed_official | 237:f3da66175598 | 644 | /* Peripheral Control functions ************************************************/ |
mbed_official | 237:f3da66175598 | 645 | void HAL_IncTick(void); |
mbed_official | 237:f3da66175598 | 646 | void HAL_Delay(__IO uint32_t Delay); |
mbed_official | 237:f3da66175598 | 647 | void HAL_SuspendTick(void); |
mbed_official | 237:f3da66175598 | 648 | void HAL_ResumeTick(void); |
mbed_official | 237:f3da66175598 | 649 | uint32_t HAL_GetTick(void); |
mbed_official | 237:f3da66175598 | 650 | uint32_t HAL_GetHalVersion(void); |
mbed_official | 237:f3da66175598 | 651 | uint32_t HAL_GetREVID(void); |
mbed_official | 237:f3da66175598 | 652 | uint32_t HAL_GetDEVID(void); |
mbed_official | 237:f3da66175598 | 653 | void HAL_EnableDBGSleepMode(void); |
mbed_official | 237:f3da66175598 | 654 | void HAL_DisableDBGSleepMode(void); |
mbed_official | 237:f3da66175598 | 655 | void HAL_EnableDBGStopMode(void); |
mbed_official | 237:f3da66175598 | 656 | void HAL_DisableDBGStopMode(void); |
mbed_official | 237:f3da66175598 | 657 | void HAL_EnableDBGStandbyMode(void); |
mbed_official | 237:f3da66175598 | 658 | void HAL_DisableDBGStandbyMode(void); |
mbed_official | 237:f3da66175598 | 659 | |
mbed_official | 237:f3da66175598 | 660 | |
mbed_official | 237:f3da66175598 | 661 | /** |
mbed_official | 237:f3da66175598 | 662 | * @} |
mbed_official | 237:f3da66175598 | 663 | */ |
mbed_official | 237:f3da66175598 | 664 | |
mbed_official | 237:f3da66175598 | 665 | /** |
mbed_official | 237:f3da66175598 | 666 | * @} |
mbed_official | 237:f3da66175598 | 667 | */ |
mbed_official | 237:f3da66175598 | 668 | |
mbed_official | 237:f3da66175598 | 669 | #ifdef __cplusplus |
mbed_official | 237:f3da66175598 | 670 | } |
mbed_official | 237:f3da66175598 | 671 | #endif |
mbed_official | 237:f3da66175598 | 672 | |
mbed_official | 237:f3da66175598 | 673 | #endif /* __STM32F3xx_HAL_H */ |
mbed_official | 237:f3da66175598 | 674 | |
mbed_official | 237:f3da66175598 | 675 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |