my fork

Dependents:   Nucleo_blueNRG

Fork of mbed by mbed official

Committer:
bogdanm
Date:
Mon Apr 28 17:39:05 2014 +0100
Revision:
83:8a40adfe8776
Parent:
81:7d30d6019079
Child:
90:cb3d968589d8
Release 83 of the mbed library

Main changes:

- updated tests
- K64F TCP/IP support
- lots of fixes in various targets

Who changed what in which revision?

UserRevisionLine numberNew contents of line
emilmont 77:869cf507173a 1 /**
emilmont 77:869cf507173a 2 ******************************************************************************
emilmont 77:869cf507173a 3 * @file stm32f0xx.h
emilmont 77:869cf507173a 4 * @author MCD Application Team
emilmont 77:869cf507173a 5 * @version V1.3.1
emilmont 77:869cf507173a 6 * @date 17-January-2014
emilmont 77:869cf507173a 7 * @brief CMSIS Cortex-M0 Device Peripheral Access Layer Header File.
emilmont 77:869cf507173a 8 * This file contains all the peripheral register's definitions, bits
emilmont 77:869cf507173a 9 * definitions and memory mapping for STM32F0xx devices.
emilmont 77:869cf507173a 10 *
emilmont 77:869cf507173a 11 * The file is the unique include file that the application programmer
emilmont 77:869cf507173a 12 * is using in the C source code, usually in main.c. This file contains:
emilmont 77:869cf507173a 13 * - Configuration section that allows to select:
emilmont 77:869cf507173a 14 * - The device used in the target application
emilmont 77:869cf507173a 15 * - To use or not the peripheral’s drivers in application code(i.e.
emilmont 77:869cf507173a 16 * code will be based on direct access to peripheral’s registers
emilmont 77:869cf507173a 17 * rather than drivers API), this option is controlled by
emilmont 77:869cf507173a 18 * "#define USE_STDPERIPH_DRIVER"
emilmont 77:869cf507173a 19 * - To change few application-specific parameters such as the HSE
emilmont 77:869cf507173a 20 * crystal frequency
emilmont 77:869cf507173a 21 * - Data structures and the address mapping for all peripherals
emilmont 77:869cf507173a 22 * - Peripheral's registers declarations and bits definition
emilmont 77:869cf507173a 23 * - Macros to access peripheral’s registers hardware
emilmont 77:869cf507173a 24 *
emilmont 77:869cf507173a 25 ******************************************************************************
emilmont 77:869cf507173a 26 * @attention
emilmont 77:869cf507173a 27 *
bogdanm 81:7d30d6019079 28 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
emilmont 77:869cf507173a 29 *
bogdanm 81:7d30d6019079 30 * Redistribution and use in source and binary forms, with or without modification,
bogdanm 81:7d30d6019079 31 * are permitted provided that the following conditions are met:
bogdanm 81:7d30d6019079 32 * 1. Redistributions of source code must retain the above copyright notice,
bogdanm 81:7d30d6019079 33 * this list of conditions and the following disclaimer.
bogdanm 81:7d30d6019079 34 * 2. Redistributions in binary form must reproduce the above copyright notice,
bogdanm 81:7d30d6019079 35 * this list of conditions and the following disclaimer in the documentation
bogdanm 81:7d30d6019079 36 * and/or other materials provided with the distribution.
bogdanm 81:7d30d6019079 37 * 3. Neither the name of STMicroelectronics nor the names of its contributors
bogdanm 81:7d30d6019079 38 * may be used to endorse or promote products derived from this software
bogdanm 81:7d30d6019079 39 * without specific prior written permission.
emilmont 77:869cf507173a 40 *
bogdanm 81:7d30d6019079 41 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
bogdanm 81:7d30d6019079 42 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
bogdanm 81:7d30d6019079 43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
bogdanm 81:7d30d6019079 44 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
bogdanm 81:7d30d6019079 45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
bogdanm 81:7d30d6019079 46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
bogdanm 81:7d30d6019079 47 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
bogdanm 81:7d30d6019079 48 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
bogdanm 81:7d30d6019079 49 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
bogdanm 81:7d30d6019079 50 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
emilmont 77:869cf507173a 51 *
emilmont 77:869cf507173a 52 ******************************************************************************
emilmont 77:869cf507173a 53 */
emilmont 77:869cf507173a 54
emilmont 77:869cf507173a 55 /** @addtogroup CMSIS
emilmont 77:869cf507173a 56 * @{
emilmont 77:869cf507173a 57 */
emilmont 77:869cf507173a 58
emilmont 77:869cf507173a 59 /** @addtogroup stm32f0xx
emilmont 77:869cf507173a 60 * @{
emilmont 77:869cf507173a 61 */
emilmont 77:869cf507173a 62
emilmont 77:869cf507173a 63 #ifndef __STM32F0XX_H
emilmont 77:869cf507173a 64 #define __STM32F0XX_H
emilmont 77:869cf507173a 65
emilmont 77:869cf507173a 66 #ifdef __cplusplus
emilmont 77:869cf507173a 67 extern "C" {
emilmont 77:869cf507173a 68 #endif
emilmont 77:869cf507173a 69
emilmont 77:869cf507173a 70 /** @addtogroup Library_configuration_section
emilmont 77:869cf507173a 71 * @{
emilmont 77:869cf507173a 72 */
emilmont 77:869cf507173a 73
emilmont 77:869cf507173a 74 /* Uncomment the line below according to the target STM32F0 device used in your
emilmont 77:869cf507173a 75 application
emilmont 77:869cf507173a 76 */
emilmont 77:869cf507173a 77
emilmont 77:869cf507173a 78 #if !defined (STM32F030) && !defined (STM32F031) && !defined (STM32F051) && !defined (STM32F072) && !defined (STM32F042)
emilmont 77:869cf507173a 79 #define STM32F030
emilmont 77:869cf507173a 80 /* #define STM32F031 */
emilmont 77:869cf507173a 81 /* #define STM32F051 */
emilmont 77:869cf507173a 82 /* #define STM32F072 */
emilmont 77:869cf507173a 83 /* #define STM32F042 */
emilmont 77:869cf507173a 84 #endif
emilmont 77:869cf507173a 85
emilmont 77:869cf507173a 86 /* Tip: To avoid modifying this file each time you need to switch between these
emilmont 77:869cf507173a 87 devices, you can define the device in your toolchain compiler preprocessor.
emilmont 77:869cf507173a 88 */
emilmont 77:869cf507173a 89
emilmont 77:869cf507173a 90 /* Old STM32F0XX definition, maintained for legacy purpose */
emilmont 77:869cf507173a 91 #if defined(STM32F0XX) || defined(STM32F0XX_MD)
emilmont 77:869cf507173a 92 #define STM32F051
emilmont 77:869cf507173a 93 #endif /* STM32F0XX */
emilmont 77:869cf507173a 94
emilmont 77:869cf507173a 95 /* Old STM32F0XX_LD definition, maintained for legacy purpose */
emilmont 77:869cf507173a 96 #ifdef STM32F0XX_LD
emilmont 77:869cf507173a 97 #define STM32F031
emilmont 77:869cf507173a 98 #endif /* STM32F0XX_LD */
emilmont 77:869cf507173a 99
emilmont 77:869cf507173a 100 /* Old STM32F0XX_HD definition, maintained for legacy purpose */
emilmont 77:869cf507173a 101 #ifdef STM32F0XX_HD
emilmont 77:869cf507173a 102 #define STM32F072
emilmont 77:869cf507173a 103 #endif /* STM32F0XX_HD */
emilmont 77:869cf507173a 104
emilmont 77:869cf507173a 105 /* Old STM32F030X6/X8 definition, maintained for legacy purpose */
emilmont 77:869cf507173a 106 #if defined (STM32F030X8) || defined (STM32F030X6)
emilmont 77:869cf507173a 107 #define STM32F030
emilmont 77:869cf507173a 108 #endif /* STM32F030X8 or STM32F030X6 */
emilmont 77:869cf507173a 109
emilmont 77:869cf507173a 110
emilmont 77:869cf507173a 111 #if !defined (STM32F030) && !defined (STM32F031) && !defined (STM32F051) && !defined (STM32F072) && !defined (STM32F042)
emilmont 77:869cf507173a 112 #error "Please select first the target STM32F0xx device used in your application (in stm32f0xx.h file)"
emilmont 77:869cf507173a 113 #endif
emilmont 77:869cf507173a 114
emilmont 77:869cf507173a 115 #if !defined USE_STDPERIPH_DRIVER
emilmont 77:869cf507173a 116 /**
emilmont 77:869cf507173a 117 * @brief Comment the line below if you will not use the peripherals drivers.
emilmont 77:869cf507173a 118 In this case, these drivers will not be included and the application code will
emilmont 77:869cf507173a 119 be based on direct access to peripherals registers
emilmont 77:869cf507173a 120 */
emilmont 77:869cf507173a 121 #define USE_STDPERIPH_DRIVER
emilmont 77:869cf507173a 122 #endif /* USE_STDPERIPH_DRIVER */
emilmont 77:869cf507173a 123
emilmont 77:869cf507173a 124 /**
emilmont 77:869cf507173a 125 * @brief In the following line adjust the value of External High Speed oscillator (HSE)
emilmont 77:869cf507173a 126 used in your application
emilmont 77:869cf507173a 127
emilmont 77:869cf507173a 128 Tip: To avoid modifying this file each time you need to use different HSE, you
emilmont 77:869cf507173a 129 can define the HSE value in your toolchain compiler preprocessor.
emilmont 77:869cf507173a 130 */
emilmont 77:869cf507173a 131 #if !defined (HSE_VALUE)
emilmont 77:869cf507173a 132 #define HSE_VALUE ((uint32_t)8000000) /*!< Value of the External oscillator in Hz*/
emilmont 77:869cf507173a 133 #endif /* HSE_VALUE */
emilmont 77:869cf507173a 134
emilmont 77:869cf507173a 135 /**
emilmont 77:869cf507173a 136 * @brief In the following line adjust the External High Speed oscillator (HSE) Startup
emilmont 77:869cf507173a 137 Timeout value
emilmont 77:869cf507173a 138 */
emilmont 77:869cf507173a 139 #if !defined (HSE_STARTUP_TIMEOUT)
bogdanm 83:8a40adfe8776 140 #define HSE_STARTUP_TIMEOUT ((uint16_t)1000) /*!< Time out for HSE start up */
emilmont 77:869cf507173a 141 #endif /* HSE_STARTUP_TIMEOUT */
emilmont 77:869cf507173a 142
emilmont 77:869cf507173a 143 /**
emilmont 77:869cf507173a 144 * @brief In the following line adjust the Internal High Speed oscillator (HSI) Startup
emilmont 77:869cf507173a 145 Timeout value
emilmont 77:869cf507173a 146 */
emilmont 77:869cf507173a 147 #if !defined (HSI_STARTUP_TIMEOUT)
emilmont 77:869cf507173a 148 #define HSI_STARTUP_TIMEOUT ((uint16_t)0x5000) /*!< Time out for HSI start up */
emilmont 77:869cf507173a 149 #endif /* HSI_STARTUP_TIMEOUT */
emilmont 77:869cf507173a 150
emilmont 77:869cf507173a 151 #if !defined (HSI_VALUE)
emilmont 77:869cf507173a 152 #define HSI_VALUE ((uint32_t)8000000) /*!< Value of the Internal High Speed oscillator in Hz.
emilmont 77:869cf507173a 153 The real value may vary depending on the variations
emilmont 77:869cf507173a 154 in voltage and temperature. */
emilmont 77:869cf507173a 155 #endif /* HSI_VALUE */
emilmont 77:869cf507173a 156
emilmont 77:869cf507173a 157 #if !defined (HSI14_VALUE)
emilmont 77:869cf507173a 158 #define HSI14_VALUE ((uint32_t)14000000) /*!< Value of the Internal High Speed oscillator for ADC in Hz.
emilmont 77:869cf507173a 159 The real value may vary depending on the variations
emilmont 77:869cf507173a 160 in voltage and temperature. */
emilmont 77:869cf507173a 161 #endif /* HSI14_VALUE */
emilmont 77:869cf507173a 162
emilmont 77:869cf507173a 163 #if !defined (HSI48_VALUE)
emilmont 77:869cf507173a 164 #define HSI48_VALUE ((uint32_t)48000000) /*!< Value of the Internal High Speed oscillator for USB in Hz.
emilmont 77:869cf507173a 165 The real value may vary depending on the variations
emilmont 77:869cf507173a 166 in voltage and temperature. */
emilmont 77:869cf507173a 167 #endif /* HSI48_VALUE */
emilmont 77:869cf507173a 168
emilmont 77:869cf507173a 169 #if !defined (LSI_VALUE)
emilmont 77:869cf507173a 170 #define LSI_VALUE ((uint32_t)40000) /*!< Value of the Internal Low Speed oscillator in Hz
emilmont 77:869cf507173a 171 The real value may vary depending on the variations
emilmont 77:869cf507173a 172 in voltage and temperature. */
emilmont 77:869cf507173a 173 #endif /* LSI_VALUE */
emilmont 77:869cf507173a 174
emilmont 77:869cf507173a 175 #if !defined (LSE_VALUE)
emilmont 77:869cf507173a 176 #define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */
emilmont 77:869cf507173a 177 #endif /* LSE_VALUE */
emilmont 77:869cf507173a 178
emilmont 77:869cf507173a 179 /**
emilmont 77:869cf507173a 180 * @brief STM32F0xx Standard Peripheral Library version number V1.3.1
emilmont 77:869cf507173a 181 */
emilmont 77:869cf507173a 182 #define __STM32F0XX_STDPERIPH_VERSION_MAIN (0x01) /*!< [31:24] main version */
emilmont 77:869cf507173a 183 #define __STM32F0XX_STDPERIPH_VERSION_SUB1 (0x03) /*!< [23:16] sub1 version */
emilmont 77:869cf507173a 184 #define __STM32F0XX_STDPERIPH_VERSION_SUB2 (0x01) /*!< [15:8] sub2 version */
emilmont 77:869cf507173a 185 #define __STM32F0XX_STDPERIPH_VERSION_RC (0x00) /*!< [7:0] release candidate */
emilmont 77:869cf507173a 186 #define __STM32F0XX_STDPERIPH_VERSION ((__STM32F0XX_STDPERIPH_VERSION_MAIN << 24)\
emilmont 77:869cf507173a 187 |(__STM32F0XX_STDPERIPH_VERSION_SUB1 << 16)\
emilmont 77:869cf507173a 188 |(__STM32F0XX_STDPERIPH_VERSION_SUB2 << 8)\
emilmont 77:869cf507173a 189 |(__STM32F0XX_STDPERIPH_VERSION_RC))
emilmont 77:869cf507173a 190
emilmont 77:869cf507173a 191 /**
emilmont 77:869cf507173a 192 * @}
emilmont 77:869cf507173a 193 */
emilmont 77:869cf507173a 194
emilmont 77:869cf507173a 195 /** @addtogroup Configuration_section_for_CMSIS
emilmont 77:869cf507173a 196 * @{
emilmont 77:869cf507173a 197 */
emilmont 77:869cf507173a 198
emilmont 77:869cf507173a 199 /**
emilmont 77:869cf507173a 200 * @brief STM32F0xx Interrupt Number Definition, according to the selected device
emilmont 77:869cf507173a 201 * in @ref Library_configuration_section
emilmont 77:869cf507173a 202 */
emilmont 77:869cf507173a 203 #define __CM0_REV 0 /*!< Core Revision r0p0 */
emilmont 77:869cf507173a 204 #define __MPU_PRESENT 0 /*!< STM32F0xx do not provide MPU */
emilmont 77:869cf507173a 205 #define __NVIC_PRIO_BITS 2 /*!< STM32F0xx uses 2 Bits for the Priority Levels */
emilmont 77:869cf507173a 206 #define __Vendor_SysTickConfig 0 /*!< Set to 1 if different SysTick Config is used */
emilmont 77:869cf507173a 207
emilmont 77:869cf507173a 208 /*!< Interrupt Number Definition */
emilmont 77:869cf507173a 209 typedef enum IRQn
emilmont 77:869cf507173a 210 {
emilmont 77:869cf507173a 211 /****** Cortex-M0 Processor Exceptions Numbers ******************************************************/
emilmont 77:869cf507173a 212 NonMaskableInt_IRQn = -14, /*!< 2 Non Maskable Interrupt */
emilmont 77:869cf507173a 213 HardFault_IRQn = -13, /*!< 3 Cortex-M0 Hard Fault Interrupt */
emilmont 77:869cf507173a 214 SVC_IRQn = -5, /*!< 11 Cortex-M0 SV Call Interrupt */
emilmont 77:869cf507173a 215 PendSV_IRQn = -2, /*!< 14 Cortex-M0 Pend SV Interrupt */
emilmont 77:869cf507173a 216 SysTick_IRQn = -1, /*!< 15 Cortex-M0 System Tick Interrupt */
emilmont 77:869cf507173a 217
emilmont 77:869cf507173a 218 #if defined (STM32F051)
emilmont 77:869cf507173a 219 /****** STM32F051 specific Interrupt Numbers *************************************/
emilmont 77:869cf507173a 220 WWDG_IRQn = 0, /*!< Window WatchDog Interrupt */
emilmont 77:869cf507173a 221 PVD_IRQn = 1, /*!< PVD through EXTI Line detect Interrupt */
emilmont 77:869cf507173a 222 RTC_IRQn = 2, /*!< RTC through EXTI Line Interrupt */
emilmont 77:869cf507173a 223 FLASH_IRQn = 3, /*!< FLASH Interrupt */
emilmont 77:869cf507173a 224 RCC_IRQn = 4, /*!< RCC Interrupt */
emilmont 77:869cf507173a 225 EXTI0_1_IRQn = 5, /*!< EXTI Line 0 and 1 Interrupts */
emilmont 77:869cf507173a 226 EXTI2_3_IRQn = 6, /*!< EXTI Line 2 and 3 Interrupts */
emilmont 77:869cf507173a 227 EXTI4_15_IRQn = 7, /*!< EXTI Line 4 to 15 Interrupts */
emilmont 77:869cf507173a 228 TS_IRQn = 8, /*!< Touch sense controller Interrupt */
emilmont 77:869cf507173a 229 DMA1_Channel1_IRQn = 9, /*!< DMA1 Channel 1 Interrupt */
emilmont 77:869cf507173a 230 DMA1_Channel2_3_IRQn = 10, /*!< DMA1 Channel 2 and Channel 3 Interrupts */
emilmont 77:869cf507173a 231 DMA1_Channel4_5_IRQn = 11, /*!< DMA1 Channel 4 and Channel 5 Interrupts */
emilmont 77:869cf507173a 232 ADC1_COMP_IRQn = 12, /*!< ADC1, COMP1 and COMP2 Interrupts */
emilmont 77:869cf507173a 233 TIM1_BRK_UP_TRG_COM_IRQn = 13, /*!< TIM1 Break, Update, Trigger and Commutation Interrupts */
emilmont 77:869cf507173a 234 TIM1_CC_IRQn = 14, /*!< TIM1 Capture Compare Interrupt */
emilmont 77:869cf507173a 235 TIM2_IRQn = 15, /*!< TIM2 Interrupt */
emilmont 77:869cf507173a 236 TIM3_IRQn = 16, /*!< TIM3 Interrupt */
emilmont 77:869cf507173a 237 TIM6_DAC_IRQn = 17, /*!< TIM6 and DAC Interrupts */
emilmont 77:869cf507173a 238 TIM14_IRQn = 19, /*!< TIM14 Interrupt */
emilmont 77:869cf507173a 239 TIM15_IRQn = 20, /*!< TIM15 Interrupt */
emilmont 77:869cf507173a 240 TIM16_IRQn = 21, /*!< TIM16 Interrupt */
emilmont 77:869cf507173a 241 TIM17_IRQn = 22, /*!< TIM17 Interrupt */
emilmont 77:869cf507173a 242 I2C1_IRQn = 23, /*!< I2C1 Interrupt */
emilmont 77:869cf507173a 243 I2C2_IRQn = 24, /*!< I2C2 Interrupt */
emilmont 77:869cf507173a 244 SPI1_IRQn = 25, /*!< SPI1 Interrupt */
emilmont 77:869cf507173a 245 SPI2_IRQn = 26, /*!< SPI2 Interrupt */
emilmont 77:869cf507173a 246 USART1_IRQn = 27, /*!< USART1 Interrupt */
emilmont 77:869cf507173a 247 USART2_IRQn = 28, /*!< USART2 Interrupt */
emilmont 77:869cf507173a 248 CEC_IRQn = 30 /*!< CEC Interrupt */
emilmont 77:869cf507173a 249 #elif defined (STM32F031)
emilmont 77:869cf507173a 250 /****** STM32F031 specific Interrupt Numbers *************************************/
emilmont 77:869cf507173a 251 WWDG_IRQn = 0, /*!< Window WatchDog Interrupt */
emilmont 77:869cf507173a 252 PVD_IRQn = 1, /*!< PVD through EXTI Line detect Interrupt */
emilmont 77:869cf507173a 253 RTC_IRQn = 2, /*!< RTC through EXTI Line Interrupt */
emilmont 77:869cf507173a 254 FLASH_IRQn = 3, /*!< FLASH Interrupt */
emilmont 77:869cf507173a 255 RCC_IRQn = 4, /*!< RCC Interrupt */
emilmont 77:869cf507173a 256 EXTI0_1_IRQn = 5, /*!< EXTI Line 0 and 1 Interrupts */
emilmont 77:869cf507173a 257 EXTI2_3_IRQn = 6, /*!< EXTI Line 2 and 3 Interrupts */
emilmont 77:869cf507173a 258 EXTI4_15_IRQn = 7, /*!< EXTI Line 4 to 15 Interrupts */
emilmont 77:869cf507173a 259 DMA1_Channel1_IRQn = 9, /*!< DMA1 Channel 1 Interrupt */
emilmont 77:869cf507173a 260 DMA1_Channel2_3_IRQn = 10, /*!< DMA1 Channel 2 and Channel 3 Interrupts */
emilmont 77:869cf507173a 261 DMA1_Channel4_5_IRQn = 11, /*!< DMA1 Channel 4 and Channel 5 Interrupts */
emilmont 77:869cf507173a 262 ADC1_IRQn = 12, /*!< ADC1 Interrupt */
emilmont 77:869cf507173a 263 TIM1_BRK_UP_TRG_COM_IRQn = 13, /*!< TIM1 Break, Update, Trigger and Commutation Interrupts */
emilmont 77:869cf507173a 264 TIM1_CC_IRQn = 14, /*!< TIM1 Capture Compare Interrupt */
emilmont 77:869cf507173a 265 TIM2_IRQn = 15, /*!< TIM2 Interrupt */
emilmont 77:869cf507173a 266 TIM3_IRQn = 16, /*!< TIM3 Interrupt */
emilmont 77:869cf507173a 267 TIM14_IRQn = 19, /*!< TIM14 Interrupt */
emilmont 77:869cf507173a 268 TIM16_IRQn = 21, /*!< TIM16 Interrupt */
emilmont 77:869cf507173a 269 TIM17_IRQn = 22, /*!< TIM17 Interrupt */
emilmont 77:869cf507173a 270 I2C1_IRQn = 23, /*!< I2C1 Interrupt */
emilmont 77:869cf507173a 271 SPI1_IRQn = 25, /*!< SPI1 Interrupt */
emilmont 77:869cf507173a 272 USART1_IRQn = 27 /*!< USART1 Interrupt */
emilmont 77:869cf507173a 273 #elif defined (STM32F030)
emilmont 77:869cf507173a 274 /****** STM32F030 specific Interrupt Numbers *************************************/
emilmont 77:869cf507173a 275 WWDG_IRQn = 0, /*!< Window WatchDog Interrupt */
emilmont 77:869cf507173a 276 RTC_IRQn = 2, /*!< RTC through EXTI Line Interrupt */
emilmont 77:869cf507173a 277 FLASH_IRQn = 3, /*!< FLASH Interrupt */
emilmont 77:869cf507173a 278 RCC_IRQn = 4, /*!< RCC Interrupt */
emilmont 77:869cf507173a 279 EXTI0_1_IRQn = 5, /*!< EXTI Line 0 and 1 Interrupts */
emilmont 77:869cf507173a 280 EXTI2_3_IRQn = 6, /*!< EXTI Line 2 and 3 Interrupts */
emilmont 77:869cf507173a 281 EXTI4_15_IRQn = 7, /*!< EXTI Line 4 to 15 Interrupts */
emilmont 77:869cf507173a 282 DMA1_Channel1_IRQn = 9, /*!< DMA1 Channel 1 Interrupt */
emilmont 77:869cf507173a 283 DMA1_Channel2_3_IRQn = 10, /*!< DMA1 Channel 2 and Channel 3 Interrupts */
emilmont 77:869cf507173a 284 DMA1_Channel4_5_IRQn = 11, /*!< DMA1 Channel 4 and Channel 5 Interrupts */
emilmont 77:869cf507173a 285 ADC1_IRQn = 12, /*!< ADC1 Interrupt */
emilmont 77:869cf507173a 286 TIM1_BRK_UP_TRG_COM_IRQn = 13, /*!< TIM1 Break, Update, Trigger and Commutation Interrupts */
emilmont 77:869cf507173a 287 TIM1_CC_IRQn = 14, /*!< TIM1 Capture Compare Interrupt */
emilmont 77:869cf507173a 288 TIM3_IRQn = 16, /*!< TIM3 Interrupt */
emilmont 77:869cf507173a 289 TIM14_IRQn = 19, /*!< TIM14 Interrupt */
emilmont 77:869cf507173a 290 TIM15_IRQn = 20, /*!< TIM15 Interrupt */
emilmont 77:869cf507173a 291 TIM16_IRQn = 21, /*!< TIM16 Interrupt */
emilmont 77:869cf507173a 292 TIM17_IRQn = 22, /*!< TIM17 Interrupt */
emilmont 77:869cf507173a 293 I2C1_IRQn = 23, /*!< I2C1 Interrupt */
emilmont 77:869cf507173a 294 I2C2_IRQn = 24, /*!< I2C2 Interrupt */
emilmont 77:869cf507173a 295 SPI1_IRQn = 25, /*!< SPI1 Interrupt */
emilmont 77:869cf507173a 296 SPI2_IRQn = 26, /*!< SPI2 Interrupt */
emilmont 77:869cf507173a 297 USART1_IRQn = 27, /*!< USART1 Interrupt */
emilmont 77:869cf507173a 298 USART2_IRQn = 28 /*!< USART2 Interrupt */
emilmont 77:869cf507173a 299 #elif defined (STM32F072)
emilmont 77:869cf507173a 300 WWDG_IRQn = 0, /*!< Window WatchDog Interrupt */
emilmont 77:869cf507173a 301 PVD_VDDIO2_IRQn = 1, /*!< PVD and VDDIO2 supply comparator through EXTI Line detect Interrupt */
emilmont 77:869cf507173a 302 RTC_IRQn = 2, /*!< RTC through EXTI Line Interrupt */
emilmont 77:869cf507173a 303 FLASH_IRQn = 3, /*!< FLASH Interrupt */
emilmont 77:869cf507173a 304 RCC_CRS_IRQn = 4, /*!< RCC and CRS Interrupts */
emilmont 77:869cf507173a 305 EXTI0_1_IRQn = 5, /*!< EXTI Line 0 and 1 Interrupts */
emilmont 77:869cf507173a 306 EXTI2_3_IRQn = 6, /*!< EXTI Line 2 and 3 Interrupts */
emilmont 77:869cf507173a 307 EXTI4_15_IRQn = 7, /*!< EXTI Line 4 to 15 Interrupts */
emilmont 77:869cf507173a 308 TSC_IRQn = 8, /*!< TSC Interrupt */
emilmont 77:869cf507173a 309 DMA1_Channel1_IRQn = 9, /*!< DMA1 Channel 1 Interrupt */
emilmont 77:869cf507173a 310 DMA1_Channel2_3_IRQn = 10, /*!< DMA1 Channel 2 and Channel 3 Interrupts */
emilmont 77:869cf507173a 311 DMA1_Channel4_5_6_7_IRQn = 11, /*!< DMA1 Channel 4, Channel 5, Channel 6 and Channel 7 Interrupts */
emilmont 77:869cf507173a 312 ADC1_COMP_IRQn = 12, /*!< ADC1, COMP1 and COMP2 Interrupts */
emilmont 77:869cf507173a 313 TIM1_BRK_UP_TRG_COM_IRQn = 13, /*!< TIM1 Break, Update, Trigger and Commutation Interrupts */
emilmont 77:869cf507173a 314 TIM1_CC_IRQn = 14, /*!< TIM1 Capture Compare Interrupt */
emilmont 77:869cf507173a 315 TIM2_IRQn = 15, /*!< TIM2 Interrupt */
emilmont 77:869cf507173a 316 TIM3_IRQn = 16, /*!< TIM3 Interrupt */
emilmont 77:869cf507173a 317 TIM6_DAC_IRQn = 17, /*!< TIM6 and DAC Interrupts */
emilmont 77:869cf507173a 318 TIM7_IRQn = 18, /*!< TIM7 Interrupts */
emilmont 77:869cf507173a 319 TIM14_IRQn = 19, /*!< TIM14 Interrupt */
emilmont 77:869cf507173a 320 TIM15_IRQn = 20, /*!< TIM15 Interrupt */
emilmont 77:869cf507173a 321 TIM16_IRQn = 21, /*!< TIM16 Interrupt */
emilmont 77:869cf507173a 322 TIM17_IRQn = 22, /*!< TIM17 Interrupt */
emilmont 77:869cf507173a 323 I2C1_IRQn = 23, /*!< I2C1 Interrupt */
emilmont 77:869cf507173a 324 I2C2_IRQn = 24, /*!< I2C2 Interrupt */
emilmont 77:869cf507173a 325 SPI1_IRQn = 25, /*!< SPI1 Interrupt */
emilmont 77:869cf507173a 326 SPI2_IRQn = 26, /*!< SPI2 Interrupt */
emilmont 77:869cf507173a 327 USART1_IRQn = 27, /*!< USART1 Interrupt */
emilmont 77:869cf507173a 328 USART2_IRQn = 28, /*!< USART2 Interrupt */
emilmont 77:869cf507173a 329 USART3_4_IRQn = 29, /*!< USART3 and USART4 Interrupts */
emilmont 77:869cf507173a 330 CEC_CAN_IRQn = 30, /*!< CEC and CAN Interrupts */
emilmont 77:869cf507173a 331 USB_IRQn = 31 /*!< USB Low Priority global Interrupt */
emilmont 77:869cf507173a 332 #elif defined (STM32F042)
emilmont 77:869cf507173a 333 WWDG_IRQn = 0, /*!< Window WatchDog Interrupt */
emilmont 77:869cf507173a 334 PVD_VDDIO2_IRQn = 1, /*!< PVD and VDDIO2 supply comparator through EXTI Line detect Interrupt */
emilmont 77:869cf507173a 335 RTC_IRQn = 2, /*!< RTC through EXTI Line Interrupt */
emilmont 77:869cf507173a 336 FLASH_IRQn = 3, /*!< FLASH Interrupt */
emilmont 77:869cf507173a 337 RCC_CRS_IRQn = 4, /*!< RCC and CRS Interrupts */
emilmont 77:869cf507173a 338 EXTI0_1_IRQn = 5, /*!< EXTI Line 0 and 1 Interrupts */
emilmont 77:869cf507173a 339 EXTI2_3_IRQn = 6, /*!< EXTI Line 2 and 3 Interrupts */
emilmont 77:869cf507173a 340 EXTI4_15_IRQn = 7, /*!< EXTI Line 4 to 15 Interrupts */
emilmont 77:869cf507173a 341 TSC_IRQn = 8, /*!< TSC Interrupt */
emilmont 77:869cf507173a 342 DMA1_Channel1_IRQn = 9, /*!< DMA1 Channel 1 Interrupt */
emilmont 77:869cf507173a 343 DMA1_Channel2_3_IRQn = 10, /*!< DMA1 Channel 2 and Channel 3 Interrupts */
emilmont 77:869cf507173a 344 DMA1_Channel4_5_IRQn = 11, /*!< DMA1 Channel 4, Channel 5 Interrupts */
emilmont 77:869cf507173a 345 ADC1_IRQn = 12, /*!< ADC1 Interrupts */
emilmont 77:869cf507173a 346 TIM1_BRK_UP_TRG_COM_IRQn = 13, /*!< TIM1 Break, Update, Trigger and Commutation Interrupts */
emilmont 77:869cf507173a 347 TIM1_CC_IRQn = 14, /*!< TIM1 Capture Compare Interrupt */
emilmont 77:869cf507173a 348 TIM2_IRQn = 15, /*!< TIM2 Interrupt */
emilmont 77:869cf507173a 349 TIM3_IRQn = 16, /*!< TIM3 Interrupt */
emilmont 77:869cf507173a 350 TIM14_IRQn = 19, /*!< TIM14 Interrupt */
emilmont 77:869cf507173a 351 TIM16_IRQn = 21, /*!< TIM16 Interrupt */
emilmont 77:869cf507173a 352 TIM17_IRQn = 22, /*!< TIM17 Interrupt */
emilmont 77:869cf507173a 353 I2C1_IRQn = 23, /*!< I2C1 Interrupt */
emilmont 77:869cf507173a 354 SPI1_IRQn = 25, /*!< SPI1 Interrupt */
emilmont 77:869cf507173a 355 SPI2_IRQn = 26, /*!< SPI2 Interrupt */
emilmont 77:869cf507173a 356 USART1_IRQn = 27, /*!< USART1 Interrupt */
emilmont 77:869cf507173a 357 USART2_IRQn = 28, /*!< USART2 Interrupt */
emilmont 77:869cf507173a 358 CEC_CAN_IRQn = 30, /*!< CEC and CAN Interrupts */
emilmont 77:869cf507173a 359 USB_IRQn = 31 /*!< USB Low Priority global Interrupt */
emilmont 77:869cf507173a 360 #endif /* STM32F051 */
emilmont 77:869cf507173a 361 } IRQn_Type;
emilmont 77:869cf507173a 362
emilmont 77:869cf507173a 363 /**
emilmont 77:869cf507173a 364 * @}
emilmont 77:869cf507173a 365 */
emilmont 77:869cf507173a 366
emilmont 77:869cf507173a 367 #include "core_cm0.h"
emilmont 77:869cf507173a 368 #include "system_stm32f0xx.h"
emilmont 77:869cf507173a 369 #include <stdint.h>
emilmont 77:869cf507173a 370
emilmont 77:869cf507173a 371 /** @addtogroup Exported_types
emilmont 77:869cf507173a 372 * @{
emilmont 77:869cf507173a 373 */
emilmont 77:869cf507173a 374
emilmont 77:869cf507173a 375 typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
emilmont 77:869cf507173a 376
emilmont 77:869cf507173a 377 typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
emilmont 77:869cf507173a 378 #define IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) || ((STATE) == ENABLE))
emilmont 77:869cf507173a 379
emilmont 77:869cf507173a 380 typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
emilmont 77:869cf507173a 381
emilmont 77:869cf507173a 382 /** @addtogroup Peripheral_registers_structures
emilmont 77:869cf507173a 383 * @{
emilmont 77:869cf507173a 384 */
emilmont 77:869cf507173a 385
emilmont 77:869cf507173a 386 /**
emilmont 77:869cf507173a 387 * @brief Analog to Digital Converter
emilmont 77:869cf507173a 388 */
emilmont 77:869cf507173a 389
emilmont 77:869cf507173a 390 typedef struct
emilmont 77:869cf507173a 391 {
emilmont 77:869cf507173a 392 __IO uint32_t ISR; /*!< ADC Interrupt and Status register, Address offset:0x00 */
emilmont 77:869cf507173a 393 __IO uint32_t IER; /*!< ADC Interrupt Enable register, Address offset:0x04 */
emilmont 77:869cf507173a 394 __IO uint32_t CR; /*!< ADC Control register, Address offset:0x08 */
emilmont 77:869cf507173a 395 __IO uint32_t CFGR1; /*!< ADC Configuration register 1, Address offset:0x0C */
emilmont 77:869cf507173a 396 __IO uint32_t CFGR2; /*!< ADC Configuration register 2, Address offset:0x10 */
emilmont 77:869cf507173a 397 __IO uint32_t SMPR; /*!< ADC Sampling time register, Address offset:0x14 */
emilmont 77:869cf507173a 398 uint32_t RESERVED1; /*!< Reserved, 0x18 */
emilmont 77:869cf507173a 399 uint32_t RESERVED2; /*!< Reserved, 0x1C */
emilmont 77:869cf507173a 400 __IO uint32_t TR; /*!< ADC watchdog threshold register, Address offset:0x20 */
emilmont 77:869cf507173a 401 uint32_t RESERVED3; /*!< Reserved, 0x24 */
emilmont 77:869cf507173a 402 __IO uint32_t CHSELR; /*!< ADC channel selection register, Address offset:0x28 */
emilmont 77:869cf507173a 403 uint32_t RESERVED4[5]; /*!< Reserved, 0x2C */
emilmont 77:869cf507173a 404 __IO uint32_t DR; /*!< ADC data register, Address offset:0x40 */
emilmont 77:869cf507173a 405 } ADC_TypeDef;
emilmont 77:869cf507173a 406
emilmont 77:869cf507173a 407 typedef struct
emilmont 77:869cf507173a 408 {
emilmont 77:869cf507173a 409 __IO uint32_t CCR;
emilmont 77:869cf507173a 410 } ADC_Common_TypeDef;
emilmont 77:869cf507173a 411
emilmont 77:869cf507173a 412
emilmont 77:869cf507173a 413 /**
emilmont 77:869cf507173a 414 * @brief Controller Area Network TxMailBox
emilmont 77:869cf507173a 415 */
emilmont 77:869cf507173a 416 typedef struct
emilmont 77:869cf507173a 417 {
emilmont 77:869cf507173a 418 __IO uint32_t TIR; /*!< CAN TX mailbox identifier register */
emilmont 77:869cf507173a 419 __IO uint32_t TDTR; /*!< CAN mailbox data length control and time stamp register */
emilmont 77:869cf507173a 420 __IO uint32_t TDLR; /*!< CAN mailbox data low register */
emilmont 77:869cf507173a 421 __IO uint32_t TDHR; /*!< CAN mailbox data high register */
emilmont 77:869cf507173a 422 } CAN_TxMailBox_TypeDef;
emilmont 77:869cf507173a 423
emilmont 77:869cf507173a 424 /**
emilmont 77:869cf507173a 425 * @brief Controller Area Network FIFOMailBox
emilmont 77:869cf507173a 426 */
emilmont 77:869cf507173a 427 typedef struct
emilmont 77:869cf507173a 428 {
emilmont 77:869cf507173a 429 __IO uint32_t RIR; /*!< CAN receive FIFO mailbox identifier register */
emilmont 77:869cf507173a 430 __IO uint32_t RDTR; /*!< CAN receive FIFO mailbox data length control and time stamp register */
emilmont 77:869cf507173a 431 __IO uint32_t RDLR; /*!< CAN receive FIFO mailbox data low register */
emilmont 77:869cf507173a 432 __IO uint32_t RDHR; /*!< CAN receive FIFO mailbox data high register */
emilmont 77:869cf507173a 433 } CAN_FIFOMailBox_TypeDef;
emilmont 77:869cf507173a 434
emilmont 77:869cf507173a 435 /**
emilmont 77:869cf507173a 436 * @brief Controller Area Network FilterRegister
emilmont 77:869cf507173a 437 */
emilmont 77:869cf507173a 438 typedef struct
emilmont 77:869cf507173a 439 {
emilmont 77:869cf507173a 440 __IO uint32_t FR1; /*!< CAN Filter bank register 1 */
emilmont 77:869cf507173a 441 __IO uint32_t FR2; /*!< CAN Filter bank register 1 */
emilmont 77:869cf507173a 442 } CAN_FilterRegister_TypeDef;
emilmont 77:869cf507173a 443
emilmont 77:869cf507173a 444 /**
emilmont 77:869cf507173a 445 * @brief Controller Area Network
emilmont 77:869cf507173a 446 */
emilmont 77:869cf507173a 447 typedef struct
emilmont 77:869cf507173a 448 {
emilmont 77:869cf507173a 449 __IO uint32_t MCR; /*!< CAN master control register, Address offset: 0x00 */
emilmont 77:869cf507173a 450 __IO uint32_t MSR; /*!< CAN master status register, Address offset: 0x04 */
emilmont 77:869cf507173a 451 __IO uint32_t TSR; /*!< CAN transmit status register, Address offset: 0x08 */
emilmont 77:869cf507173a 452 __IO uint32_t RF0R; /*!< CAN receive FIFO 0 register, Address offset: 0x0C */
emilmont 77:869cf507173a 453 __IO uint32_t RF1R; /*!< CAN receive FIFO 1 register, Address offset: 0x10 */
emilmont 77:869cf507173a 454 __IO uint32_t IER; /*!< CAN interrupt enable register, Address offset: 0x14 */
emilmont 77:869cf507173a 455 __IO uint32_t ESR; /*!< CAN error status register, Address offset: 0x18 */
emilmont 77:869cf507173a 456 __IO uint32_t BTR; /*!< CAN bit timing register, Address offset: 0x1C */
emilmont 77:869cf507173a 457 uint32_t RESERVED0[88]; /*!< Reserved, 0x020 - 0x17F */
emilmont 77:869cf507173a 458 CAN_TxMailBox_TypeDef sTxMailBox[3]; /*!< CAN Tx MailBox, Address offset: 0x180 - 0x1AC */
emilmont 77:869cf507173a 459 CAN_FIFOMailBox_TypeDef sFIFOMailBox[2]; /*!< CAN FIFO MailBox, Address offset: 0x1B0 - 0x1CC */
emilmont 77:869cf507173a 460 uint32_t RESERVED1[12]; /*!< Reserved, 0x1D0 - 0x1FF */
emilmont 77:869cf507173a 461 __IO uint32_t FMR; /*!< CAN filter master register, Address offset: 0x200 */
emilmont 77:869cf507173a 462 __IO uint32_t FM1R; /*!< CAN filter mode register, Address offset: 0x204 */
emilmont 77:869cf507173a 463 uint32_t RESERVED2; /*!< Reserved, 0x208 */
emilmont 77:869cf507173a 464 __IO uint32_t FS1R; /*!< CAN filter scale register, Address offset: 0x20C */
emilmont 77:869cf507173a 465 uint32_t RESERVED3; /*!< Reserved, 0x210 */
emilmont 77:869cf507173a 466 __IO uint32_t FFA1R; /*!< CAN filter FIFO assignment register, Address offset: 0x214 */
emilmont 77:869cf507173a 467 uint32_t RESERVED4; /*!< Reserved, 0x218 */
emilmont 77:869cf507173a 468 __IO uint32_t FA1R; /*!< CAN filter activation register, Address offset: 0x21C */
emilmont 77:869cf507173a 469 uint32_t RESERVED5[8]; /*!< Reserved, 0x220-0x23F */
emilmont 77:869cf507173a 470 CAN_FilterRegister_TypeDef sFilterRegister[28]; /*!< CAN Filter Register, Address offset: 0x240-0x31C */
emilmont 77:869cf507173a 471 } CAN_TypeDef;
emilmont 77:869cf507173a 472
emilmont 77:869cf507173a 473 /**
emilmont 77:869cf507173a 474 * @brief HDMI-CEC
emilmont 77:869cf507173a 475 */
emilmont 77:869cf507173a 476
emilmont 77:869cf507173a 477 typedef struct
emilmont 77:869cf507173a 478 {
emilmont 77:869cf507173a 479 __IO uint32_t CR; /*!< CEC control register, Address offset:0x00 */
emilmont 77:869cf507173a 480 __IO uint32_t CFGR; /*!< CEC configuration register, Address offset:0x04 */
emilmont 77:869cf507173a 481 __IO uint32_t TXDR; /*!< CEC Tx data register , Address offset:0x08 */
emilmont 77:869cf507173a 482 __IO uint32_t RXDR; /*!< CEC Rx Data Register, Address offset:0x0C */
emilmont 77:869cf507173a 483 __IO uint32_t ISR; /*!< CEC Interrupt and Status Register, Address offset:0x10 */
emilmont 77:869cf507173a 484 __IO uint32_t IER; /*!< CEC interrupt enable register, Address offset:0x14 */
emilmont 77:869cf507173a 485 }CEC_TypeDef;
emilmont 77:869cf507173a 486
emilmont 77:869cf507173a 487 /**
emilmont 77:869cf507173a 488 * @brief Comparator
emilmont 77:869cf507173a 489 */
emilmont 77:869cf507173a 490
emilmont 77:869cf507173a 491 typedef struct
emilmont 77:869cf507173a 492 {
emilmont 77:869cf507173a 493 __IO uint32_t CSR; /*!< COMP comparator control and status register, Address offset: 0x1C */
emilmont 77:869cf507173a 494 } COMP_TypeDef;
emilmont 77:869cf507173a 495
emilmont 77:869cf507173a 496
emilmont 77:869cf507173a 497 /**
emilmont 77:869cf507173a 498 * @brief CRC calculation unit
emilmont 77:869cf507173a 499 */
emilmont 77:869cf507173a 500
emilmont 77:869cf507173a 501 typedef struct
emilmont 77:869cf507173a 502 {
emilmont 77:869cf507173a 503 __IO uint32_t DR; /*!< CRC Data register, Address offset: 0x00 */
emilmont 77:869cf507173a 504 __IO uint8_t IDR; /*!< CRC Independent data register, Address offset: 0x04 */
emilmont 77:869cf507173a 505 uint8_t RESERVED0; /*!< Reserved, 0x05 */
emilmont 77:869cf507173a 506 uint16_t RESERVED1; /*!< Reserved, 0x06 */
emilmont 77:869cf507173a 507 __IO uint32_t CR; /*!< CRC Control register, Address offset: 0x08 */
emilmont 77:869cf507173a 508 uint32_t RESERVED2; /*!< Reserved, 0x0C */
emilmont 77:869cf507173a 509 __IO uint32_t INIT; /*!< Initial CRC value register, Address offset: 0x10 */
emilmont 77:869cf507173a 510 __IO uint32_t POL; /*!< CRC polynomial register, Address offset: 0x14 */
emilmont 77:869cf507173a 511 } CRC_TypeDef;
emilmont 77:869cf507173a 512
emilmont 77:869cf507173a 513 /**
emilmont 77:869cf507173a 514 * @brief Clock Recovery System
emilmont 77:869cf507173a 515 */
emilmont 77:869cf507173a 516 typedef struct
emilmont 77:869cf507173a 517 {
emilmont 77:869cf507173a 518 __IO uint32_t CR; /*!< CRS ccontrol register, Address offset: 0x00 */
emilmont 77:869cf507173a 519 __IO uint32_t CFGR; /*!< CRS configuration register, Address offset: 0x04 */
emilmont 77:869cf507173a 520 __IO uint32_t ISR; /*!< CRS interrupt and status register, Address offset: 0x08 */
emilmont 77:869cf507173a 521 __IO uint32_t ICR; /*!< CRS interrupt flag clear register, Address offset: 0x0C */
emilmont 77:869cf507173a 522 } CRS_TypeDef;
emilmont 77:869cf507173a 523
emilmont 77:869cf507173a 524 /**
emilmont 77:869cf507173a 525 * @brief Digital to Analog Converter
emilmont 77:869cf507173a 526 */
emilmont 77:869cf507173a 527
emilmont 77:869cf507173a 528 typedef struct
emilmont 77:869cf507173a 529 {
emilmont 77:869cf507173a 530 __IO uint32_t CR; /*!< DAC control register, Address offset: 0x00 */
emilmont 77:869cf507173a 531 __IO uint32_t SWTRIGR; /*!< DAC software trigger register, Address offset: 0x04 */
emilmont 77:869cf507173a 532 __IO uint32_t DHR12R1; /*!< DAC channel1 12-bit right-aligned data holding register, Address offset: 0x08 */
emilmont 77:869cf507173a 533 __IO uint32_t DHR12L1; /*!< DAC channel1 12-bit left aligned data holding register, Address offset: 0x0C */
emilmont 77:869cf507173a 534 __IO uint32_t DHR8R1; /*!< DAC channel1 8-bit right aligned data holding register, Address offset: 0x10 */
emilmont 77:869cf507173a 535 __IO uint32_t DHR12R2; /*!< DAC channel2 12-bit right aligned data holding register, Address offset: 0x14 */
emilmont 77:869cf507173a 536 __IO uint32_t DHR12L2; /*!< DAC channel2 12-bit left aligned data holding register, Address offset: 0x18 */
emilmont 77:869cf507173a 537 __IO uint32_t DHR8R2; /*!< DAC channel2 8-bit right-aligned data holding register, Address offset: 0x1C */
emilmont 77:869cf507173a 538 __IO uint32_t DHR12RD; /*!< Dual DAC 12-bit right-aligned data holding register, Address offset: 0x20 */
emilmont 77:869cf507173a 539 __IO uint32_t DHR12LD; /*!< DUAL DAC 12-bit left aligned data holding register, Address offset: 0x24 */
emilmont 77:869cf507173a 540 __IO uint32_t DHR8RD; /*!< DUAL DAC 8-bit right aligned data holding register, Address offset: 0x28 */
emilmont 77:869cf507173a 541 __IO uint32_t DOR1; /*!< DAC channel1 data output register, Address offset: 0x2C */
emilmont 77:869cf507173a 542 __IO uint32_t DOR2; /*!< DAC channel2 data output register, Address offset: 0x30 */
emilmont 77:869cf507173a 543 __IO uint32_t SR; /*!< DAC status register, Address offset: 0x34 */
emilmont 77:869cf507173a 544 } DAC_TypeDef;
emilmont 77:869cf507173a 545
emilmont 77:869cf507173a 546 /**
emilmont 77:869cf507173a 547 * @brief Debug MCU
emilmont 77:869cf507173a 548 */
emilmont 77:869cf507173a 549
emilmont 77:869cf507173a 550 typedef struct
emilmont 77:869cf507173a 551 {
emilmont 77:869cf507173a 552 __IO uint32_t IDCODE; /*!< MCU device ID code, Address offset: 0x00 */
emilmont 77:869cf507173a 553 __IO uint32_t CR; /*!< Debug MCU configuration register, Address offset: 0x04 */
emilmont 77:869cf507173a 554 __IO uint32_t APB1FZ; /*!< Debug MCU APB1 freeze register, Address offset: 0x08 */
emilmont 77:869cf507173a 555 __IO uint32_t APB2FZ; /*!< Debug MCU APB2 freeze register, Address offset: 0x0C */
emilmont 77:869cf507173a 556 }DBGMCU_TypeDef;
emilmont 77:869cf507173a 557
emilmont 77:869cf507173a 558 /**
emilmont 77:869cf507173a 559 * @brief DMA Controller
emilmont 77:869cf507173a 560 */
emilmont 77:869cf507173a 561
emilmont 77:869cf507173a 562 typedef struct
emilmont 77:869cf507173a 563 {
emilmont 77:869cf507173a 564 __IO uint32_t CCR; /*!< DMA channel x configuration register */
emilmont 77:869cf507173a 565 __IO uint32_t CNDTR; /*!< DMA channel x number of data register */
emilmont 77:869cf507173a 566 __IO uint32_t CPAR; /*!< DMA channel x peripheral address register */
emilmont 77:869cf507173a 567 __IO uint32_t CMAR; /*!< DMA channel x memory address register */
emilmont 77:869cf507173a 568 } DMA_Channel_TypeDef;
emilmont 77:869cf507173a 569
emilmont 77:869cf507173a 570 typedef struct
emilmont 77:869cf507173a 571 {
emilmont 77:869cf507173a 572 __IO uint32_t ISR; /*!< DMA interrupt status register, Address offset: 0x00 */
emilmont 77:869cf507173a 573 __IO uint32_t IFCR; /*!< DMA interrupt flag clear register, Address offset: 0x04 */
emilmont 77:869cf507173a 574 } DMA_TypeDef;
emilmont 77:869cf507173a 575
emilmont 77:869cf507173a 576 /**
emilmont 77:869cf507173a 577 * @brief External Interrupt/Event Controller
emilmont 77:869cf507173a 578 */
emilmont 77:869cf507173a 579
emilmont 77:869cf507173a 580 typedef struct
emilmont 77:869cf507173a 581 {
emilmont 77:869cf507173a 582 __IO uint32_t IMR; /*!<EXTI Interrupt mask register, Address offset: 0x00 */
emilmont 77:869cf507173a 583 __IO uint32_t EMR; /*!<EXTI Event mask register, Address offset: 0x04 */
emilmont 77:869cf507173a 584 __IO uint32_t RTSR; /*!<EXTI Rising trigger selection register , Address offset: 0x08 */
emilmont 77:869cf507173a 585 __IO uint32_t FTSR; /*!<EXTI Falling trigger selection register, Address offset: 0x0C */
emilmont 77:869cf507173a 586 __IO uint32_t SWIER; /*!<EXTI Software interrupt event register, Address offset: 0x10 */
emilmont 77:869cf507173a 587 __IO uint32_t PR; /*!<EXTI Pending register, Address offset: 0x14 */
emilmont 77:869cf507173a 588 }EXTI_TypeDef;
emilmont 77:869cf507173a 589
emilmont 77:869cf507173a 590 /**
emilmont 77:869cf507173a 591 * @brief FLASH Registers
emilmont 77:869cf507173a 592 */
emilmont 77:869cf507173a 593 typedef struct
emilmont 77:869cf507173a 594 {
emilmont 77:869cf507173a 595 __IO uint32_t ACR; /*!<FLASH access control register, Address offset: 0x00 */
emilmont 77:869cf507173a 596 __IO uint32_t KEYR; /*!<FLASH key register, Address offset: 0x04 */
emilmont 77:869cf507173a 597 __IO uint32_t OPTKEYR; /*!<FLASH OPT key register, Address offset: 0x08 */
emilmont 77:869cf507173a 598 __IO uint32_t SR; /*!<FLASH status register, Address offset: 0x0C */
emilmont 77:869cf507173a 599 __IO uint32_t CR; /*!<FLASH control register, Address offset: 0x10 */
emilmont 77:869cf507173a 600 __IO uint32_t AR; /*!<FLASH address register, Address offset: 0x14 */
emilmont 77:869cf507173a 601 __IO uint32_t RESERVED; /*!< Reserved, 0x18 */
emilmont 77:869cf507173a 602 __IO uint32_t OBR; /*!<FLASH option bytes register, Address offset: 0x1C */
emilmont 77:869cf507173a 603 __IO uint32_t WRPR; /*!<FLASH option bytes register, Address offset: 0x20 */
emilmont 77:869cf507173a 604 } FLASH_TypeDef;
emilmont 77:869cf507173a 605
emilmont 77:869cf507173a 606
emilmont 77:869cf507173a 607 /**
emilmont 77:869cf507173a 608 * @brief Option Bytes Registers
emilmont 77:869cf507173a 609 */
emilmont 77:869cf507173a 610 typedef struct
emilmont 77:869cf507173a 611 {
emilmont 77:869cf507173a 612 __IO uint16_t RDP; /*!< FLASH option byte Read protection, Address offset: 0x00 */
emilmont 77:869cf507173a 613 __IO uint16_t USER; /*!< FLASH option byte user options, Address offset: 0x02 */
emilmont 77:869cf507173a 614 __IO uint16_t DATA0; /*!< User data byte 0 (stored in FLASH_OBR[23:16]), Address offset: 0x04 */
emilmont 77:869cf507173a 615 __IO uint16_t DATA1; /*!< User data byte 1 (stored in FLASH_OBR[31:24]), Address offset: 0x06 */
emilmont 77:869cf507173a 616 __IO uint16_t WRP0; /*!< FLASH option byte write protection 0, Address offset: 0x08 */
emilmont 77:869cf507173a 617 __IO uint16_t WRP1; /*!< FLASH option byte write protection 1, Address offset: 0x0A */
emilmont 77:869cf507173a 618 __IO uint16_t WRP2; /*!< FLASH option byte write protection 2, Address offset: 0x0C */
emilmont 77:869cf507173a 619 __IO uint16_t WRP3; /*!< FLASH option byte write protection 3, Address offset: 0x0E */
emilmont 77:869cf507173a 620 } OB_TypeDef;
emilmont 77:869cf507173a 621
emilmont 77:869cf507173a 622
emilmont 77:869cf507173a 623 /**
emilmont 77:869cf507173a 624 * @brief General Purpose IO
emilmont 77:869cf507173a 625 */
emilmont 77:869cf507173a 626
emilmont 77:869cf507173a 627 typedef struct
emilmont 77:869cf507173a 628 {
emilmont 77:869cf507173a 629 __IO uint32_t MODER; /*!< GPIO port mode register, Address offset: 0x00 */
emilmont 77:869cf507173a 630 __IO uint16_t OTYPER; /*!< GPIO port output type register, Address offset: 0x04 */
emilmont 77:869cf507173a 631 uint16_t RESERVED0; /*!< Reserved, 0x06 */
emilmont 77:869cf507173a 632 __IO uint32_t OSPEEDR; /*!< GPIO port output speed register, Address offset: 0x08 */
emilmont 77:869cf507173a 633 __IO uint32_t PUPDR; /*!< GPIO port pull-up/pull-down register, Address offset: 0x0C */
emilmont 77:869cf507173a 634 __IO uint16_t IDR; /*!< GPIO port input data register, Address offset: 0x10 */
emilmont 77:869cf507173a 635 uint16_t RESERVED1; /*!< Reserved, 0x12 */
emilmont 77:869cf507173a 636 __IO uint16_t ODR; /*!< GPIO port output data register, Address offset: 0x14 */
emilmont 77:869cf507173a 637 uint16_t RESERVED2; /*!< Reserved, 0x16 */
emilmont 77:869cf507173a 638 __IO uint32_t BSRR; /*!< GPIO port bit set/reset registerBSRR, Address offset: 0x18 */
emilmont 77:869cf507173a 639 __IO uint32_t LCKR; /*!< GPIO port configuration lock register, Address offset: 0x1C */
emilmont 77:869cf507173a 640 __IO uint32_t AFR[2]; /*!< GPIO alternate function low register, Address offset: 0x20-0x24 */
emilmont 77:869cf507173a 641 __IO uint16_t BRR; /*!< GPIO bit reset register, Address offset: 0x28 */
emilmont 77:869cf507173a 642 uint16_t RESERVED3; /*!< Reserved, 0x2A */
emilmont 77:869cf507173a 643 }GPIO_TypeDef;
emilmont 77:869cf507173a 644
emilmont 77:869cf507173a 645 /**
emilmont 77:869cf507173a 646 * @brief SysTem Configuration
emilmont 77:869cf507173a 647 */
emilmont 77:869cf507173a 648
emilmont 77:869cf507173a 649 typedef struct
emilmont 77:869cf507173a 650 {
emilmont 77:869cf507173a 651 __IO uint32_t CFGR1; /*!< SYSCFG configuration register 1, Address offset: 0x00 */
emilmont 77:869cf507173a 652 uint32_t RESERVED; /*!< Reserved, 0x04 */
emilmont 77:869cf507173a 653 __IO uint32_t EXTICR[4]; /*!< SYSCFG external interrupt configuration register, Address offset: 0x14-0x08 */
emilmont 77:869cf507173a 654 __IO uint32_t CFGR2; /*!< SYSCFG configuration register 2, Address offset: 0x18 */
emilmont 77:869cf507173a 655 } SYSCFG_TypeDef;
emilmont 77:869cf507173a 656
emilmont 77:869cf507173a 657 /**
emilmont 77:869cf507173a 658 * @brief Inter-integrated Circuit Interface
emilmont 77:869cf507173a 659 */
emilmont 77:869cf507173a 660
emilmont 77:869cf507173a 661 typedef struct
emilmont 77:869cf507173a 662 {
emilmont 77:869cf507173a 663 __IO uint32_t CR1; /*!< I2C Control register 1, Address offset: 0x00 */
emilmont 77:869cf507173a 664 __IO uint32_t CR2; /*!< I2C Control register 2, Address offset: 0x04 */
emilmont 77:869cf507173a 665 __IO uint32_t OAR1; /*!< I2C Own address 1 register, Address offset: 0x08 */
emilmont 77:869cf507173a 666 __IO uint32_t OAR2; /*!< I2C Own address 2 register, Address offset: 0x0C */
emilmont 77:869cf507173a 667 __IO uint32_t TIMINGR; /*!< I2C Timing register, Address offset: 0x10 */
emilmont 77:869cf507173a 668 __IO uint32_t TIMEOUTR; /*!< I2C Timeout register, Address offset: 0x14 */
emilmont 77:869cf507173a 669 __IO uint32_t ISR; /*!< I2C Interrupt and status register, Address offset: 0x18 */
emilmont 77:869cf507173a 670 __IO uint32_t ICR; /*!< I2C Interrupt clear register, Address offset: 0x1C */
emilmont 77:869cf507173a 671 __IO uint32_t PECR; /*!< I2C PEC register, Address offset: 0x20 */
emilmont 77:869cf507173a 672 __IO uint32_t RXDR; /*!< I2C Receive data register, Address offset: 0x24 */
emilmont 77:869cf507173a 673 __IO uint32_t TXDR; /*!< I2C Transmit data register, Address offset: 0x28 */
emilmont 77:869cf507173a 674 }I2C_TypeDef;
emilmont 77:869cf507173a 675
emilmont 77:869cf507173a 676
emilmont 77:869cf507173a 677 /**
emilmont 77:869cf507173a 678 * @brief Independent WATCHDOG
emilmont 77:869cf507173a 679 */
emilmont 77:869cf507173a 680 typedef struct
emilmont 77:869cf507173a 681 {
emilmont 77:869cf507173a 682 __IO uint32_t KR; /*!< IWDG Key register, Address offset: 0x00 */
emilmont 77:869cf507173a 683 __IO uint32_t PR; /*!< IWDG Prescaler register, Address offset: 0x04 */
emilmont 77:869cf507173a 684 __IO uint32_t RLR; /*!< IWDG Reload register, Address offset: 0x08 */
emilmont 77:869cf507173a 685 __IO uint32_t SR; /*!< IWDG Status register, Address offset: 0x0C */
emilmont 77:869cf507173a 686 __IO uint32_t WINR; /*!< IWDG Window register, Address offset: 0x10 */
emilmont 77:869cf507173a 687 } IWDG_TypeDef;
emilmont 77:869cf507173a 688
emilmont 77:869cf507173a 689 /**
emilmont 77:869cf507173a 690 * @brief Power Control
emilmont 77:869cf507173a 691 */
emilmont 77:869cf507173a 692
emilmont 77:869cf507173a 693 typedef struct
emilmont 77:869cf507173a 694 {
emilmont 77:869cf507173a 695 __IO uint32_t CR; /*!< PWR power control register, Address offset: 0x00 */
emilmont 77:869cf507173a 696 __IO uint32_t CSR; /*!< PWR power control/status register, Address offset: 0x04 */
emilmont 77:869cf507173a 697 } PWR_TypeDef;
emilmont 77:869cf507173a 698
emilmont 77:869cf507173a 699
emilmont 77:869cf507173a 700 /**
emilmont 77:869cf507173a 701 * @brief Reset and Clock Control
emilmont 77:869cf507173a 702 */
emilmont 77:869cf507173a 703 typedef struct
emilmont 77:869cf507173a 704 {
emilmont 77:869cf507173a 705 __IO uint32_t CR; /*!< RCC clock control register, Address offset: 0x00 */
emilmont 77:869cf507173a 706 __IO uint32_t CFGR; /*!< RCC clock configuration register, Address offset: 0x04 */
emilmont 77:869cf507173a 707 __IO uint32_t CIR; /*!< RCC clock interrupt register, Address offset: 0x08 */
emilmont 77:869cf507173a 708 __IO uint32_t APB2RSTR; /*!< RCC APB2 peripheral reset register, Address offset: 0x0C */
emilmont 77:869cf507173a 709 __IO uint32_t APB1RSTR; /*!< RCC APB1 peripheral reset register, Address offset: 0x10 */
emilmont 77:869cf507173a 710 __IO uint32_t AHBENR; /*!< RCC AHB peripheral clock register, Address offset: 0x14 */
emilmont 77:869cf507173a 711 __IO uint32_t APB2ENR; /*!< RCC APB2 peripheral clock enable register, Address offset: 0x18 */
emilmont 77:869cf507173a 712 __IO uint32_t APB1ENR; /*!< RCC APB1 peripheral clock enable register, Address offset: 0x1C */
emilmont 77:869cf507173a 713 __IO uint32_t BDCR; /*!< RCC Backup domain control register, Address offset: 0x20 */
emilmont 77:869cf507173a 714 __IO uint32_t CSR; /*!< RCC clock control & status register, Address offset: 0x24 */
emilmont 77:869cf507173a 715 __IO uint32_t AHBRSTR; /*!< RCC AHB peripheral reset register, Address offset: 0x28 */
emilmont 77:869cf507173a 716 __IO uint32_t CFGR2; /*!< RCC clock configuration register 2, Address offset: 0x2C */
emilmont 77:869cf507173a 717 __IO uint32_t CFGR3; /*!< RCC clock configuration register 3, Address offset: 0x30 */
emilmont 77:869cf507173a 718 __IO uint32_t CR2; /*!< RCC clock control register 2, Address offset: 0x34 */
emilmont 77:869cf507173a 719 } RCC_TypeDef;
emilmont 77:869cf507173a 720
emilmont 77:869cf507173a 721 /**
emilmont 77:869cf507173a 722 * @brief Real-Time Clock
emilmont 77:869cf507173a 723 */
emilmont 77:869cf507173a 724
emilmont 77:869cf507173a 725 typedef struct
emilmont 77:869cf507173a 726 {
emilmont 77:869cf507173a 727 __IO uint32_t TR; /*!< RTC time register, Address offset: 0x00 */
emilmont 77:869cf507173a 728 __IO uint32_t DR; /*!< RTC date register, Address offset: 0x04 */
emilmont 77:869cf507173a 729 __IO uint32_t CR; /*!< RTC control register, Address offset: 0x08 */
emilmont 77:869cf507173a 730 __IO uint32_t ISR; /*!< RTC initialization and status register, Address offset: 0x0C */
emilmont 77:869cf507173a 731 __IO uint32_t PRER; /*!< RTC prescaler register, Address offset: 0x10 */
emilmont 77:869cf507173a 732 __IO uint32_t WUTR; /*!< RTC wakeup timer register,(only for STM32F072 devices) Address offset: 0x14 */
emilmont 77:869cf507173a 733 uint32_t RESERVED1; /*!< Reserved, Address offset: 0x18 */
emilmont 77:869cf507173a 734 __IO uint32_t ALRMAR; /*!< RTC alarm A register, Address offset: 0x1C */
emilmont 77:869cf507173a 735 uint32_t RESERVED2; /*!< Reserved, Address offset: 0x20 */
emilmont 77:869cf507173a 736 __IO uint32_t WPR; /*!< RTC write protection register, Address offset: 0x24 */
emilmont 77:869cf507173a 737 __IO uint32_t SSR; /*!< RTC sub second register, Address offset: 0x28 */
emilmont 77:869cf507173a 738 __IO uint32_t SHIFTR; /*!< RTC shift control register, Address offset: 0x2C */
emilmont 77:869cf507173a 739 __IO uint32_t TSTR; /*!< RTC time stamp time register, Address offset: 0x30 */
emilmont 77:869cf507173a 740 __IO uint32_t TSDR; /*!< RTC time stamp date register, Address offset: 0x34 */
emilmont 77:869cf507173a 741 __IO uint32_t TSSSR; /*!< RTC time-stamp sub second register, Address offset: 0x38 */
emilmont 77:869cf507173a 742 __IO uint32_t CALR; /*!< RTC calibration register, Address offset: 0x3C */
emilmont 77:869cf507173a 743 __IO uint32_t TAFCR; /*!< RTC tamper and alternate function configuration register, Address offset: 0x40 */
emilmont 77:869cf507173a 744 __IO uint32_t ALRMASSR; /*!< RTC alarm A sub second register, Address offset: 0x44 */
emilmont 77:869cf507173a 745 uint32_t RESERVED3; /*!< Reserved, Address offset: 0x48 */
emilmont 77:869cf507173a 746 uint32_t RESERVED4; /*!< Reserved, Address offset: 0x4C */
emilmont 77:869cf507173a 747 __IO uint32_t BKP0R; /*!< RTC backup register 0, Address offset: 0x50 */
emilmont 77:869cf507173a 748 __IO uint32_t BKP1R; /*!< RTC backup register 1, Address offset: 0x54 */
emilmont 77:869cf507173a 749 __IO uint32_t BKP2R; /*!< RTC backup register 2, Address offset: 0x58 */
emilmont 77:869cf507173a 750 __IO uint32_t BKP3R; /*!< RTC backup register 3, Address offset: 0x5C */
emilmont 77:869cf507173a 751 __IO uint32_t BKP4R; /*!< RTC backup register 4, Address offset: 0x60 */
emilmont 77:869cf507173a 752 } RTC_TypeDef;
emilmont 77:869cf507173a 753
emilmont 77:869cf507173a 754 /* Old register name definition maintained for legacy purpose */
emilmont 77:869cf507173a 755 #define CAL CALR
emilmont 77:869cf507173a 756
emilmont 77:869cf507173a 757 /**
emilmont 77:869cf507173a 758 * @brief Serial Peripheral Interface
emilmont 77:869cf507173a 759 */
emilmont 77:869cf507173a 760
emilmont 77:869cf507173a 761 typedef struct
emilmont 77:869cf507173a 762 {
emilmont 77:869cf507173a 763 __IO uint16_t CR1; /*!< SPI Control register 1 (not used in I2S mode), Address offset: 0x00 */
emilmont 77:869cf507173a 764 uint16_t RESERVED0; /*!< Reserved, 0x02 */
emilmont 77:869cf507173a 765 __IO uint16_t CR2; /*!< SPI Control register 2, Address offset: 0x04 */
emilmont 77:869cf507173a 766 uint16_t RESERVED1; /*!< Reserved, 0x06 */
emilmont 77:869cf507173a 767 __IO uint16_t SR; /*!< SPI Status register, Address offset: 0x08 */
emilmont 77:869cf507173a 768 uint16_t RESERVED2; /*!< Reserved, 0x0A */
emilmont 77:869cf507173a 769 __IO uint16_t DR; /*!< SPI data register, Address offset: 0x0C */
emilmont 77:869cf507173a 770 uint16_t RESERVED3; /*!< Reserved, 0x0E */
emilmont 77:869cf507173a 771 __IO uint16_t CRCPR; /*!< SPI CRC polynomial register (not used in I2S mode), Address offset: 0x10 */
emilmont 77:869cf507173a 772 uint16_t RESERVED4; /*!< Reserved, 0x12 */
emilmont 77:869cf507173a 773 __IO uint16_t RXCRCR; /*!< SPI Rx CRC register (not used in I2S mode), Address offset: 0x14 */
emilmont 77:869cf507173a 774 uint16_t RESERVED5; /*!< Reserved, 0x16 */
emilmont 77:869cf507173a 775 __IO uint16_t TXCRCR; /*!< SPI Tx CRC register (not used in I2S mode), Address offset: 0x18 */
emilmont 77:869cf507173a 776 uint16_t RESERVED6; /*!< Reserved, 0x1A */
emilmont 77:869cf507173a 777 __IO uint16_t I2SCFGR; /*!< SPI_I2S configuration register, Address offset: 0x1C */
emilmont 77:869cf507173a 778 uint16_t RESERVED7; /*!< Reserved, 0x1E */
emilmont 77:869cf507173a 779 __IO uint16_t I2SPR; /*!< SPI_I2S prescaler register, Address offset: 0x20 */
emilmont 77:869cf507173a 780 uint16_t RESERVED8; /*!< Reserved, 0x22 */
emilmont 77:869cf507173a 781 } SPI_TypeDef;
emilmont 77:869cf507173a 782
emilmont 77:869cf507173a 783
emilmont 77:869cf507173a 784 /**
emilmont 77:869cf507173a 785 * @brief TIM
emilmont 77:869cf507173a 786 */
emilmont 77:869cf507173a 787 typedef struct
emilmont 77:869cf507173a 788 {
emilmont 77:869cf507173a 789 __IO uint16_t CR1; /*!< TIM control register 1, Address offset: 0x00 */
emilmont 77:869cf507173a 790 uint16_t RESERVED0; /*!< Reserved, 0x02 */
emilmont 77:869cf507173a 791 __IO uint16_t CR2; /*!< TIM control register 2, Address offset: 0x04 */
emilmont 77:869cf507173a 792 uint16_t RESERVED1; /*!< Reserved, 0x06 */
emilmont 77:869cf507173a 793 __IO uint16_t SMCR; /*!< TIM slave Mode Control register, Address offset: 0x08 */
emilmont 77:869cf507173a 794 uint16_t RESERVED2; /*!< Reserved, 0x0A */
emilmont 77:869cf507173a 795 __IO uint16_t DIER; /*!< TIM DMA/interrupt enable register, Address offset: 0x0C */
emilmont 77:869cf507173a 796 uint16_t RESERVED3; /*!< Reserved, 0x0E */
emilmont 77:869cf507173a 797 __IO uint16_t SR; /*!< TIM status register, Address offset: 0x10 */
emilmont 77:869cf507173a 798 uint16_t RESERVED4; /*!< Reserved, 0x12 */
emilmont 77:869cf507173a 799 __IO uint16_t EGR; /*!< TIM event generation register, Address offset: 0x14 */
emilmont 77:869cf507173a 800 uint16_t RESERVED5; /*!< Reserved, 0x16 */
emilmont 77:869cf507173a 801 __IO uint16_t CCMR1; /*!< TIM capture/compare mode register 1, Address offset: 0x18 */
emilmont 77:869cf507173a 802 uint16_t RESERVED6; /*!< Reserved, 0x1A */
emilmont 77:869cf507173a 803 __IO uint16_t CCMR2; /*!< TIM capture/compare mode register 2, Address offset: 0x1C */
emilmont 77:869cf507173a 804 uint16_t RESERVED7; /*!< Reserved, 0x1E */
emilmont 77:869cf507173a 805 __IO uint16_t CCER; /*!< TIM capture/compare enable register, Address offset: 0x20 */
emilmont 77:869cf507173a 806 uint16_t RESERVED8; /*!< Reserved, 0x22 */
emilmont 77:869cf507173a 807 __IO uint32_t CNT; /*!< TIM counter register, Address offset: 0x24 */
emilmont 77:869cf507173a 808 __IO uint16_t PSC; /*!< TIM prescaler register, Address offset: 0x28 */
emilmont 77:869cf507173a 809 uint16_t RESERVED10; /*!< Reserved, 0x2A */
emilmont 77:869cf507173a 810 __IO uint32_t ARR; /*!< TIM auto-reload register, Address offset: 0x2C */
emilmont 77:869cf507173a 811 __IO uint16_t RCR; /*!< TIM repetition counter register, Address offset: 0x30 */
emilmont 77:869cf507173a 812 uint16_t RESERVED12; /*!< Reserved, 0x32 */
emilmont 77:869cf507173a 813 __IO uint32_t CCR1; /*!< TIM capture/compare register 1, Address offset: 0x34 */
emilmont 77:869cf507173a 814 __IO uint32_t CCR2; /*!< TIM capture/compare register 2, Address offset: 0x38 */
emilmont 77:869cf507173a 815 __IO uint32_t CCR3; /*!< TIM capture/compare register 3, Address offset: 0x3C */
emilmont 77:869cf507173a 816 __IO uint32_t CCR4; /*!< TIM capture/compare register 4, Address offset: 0x40 */
emilmont 77:869cf507173a 817 __IO uint16_t BDTR; /*!< TIM break and dead-time register, Address offset: 0x44 */
emilmont 77:869cf507173a 818 uint16_t RESERVED17; /*!< Reserved, 0x26 */
emilmont 77:869cf507173a 819 __IO uint16_t DCR; /*!< TIM DMA control register, Address offset: 0x48 */
emilmont 77:869cf507173a 820 uint16_t RESERVED18; /*!< Reserved, 0x4A */
emilmont 77:869cf507173a 821 __IO uint16_t DMAR; /*!< TIM DMA address for full transfer register, Address offset: 0x4C */
emilmont 77:869cf507173a 822 uint16_t RESERVED19; /*!< Reserved, 0x4E */
emilmont 77:869cf507173a 823 __IO uint16_t OR; /*!< TIM option register, Address offset: 0x50 */
emilmont 77:869cf507173a 824 uint16_t RESERVED20; /*!< Reserved, 0x52 */
emilmont 77:869cf507173a 825 } TIM_TypeDef;
emilmont 77:869cf507173a 826
emilmont 77:869cf507173a 827 /**
emilmont 77:869cf507173a 828 * @brief Touch Sensing Controller (TSC)
emilmont 77:869cf507173a 829 */
emilmont 77:869cf507173a 830 typedef struct
emilmont 77:869cf507173a 831 {
emilmont 77:869cf507173a 832 __IO uint32_t CR; /*!< TSC control register, Address offset: 0x00 */
emilmont 77:869cf507173a 833 __IO uint32_t IER; /*!< TSC interrupt enable register, Address offset: 0x04 */
emilmont 77:869cf507173a 834 __IO uint32_t ICR; /*!< TSC interrupt clear register, Address offset: 0x08 */
emilmont 77:869cf507173a 835 __IO uint32_t ISR; /*!< TSC interrupt status register, Address offset: 0x0C */
emilmont 77:869cf507173a 836 __IO uint32_t IOHCR; /*!< TSC I/O hysteresis control register, Address offset: 0x10 */
emilmont 77:869cf507173a 837 __IO uint32_t RESERVED1; /*!< Reserved, Address offset: 0x14 */
emilmont 77:869cf507173a 838 __IO uint32_t IOASCR; /*!< TSC I/O analog switch control register, Address offset: 0x18 */
emilmont 77:869cf507173a 839 __IO uint32_t RESERVED2; /*!< Reserved, Address offset: 0x1C */
emilmont 77:869cf507173a 840 __IO uint32_t IOSCR; /*!< TSC I/O sampling control register, Address offset: 0x20 */
emilmont 77:869cf507173a 841 __IO uint32_t RESERVED3; /*!< Reserved, Address offset: 0x24 */
emilmont 77:869cf507173a 842 __IO uint32_t IOCCR; /*!< TSC I/O channel control register, Address offset: 0x28 */
emilmont 77:869cf507173a 843 __IO uint32_t RESERVED4; /*!< Reserved, Address offset: 0x2C */
emilmont 77:869cf507173a 844 __IO uint32_t IOGCSR; /*!< TSC I/O group control status register, Address offset: 0x30 */
emilmont 77:869cf507173a 845 __IO uint32_t IOGXCR[8]; /*!< TSC I/O group x counter register, Address offset: 0x34-50 */
emilmont 77:869cf507173a 846 } TSC_TypeDef;
emilmont 77:869cf507173a 847
emilmont 77:869cf507173a 848 /**
emilmont 77:869cf507173a 849 * @brief Universal Synchronous Asynchronous Receiver Transmitter
emilmont 77:869cf507173a 850 */
emilmont 77:869cf507173a 851
emilmont 77:869cf507173a 852 typedef struct
emilmont 77:869cf507173a 853 {
emilmont 77:869cf507173a 854 __IO uint32_t CR1; /*!< USART Control register 1, Address offset: 0x00 */
emilmont 77:869cf507173a 855 __IO uint32_t CR2; /*!< USART Control register 2, Address offset: 0x04 */
emilmont 77:869cf507173a 856 __IO uint32_t CR3; /*!< USART Control register 3, Address offset: 0x08 */
emilmont 77:869cf507173a 857 __IO uint16_t BRR; /*!< USART Baud rate register, Address offset: 0x0C */
emilmont 77:869cf507173a 858 uint16_t RESERVED1; /*!< Reserved, 0x0E */
emilmont 77:869cf507173a 859 __IO uint16_t GTPR; /*!< USART Guard time and prescaler register, Address offset: 0x10 */
emilmont 77:869cf507173a 860 uint16_t RESERVED2; /*!< Reserved, 0x12 */
emilmont 77:869cf507173a 861 __IO uint32_t RTOR; /*!< USART Receiver Time Out register, Address offset: 0x14 */
emilmont 77:869cf507173a 862 __IO uint16_t RQR; /*!< USART Request register, Address offset: 0x18 */
emilmont 77:869cf507173a 863 uint16_t RESERVED3; /*!< Reserved, 0x1A */
emilmont 77:869cf507173a 864 __IO uint32_t ISR; /*!< USART Interrupt and status register, Address offset: 0x1C */
emilmont 77:869cf507173a 865 __IO uint32_t ICR; /*!< USART Interrupt flag Clear register, Address offset: 0x20 */
emilmont 77:869cf507173a 866 __IO uint16_t RDR; /*!< USART Receive Data register, Address offset: 0x24 */
emilmont 77:869cf507173a 867 uint16_t RESERVED4; /*!< Reserved, 0x26 */
emilmont 77:869cf507173a 868 __IO uint16_t TDR; /*!< USART Transmit Data register, Address offset: 0x28 */
emilmont 77:869cf507173a 869 uint16_t RESERVED5; /*!< Reserved, 0x2A */
emilmont 77:869cf507173a 870 } USART_TypeDef;
emilmont 77:869cf507173a 871
emilmont 77:869cf507173a 872
emilmont 77:869cf507173a 873 /**
emilmont 77:869cf507173a 874 * @brief Window WATCHDOG
emilmont 77:869cf507173a 875 */
emilmont 77:869cf507173a 876 typedef struct
emilmont 77:869cf507173a 877 {
emilmont 77:869cf507173a 878 __IO uint32_t CR; /*!< WWDG Control register, Address offset: 0x00 */
emilmont 77:869cf507173a 879 __IO uint32_t CFR; /*!< WWDG Configuration register, Address offset: 0x04 */
emilmont 77:869cf507173a 880 __IO uint32_t SR; /*!< WWDG Status register, Address offset: 0x08 */
emilmont 77:869cf507173a 881 } WWDG_TypeDef;
emilmont 77:869cf507173a 882
emilmont 77:869cf507173a 883
emilmont 77:869cf507173a 884 /**
emilmont 77:869cf507173a 885 * @}
emilmont 77:869cf507173a 886 */
emilmont 77:869cf507173a 887
emilmont 77:869cf507173a 888 /** @addtogroup Peripheral_memory_map
emilmont 77:869cf507173a 889 * @{
emilmont 77:869cf507173a 890 */
emilmont 77:869cf507173a 891
emilmont 77:869cf507173a 892 #define FLASH_BASE ((uint32_t)0x08000000) /*!< FLASH base address in the alias region */
emilmont 77:869cf507173a 893 #define SRAM_BASE ((uint32_t)0x20000000) /*!< SRAM base address in the alias region */
emilmont 77:869cf507173a 894 #define PERIPH_BASE ((uint32_t)0x40000000) /*!< Peripheral base address in the alias region */
emilmont 77:869cf507173a 895
emilmont 77:869cf507173a 896 /*!< Peripheral memory map */
emilmont 77:869cf507173a 897 #define APBPERIPH_BASE PERIPH_BASE
emilmont 77:869cf507173a 898 #define AHBPERIPH_BASE (PERIPH_BASE + 0x00020000)
emilmont 77:869cf507173a 899 #define AHB2PERIPH_BASE (PERIPH_BASE + 0x08000000)
emilmont 77:869cf507173a 900
emilmont 77:869cf507173a 901 #define TIM2_BASE (APBPERIPH_BASE + 0x00000000)
emilmont 77:869cf507173a 902 #define TIM3_BASE (APBPERIPH_BASE + 0x00000400)
emilmont 77:869cf507173a 903 #define TIM6_BASE (APBPERIPH_BASE + 0x00001000)
emilmont 77:869cf507173a 904 #define TIM7_BASE (APBPERIPH_BASE + 0x00001400)
emilmont 77:869cf507173a 905 #define TIM14_BASE (APBPERIPH_BASE + 0x00002000)
emilmont 77:869cf507173a 906 #define RTC_BASE (APBPERIPH_BASE + 0x00002800)
emilmont 77:869cf507173a 907 #define WWDG_BASE (APBPERIPH_BASE + 0x00002C00)
emilmont 77:869cf507173a 908 #define IWDG_BASE (APBPERIPH_BASE + 0x00003000)
emilmont 77:869cf507173a 909 #define SPI2_BASE (APBPERIPH_BASE + 0x00003800)
emilmont 77:869cf507173a 910 #define USART2_BASE (APBPERIPH_BASE + 0x00004400)
emilmont 77:869cf507173a 911 #define USART3_BASE (APBPERIPH_BASE + 0x00004800)
emilmont 77:869cf507173a 912 #define USART4_BASE (APBPERIPH_BASE + 0x00004C00)
emilmont 77:869cf507173a 913 #define I2C1_BASE (APBPERIPH_BASE + 0x00005400)
emilmont 77:869cf507173a 914 #define I2C2_BASE (APBPERIPH_BASE + 0x00005800)
emilmont 77:869cf507173a 915 #define CAN_BASE (APBPERIPH_BASE + 0x00006400)
emilmont 77:869cf507173a 916 #define CRS_BASE (APBPERIPH_BASE + 0x00006C00)
emilmont 77:869cf507173a 917 #define PWR_BASE (APBPERIPH_BASE + 0x00007000)
emilmont 77:869cf507173a 918 #define DAC_BASE (APBPERIPH_BASE + 0x00007400)
emilmont 77:869cf507173a 919 #define CEC_BASE (APBPERIPH_BASE + 0x00007800)
emilmont 77:869cf507173a 920
emilmont 77:869cf507173a 921 #define SYSCFG_BASE (APBPERIPH_BASE + 0x00010000)
emilmont 77:869cf507173a 922 #define COMP_BASE (APBPERIPH_BASE + 0x0001001C)
emilmont 77:869cf507173a 923 #define EXTI_BASE (APBPERIPH_BASE + 0x00010400)
emilmont 77:869cf507173a 924 #define ADC1_BASE (APBPERIPH_BASE + 0x00012400)
emilmont 77:869cf507173a 925 #define ADC_BASE (APBPERIPH_BASE + 0x00012708)
emilmont 77:869cf507173a 926 #define TIM1_BASE (APBPERIPH_BASE + 0x00012C00)
emilmont 77:869cf507173a 927 #define SPI1_BASE (APBPERIPH_BASE + 0x00013000)
emilmont 77:869cf507173a 928 #define USART1_BASE (APBPERIPH_BASE + 0x00013800)
emilmont 77:869cf507173a 929 #define TIM15_BASE (APBPERIPH_BASE + 0x00014000)
emilmont 77:869cf507173a 930 #define TIM16_BASE (APBPERIPH_BASE + 0x00014400)
emilmont 77:869cf507173a 931 #define TIM17_BASE (APBPERIPH_BASE + 0x00014800)
emilmont 77:869cf507173a 932 #define DBGMCU_BASE (APBPERIPH_BASE + 0x00015800)
emilmont 77:869cf507173a 933
emilmont 77:869cf507173a 934 #define DMA1_BASE (AHBPERIPH_BASE + 0x00000000)
emilmont 77:869cf507173a 935 #define DMA1_Channel1_BASE (DMA1_BASE + 0x00000008)
emilmont 77:869cf507173a 936 #define DMA1_Channel2_BASE (DMA1_BASE + 0x0000001C)
emilmont 77:869cf507173a 937 #define DMA1_Channel3_BASE (DMA1_BASE + 0x00000030)
emilmont 77:869cf507173a 938 #define DMA1_Channel4_BASE (DMA1_BASE + 0x00000044)
emilmont 77:869cf507173a 939 #define DMA1_Channel5_BASE (DMA1_BASE + 0x00000058)
emilmont 77:869cf507173a 940 #define DMA1_Channel6_BASE (DMA1_BASE + 0x0000006C)
emilmont 77:869cf507173a 941 #define DMA1_Channel7_BASE (DMA1_BASE + 0x00000080)
emilmont 77:869cf507173a 942
emilmont 77:869cf507173a 943 #define RCC_BASE (AHBPERIPH_BASE + 0x00001000)
emilmont 77:869cf507173a 944 #define FLASH_R_BASE (AHBPERIPH_BASE + 0x00002000) /*!< FLASH registers base address */
emilmont 77:869cf507173a 945 #define OB_BASE ((uint32_t)0x1FFFF800) /*!< FLASH Option Bytes base address */
emilmont 77:869cf507173a 946 #define CRC_BASE (AHBPERIPH_BASE + 0x00003000)
emilmont 77:869cf507173a 947 #define TSC_BASE (AHBPERIPH_BASE + 0x00004000)
emilmont 77:869cf507173a 948
emilmont 77:869cf507173a 949 #define GPIOA_BASE (AHB2PERIPH_BASE + 0x00000000)
emilmont 77:869cf507173a 950 #define GPIOB_BASE (AHB2PERIPH_BASE + 0x00000400)
emilmont 77:869cf507173a 951 #define GPIOC_BASE (AHB2PERIPH_BASE + 0x00000800)
emilmont 77:869cf507173a 952 #define GPIOD_BASE (AHB2PERIPH_BASE + 0x00000C00)
emilmont 77:869cf507173a 953 #define GPIOE_BASE (AHB2PERIPH_BASE + 0x00001000)
emilmont 77:869cf507173a 954 #define GPIOF_BASE (AHB2PERIPH_BASE + 0x00001400)
emilmont 77:869cf507173a 955
emilmont 77:869cf507173a 956 /**
emilmont 77:869cf507173a 957 * @}
emilmont 77:869cf507173a 958 */
emilmont 77:869cf507173a 959
emilmont 77:869cf507173a 960 /** @addtogroup Peripheral_declaration
emilmont 77:869cf507173a 961 * @{
emilmont 77:869cf507173a 962 */
emilmont 77:869cf507173a 963
emilmont 77:869cf507173a 964 #define TIM2 ((TIM_TypeDef *) TIM2_BASE)
emilmont 77:869cf507173a 965 #define TIM3 ((TIM_TypeDef *) TIM3_BASE)
emilmont 77:869cf507173a 966 #define TIM6 ((TIM_TypeDef *) TIM6_BASE)
emilmont 77:869cf507173a 967 #define TIM7 ((TIM_TypeDef *) TIM7_BASE)
emilmont 77:869cf507173a 968 #define TIM14 ((TIM_TypeDef *) TIM14_BASE)
emilmont 77:869cf507173a 969 #define RTC ((RTC_TypeDef *) RTC_BASE)
emilmont 77:869cf507173a 970 #define WWDG ((WWDG_TypeDef *) WWDG_BASE)
emilmont 77:869cf507173a 971 #define IWDG ((IWDG_TypeDef *) IWDG_BASE)
emilmont 77:869cf507173a 972 #define SPI2 ((SPI_TypeDef *) SPI2_BASE)
emilmont 77:869cf507173a 973 #define USART2 ((USART_TypeDef *) USART2_BASE)
emilmont 77:869cf507173a 974 #define USART3 ((USART_TypeDef *) USART3_BASE)
emilmont 77:869cf507173a 975 #define USART4 ((USART_TypeDef *) USART4_BASE)
emilmont 77:869cf507173a 976 #define I2C1 ((I2C_TypeDef *) I2C1_BASE)
emilmont 77:869cf507173a 977 #define I2C2 ((I2C_TypeDef *) I2C2_BASE)
emilmont 77:869cf507173a 978 #define CAN ((CAN_TypeDef *) CAN_BASE)
emilmont 77:869cf507173a 979 #define CRS ((CRS_TypeDef *) CRS_BASE)
emilmont 77:869cf507173a 980 #define PWR ((PWR_TypeDef *) PWR_BASE)
emilmont 77:869cf507173a 981 #define DAC ((DAC_TypeDef *) DAC_BASE)
emilmont 77:869cf507173a 982 #define CEC ((CEC_TypeDef *) CEC_BASE)
emilmont 77:869cf507173a 983
emilmont 77:869cf507173a 984 #define SYSCFG ((SYSCFG_TypeDef *) SYSCFG_BASE)
emilmont 77:869cf507173a 985 #define COMP ((COMP_TypeDef *) COMP_BASE)
emilmont 77:869cf507173a 986 #define EXTI ((EXTI_TypeDef *) EXTI_BASE)
emilmont 77:869cf507173a 987 #define ADC1 ((ADC_TypeDef *) ADC1_BASE)
emilmont 77:869cf507173a 988 #define ADC ((ADC_Common_TypeDef *) ADC_BASE)
emilmont 77:869cf507173a 989 #define TIM1 ((TIM_TypeDef *) TIM1_BASE)
emilmont 77:869cf507173a 990 #define SPI1 ((SPI_TypeDef *) SPI1_BASE)
emilmont 77:869cf507173a 991 #define USART1 ((USART_TypeDef *) USART1_BASE)
emilmont 77:869cf507173a 992 #define TIM15 ((TIM_TypeDef *) TIM15_BASE)
emilmont 77:869cf507173a 993 #define TIM16 ((TIM_TypeDef *) TIM16_BASE)
emilmont 77:869cf507173a 994 #define TIM17 ((TIM_TypeDef *) TIM17_BASE)
emilmont 77:869cf507173a 995 #define DBGMCU ((DBGMCU_TypeDef *) DBGMCU_BASE)
emilmont 77:869cf507173a 996
emilmont 77:869cf507173a 997 #define DMA1 ((DMA_TypeDef *) DMA1_BASE)
emilmont 77:869cf507173a 998 #define DMA1_Channel1 ((DMA_Channel_TypeDef *) DMA1_Channel1_BASE)
emilmont 77:869cf507173a 999 #define DMA1_Channel2 ((DMA_Channel_TypeDef *) DMA1_Channel2_BASE)
emilmont 77:869cf507173a 1000 #define DMA1_Channel3 ((DMA_Channel_TypeDef *) DMA1_Channel3_BASE)
emilmont 77:869cf507173a 1001 #define DMA1_Channel4 ((DMA_Channel_TypeDef *) DMA1_Channel4_BASE)
emilmont 77:869cf507173a 1002 #define DMA1_Channel5 ((DMA_Channel_TypeDef *) DMA1_Channel5_BASE)
emilmont 77:869cf507173a 1003 #define DMA1_Channel6 ((DMA_Channel_TypeDef *) DMA1_Channel6_BASE)
emilmont 77:869cf507173a 1004 #define DMA1_Channel7 ((DMA_Channel_TypeDef *) DMA1_Channel7_BASE)
emilmont 77:869cf507173a 1005 #define FLASH ((FLASH_TypeDef *) FLASH_R_BASE)
emilmont 77:869cf507173a 1006 #define OB ((OB_TypeDef *) OB_BASE)
emilmont 77:869cf507173a 1007 #define RCC ((RCC_TypeDef *) RCC_BASE)
emilmont 77:869cf507173a 1008 #define CRC ((CRC_TypeDef *) CRC_BASE)
emilmont 77:869cf507173a 1009 #define TSC ((TSC_TypeDef *) TSC_BASE)
emilmont 77:869cf507173a 1010
emilmont 77:869cf507173a 1011 #define GPIOA ((GPIO_TypeDef *) GPIOA_BASE)
emilmont 77:869cf507173a 1012 #define GPIOB ((GPIO_TypeDef *) GPIOB_BASE)
emilmont 77:869cf507173a 1013 #define GPIOC ((GPIO_TypeDef *) GPIOC_BASE)
emilmont 77:869cf507173a 1014 #define GPIOD ((GPIO_TypeDef *) GPIOD_BASE)
emilmont 77:869cf507173a 1015 #define GPIOE ((GPIO_TypeDef *) GPIOE_BASE)
emilmont 77:869cf507173a 1016 #define GPIOF ((GPIO_TypeDef *) GPIOF_BASE)
emilmont 77:869cf507173a 1017
emilmont 77:869cf507173a 1018 /**
emilmont 77:869cf507173a 1019 * @}
emilmont 77:869cf507173a 1020 */
emilmont 77:869cf507173a 1021
emilmont 77:869cf507173a 1022 /** @addtogroup Exported_constants
emilmont 77:869cf507173a 1023 * @{
emilmont 77:869cf507173a 1024 */
emilmont 77:869cf507173a 1025
emilmont 77:869cf507173a 1026 /** @addtogroup Peripheral_Registers_Bits_Definition
emilmont 77:869cf507173a 1027 * @{
emilmont 77:869cf507173a 1028 */
emilmont 77:869cf507173a 1029
emilmont 77:869cf507173a 1030 /******************************************************************************/
emilmont 77:869cf507173a 1031 /* Peripheral Registers Bits Definition */
emilmont 77:869cf507173a 1032 /******************************************************************************/
emilmont 77:869cf507173a 1033 /******************************************************************************/
emilmont 77:869cf507173a 1034 /* */
emilmont 77:869cf507173a 1035 /* Analog to Digital Converter (ADC) */
emilmont 77:869cf507173a 1036 /* */
emilmont 77:869cf507173a 1037 /******************************************************************************/
emilmont 77:869cf507173a 1038 /******************** Bits definition for ADC_ISR register ******************/
emilmont 77:869cf507173a 1039 #define ADC_ISR_AWD ((uint32_t)0x00000080) /*!< Analog watchdog flag */
emilmont 77:869cf507173a 1040 #define ADC_ISR_OVR ((uint32_t)0x00000010) /*!< Overrun flag */
emilmont 77:869cf507173a 1041 #define ADC_ISR_EOSEQ ((uint32_t)0x00000008) /*!< End of Sequence flag */
emilmont 77:869cf507173a 1042 #define ADC_ISR_EOC ((uint32_t)0x00000004) /*!< End of Conversion */
emilmont 77:869cf507173a 1043 #define ADC_ISR_EOSMP ((uint32_t)0x00000002) /*!< End of sampling flag */
emilmont 77:869cf507173a 1044 #define ADC_ISR_ADRDY ((uint32_t)0x00000001) /*!< ADC Ready */
emilmont 77:869cf507173a 1045
emilmont 77:869cf507173a 1046 /* Old EOSEQ bit definition, maintained for legacy purpose */
emilmont 77:869cf507173a 1047 #define ADC_ISR_EOS ADC_ISR_EOSEQ
emilmont 77:869cf507173a 1048
emilmont 77:869cf507173a 1049 /******************** Bits definition for ADC_IER register ******************/
emilmont 77:869cf507173a 1050 #define ADC_IER_AWDIE ((uint32_t)0x00000080) /*!< Analog Watchdog interrupt enable */
emilmont 77:869cf507173a 1051 #define ADC_IER_OVRIE ((uint32_t)0x00000010) /*!< Overrun interrupt enable */
emilmont 77:869cf507173a 1052 #define ADC_IER_EOSEQIE ((uint32_t)0x00000008) /*!< End of Sequence of conversion interrupt enable */
emilmont 77:869cf507173a 1053 #define ADC_IER_EOCIE ((uint32_t)0x00000004) /*!< End of Conversion interrupt enable */
emilmont 77:869cf507173a 1054 #define ADC_IER_EOSMPIE ((uint32_t)0x00000002) /*!< End of sampling interrupt enable */
emilmont 77:869cf507173a 1055 #define ADC_IER_ADRDYIE ((uint32_t)0x00000001) /*!< ADC Ready interrupt enable */
emilmont 77:869cf507173a 1056
emilmont 77:869cf507173a 1057 /* Old EOSEQIE bit definition, maintained for legacy purpose */
emilmont 77:869cf507173a 1058 #define ADC_IER_EOSIE ADC_IER_EOSEQIE
emilmont 77:869cf507173a 1059
emilmont 77:869cf507173a 1060 /******************** Bits definition for ADC_CR register *******************/
emilmont 77:869cf507173a 1061 #define ADC_CR_ADCAL ((uint32_t)0x80000000) /*!< ADC calibration */
emilmont 77:869cf507173a 1062 #define ADC_CR_ADSTP ((uint32_t)0x00000010) /*!< ADC stop of conversion command */
emilmont 77:869cf507173a 1063 #define ADC_CR_ADSTART ((uint32_t)0x00000004) /*!< ADC start of conversion */
emilmont 77:869cf507173a 1064 #define ADC_CR_ADDIS ((uint32_t)0x00000002) /*!< ADC disable command */
emilmont 77:869cf507173a 1065 #define ADC_CR_ADEN ((uint32_t)0x00000001) /*!< ADC enable control */
emilmont 77:869cf507173a 1066
emilmont 77:869cf507173a 1067 /******************* Bits definition for ADC_CFGR1 register *****************/
emilmont 77:869cf507173a 1068 #define ADC_CFGR1_AWDCH ((uint32_t)0x7C000000) /*!< AWDCH[4:0] bits (Analog watchdog channel select bits) */
emilmont 77:869cf507173a 1069 #define ADC_CFGR1_AWDCH_0 ((uint32_t)0x04000000) /*!< Bit 0 */
emilmont 77:869cf507173a 1070 #define ADC_CFGR1_AWDCH_1 ((uint32_t)0x08000000) /*!< Bit 1 */
emilmont 77:869cf507173a 1071 #define ADC_CFGR1_AWDCH_2 ((uint32_t)0x10000000) /*!< Bit 2 */
emilmont 77:869cf507173a 1072 #define ADC_CFGR1_AWDCH_3 ((uint32_t)0x20000000) /*!< Bit 3 */
emilmont 77:869cf507173a 1073 #define ADC_CFGR1_AWDCH_4 ((uint32_t)0x40000000) /*!< Bit 4 */
emilmont 77:869cf507173a 1074 #define ADC_CFGR1_AWDEN ((uint32_t)0x00800000) /*!< Analog watchdog enable on regular channels */
emilmont 77:869cf507173a 1075 #define ADC_CFGR1_AWDSGL ((uint32_t)0x00400000) /*!< Enable the watchdog on a single channel or on all channels */
emilmont 77:869cf507173a 1076 #define ADC_CFGR1_DISCEN ((uint32_t)0x00010000) /*!< Discontinuous mode on regular channels */
emilmont 77:869cf507173a 1077 #define ADC_CFGR1_AUTOFF ((uint32_t)0x00008000) /*!< ADC auto power off */
emilmont 77:869cf507173a 1078 #define ADC_CFGR1_WAIT ((uint32_t)0x00004000) /*!< ADC wait conversion mode */
emilmont 77:869cf507173a 1079 #define ADC_CFGR1_CONT ((uint32_t)0x00002000) /*!< Continuous Conversion */
emilmont 77:869cf507173a 1080 #define ADC_CFGR1_OVRMOD ((uint32_t)0x00001000) /*!< Overrun mode */
emilmont 77:869cf507173a 1081 #define ADC_CFGR1_EXTEN ((uint32_t)0x00000C00) /*!< EXTEN[1:0] bits (External Trigger Conversion mode for regular channels) */
emilmont 77:869cf507173a 1082 #define ADC_CFGR1_EXTEN_0 ((uint32_t)0x00000400) /*!< Bit 0 */
emilmont 77:869cf507173a 1083 #define ADC_CFGR1_EXTEN_1 ((uint32_t)0x00000800) /*!< Bit 1 */
emilmont 77:869cf507173a 1084 #define ADC_CFGR1_EXTSEL ((uint32_t)0x000001C0) /*!< EXTSEL[2:0] bits (External Event Select for regular group) */
emilmont 77:869cf507173a 1085 #define ADC_CFGR1_EXTSEL_0 ((uint32_t)0x00000040) /*!< Bit 0 */
emilmont 77:869cf507173a 1086 #define ADC_CFGR1_EXTSEL_1 ((uint32_t)0x00000080) /*!< Bit 1 */
emilmont 77:869cf507173a 1087 #define ADC_CFGR1_EXTSEL_2 ((uint32_t)0x00000100) /*!< Bit 2 */
emilmont 77:869cf507173a 1088 #define ADC_CFGR1_ALIGN ((uint32_t)0x00000020) /*!< Data Alignment */
emilmont 77:869cf507173a 1089 #define ADC_CFGR1_RES ((uint32_t)0x00000018) /*!< RES[1:0] bits (Resolution) */
emilmont 77:869cf507173a 1090 #define ADC_CFGR1_RES_0 ((uint32_t)0x00000008) /*!< Bit 0 */
emilmont 77:869cf507173a 1091 #define ADC_CFGR1_RES_1 ((uint32_t)0x00000010) /*!< Bit 1 */
emilmont 77:869cf507173a 1092 #define ADC_CFGR1_SCANDIR ((uint32_t)0x00000004) /*!< Sequence scan direction */
emilmont 77:869cf507173a 1093 #define ADC_CFGR1_DMACFG ((uint32_t)0x00000002) /*!< Direct memory access configuration */
emilmont 77:869cf507173a 1094 #define ADC_CFGR1_DMAEN ((uint32_t)0x00000001) /*!< Direct memory access enable */
emilmont 77:869cf507173a 1095
emilmont 77:869cf507173a 1096 /* Old WAIT bit definition, maintained for legacy purpose */
emilmont 77:869cf507173a 1097 #define ADC_CFGR1_AUTDLY ADC_CFGR1_WAIT
emilmont 77:869cf507173a 1098
emilmont 77:869cf507173a 1099 /******************* Bits definition for ADC_CFGR2 register *****************/
emilmont 77:869cf507173a 1100 #define ADC_CFGR2_CKMODE ((uint32_t)0xC0000000) /*!< ADC clock mode */
emilmont 77:869cf507173a 1101 #define ADC_CFGR2_CKMODE_1 ((uint32_t)0x80000000) /*!< ADC clocked by PCLK div4 */
emilmont 77:869cf507173a 1102 #define ADC_CFGR2_CKMODE_0 ((uint32_t)0x40000000) /*!< ADC clocked by PCLK div2 */
emilmont 77:869cf507173a 1103
emilmont 77:869cf507173a 1104 /* Old bit definition, maintained for legacy purpose */
emilmont 77:869cf507173a 1105 #define ADC_CFGR2_JITOFFDIV4 ADC_CFGR2_CKMODE_1 /*!< ADC clocked by PCLK div4 */
emilmont 77:869cf507173a 1106 #define ADC_CFGR2_JITOFFDIV2 ADC_CFGR2_CKMODE_0 /*!< ADC clocked by PCLK div2 */
emilmont 77:869cf507173a 1107
emilmont 77:869cf507173a 1108 /****************** Bit definition for ADC_SMPR register ********************/
emilmont 77:869cf507173a 1109 #define ADC_SMPR_SMP ((uint32_t)0x00000007) /*!< SMP[2:0] bits (Sampling time selection) */
emilmont 77:869cf507173a 1110 #define ADC_SMPR_SMP_0 ((uint32_t)0x00000001) /*!< Bit 0 */
emilmont 77:869cf507173a 1111 #define ADC_SMPR_SMP_1 ((uint32_t)0x00000002) /*!< Bit 1 */
emilmont 77:869cf507173a 1112 #define ADC_SMPR_SMP_2 ((uint32_t)0x00000004) /*!< Bit 2 */
emilmont 77:869cf507173a 1113
emilmont 77:869cf507173a 1114 /* Old bit definition, maintained for legacy purpose */
emilmont 77:869cf507173a 1115 #define ADC_SMPR1_SMPR ADC_SMPR_SMP /*!< SMP[2:0] bits (Sampling time selection) */
emilmont 77:869cf507173a 1116 #define ADC_SMPR1_SMPR_0 ADC_SMPR_SMP_0 /*!< Bit 0 */
emilmont 77:869cf507173a 1117 #define ADC_SMPR1_SMPR_1 ADC_SMPR_SMP_1 /*!< Bit 1 */
emilmont 77:869cf507173a 1118 #define ADC_SMPR1_SMPR_2 ADC_SMPR_SMP_2 /*!< Bit 2 */
emilmont 77:869cf507173a 1119
emilmont 77:869cf507173a 1120 /******************* Bit definition for ADC_TR register ********************/
emilmont 77:869cf507173a 1121 #define ADC_TR_HT ((uint32_t)0x0FFF0000) /*!< Analog watchdog high threshold */
emilmont 77:869cf507173a 1122 #define ADC_TR_LT ((uint32_t)0x00000FFF) /*!< Analog watchdog low threshold */
emilmont 77:869cf507173a 1123
emilmont 77:869cf507173a 1124 /* Old bit definition, maintained for legacy purpose */
emilmont 77:869cf507173a 1125 #define ADC_HTR_HT ADC_TR_HT /*!< Analog watchdog high threshold */
emilmont 77:869cf507173a 1126 #define ADC_LTR_LT ADC_TR_LT /*!< Analog watchdog low threshold */
emilmont 77:869cf507173a 1127
emilmont 77:869cf507173a 1128 /****************** Bit definition for ADC_CHSELR register ******************/
emilmont 77:869cf507173a 1129 #define ADC_CHSELR_CHSEL18 ((uint32_t)0x00040000) /*!< Channel 18 selection */
emilmont 77:869cf507173a 1130 #define ADC_CHSELR_CHSEL17 ((uint32_t)0x00020000) /*!< Channel 17 selection */
emilmont 77:869cf507173a 1131 #define ADC_CHSELR_CHSEL16 ((uint32_t)0x00010000) /*!< Channel 16 selection */
emilmont 77:869cf507173a 1132 #define ADC_CHSELR_CHSEL15 ((uint32_t)0x00008000) /*!< Channel 15 selection */
emilmont 77:869cf507173a 1133 #define ADC_CHSELR_CHSEL14 ((uint32_t)0x00004000) /*!< Channel 14 selection */
emilmont 77:869cf507173a 1134 #define ADC_CHSELR_CHSEL13 ((uint32_t)0x00002000) /*!< Channel 13 selection */
emilmont 77:869cf507173a 1135 #define ADC_CHSELR_CHSEL12 ((uint32_t)0x00001000) /*!< Channel 12 selection */
emilmont 77:869cf507173a 1136 #define ADC_CHSELR_CHSEL11 ((uint32_t)0x00000800) /*!< Channel 11 selection */
emilmont 77:869cf507173a 1137 #define ADC_CHSELR_CHSEL10 ((uint32_t)0x00000400) /*!< Channel 10 selection */
emilmont 77:869cf507173a 1138 #define ADC_CHSELR_CHSEL9 ((uint32_t)0x00000200) /*!< Channel 9 selection */
emilmont 77:869cf507173a 1139 #define ADC_CHSELR_CHSEL8 ((uint32_t)0x00000100) /*!< Channel 8 selection */
emilmont 77:869cf507173a 1140 #define ADC_CHSELR_CHSEL7 ((uint32_t)0x00000080) /*!< Channel 7 selection */
emilmont 77:869cf507173a 1141 #define ADC_CHSELR_CHSEL6 ((uint32_t)0x00000040) /*!< Channel 6 selection */
emilmont 77:869cf507173a 1142 #define ADC_CHSELR_CHSEL5 ((uint32_t)0x00000020) /*!< Channel 5 selection */
emilmont 77:869cf507173a 1143 #define ADC_CHSELR_CHSEL4 ((uint32_t)0x00000010) /*!< Channel 4 selection */
emilmont 77:869cf507173a 1144 #define ADC_CHSELR_CHSEL3 ((uint32_t)0x00000008) /*!< Channel 3 selection */
emilmont 77:869cf507173a 1145 #define ADC_CHSELR_CHSEL2 ((uint32_t)0x00000004) /*!< Channel 2 selection */
emilmont 77:869cf507173a 1146 #define ADC_CHSELR_CHSEL1 ((uint32_t)0x00000002) /*!< Channel 1 selection */
emilmont 77:869cf507173a 1147 #define ADC_CHSELR_CHSEL0 ((uint32_t)0x00000001) /*!< Channel 0 selection */
emilmont 77:869cf507173a 1148
emilmont 77:869cf507173a 1149 /******************** Bit definition for ADC_DR register ********************/
emilmont 77:869cf507173a 1150 #define ADC_DR_DATA ((uint32_t)0x0000FFFF) /*!< Regular data */
emilmont 77:869cf507173a 1151
emilmont 77:869cf507173a 1152 /******************* Bit definition for ADC_CCR register ********************/
emilmont 77:869cf507173a 1153 #define ADC_CCR_VBATEN ((uint32_t)0x01000000) /*!< Voltage battery enable */
emilmont 77:869cf507173a 1154 #define ADC_CCR_TSEN ((uint32_t)0x00800000) /*!< Tempurature sensore enable */
emilmont 77:869cf507173a 1155 #define ADC_CCR_VREFEN ((uint32_t)0x00400000) /*!< Vrefint enable */
emilmont 77:869cf507173a 1156
emilmont 77:869cf507173a 1157 /******************************************************************************/
emilmont 77:869cf507173a 1158 /* */
emilmont 77:869cf507173a 1159 /* Controller Area Network (CAN ) */
emilmont 77:869cf507173a 1160 /* */
emilmont 77:869cf507173a 1161 /******************************************************************************/
emilmont 77:869cf507173a 1162 /******************* Bit definition for CAN_MCR register ********************/
emilmont 77:869cf507173a 1163 #define CAN_MCR_INRQ ((uint16_t)0x0001) /*!<Initialization Request */
emilmont 77:869cf507173a 1164 #define CAN_MCR_SLEEP ((uint16_t)0x0002) /*!<Sleep Mode Request */
emilmont 77:869cf507173a 1165 #define CAN_MCR_TXFP ((uint16_t)0x0004) /*!<Transmit FIFO Priority */
emilmont 77:869cf507173a 1166 #define CAN_MCR_RFLM ((uint16_t)0x0008) /*!<Receive FIFO Locked Mode */
emilmont 77:869cf507173a 1167 #define CAN_MCR_NART ((uint16_t)0x0010) /*!<No Automatic Retransmission */
emilmont 77:869cf507173a 1168 #define CAN_MCR_AWUM ((uint16_t)0x0020) /*!<Automatic Wakeup Mode */
emilmont 77:869cf507173a 1169 #define CAN_MCR_ABOM ((uint16_t)0x0040) /*!<Automatic Bus-Off Management */
emilmont 77:869cf507173a 1170 #define CAN_MCR_TTCM ((uint16_t)0x0080) /*!<Time Triggered Communication Mode */
emilmont 77:869cf507173a 1171 #define CAN_MCR_RESET ((uint16_t)0x8000) /*!<bxCAN software master reset */
emilmont 77:869cf507173a 1172
emilmont 77:869cf507173a 1173 /******************* Bit definition for CAN_MSR register ********************/
emilmont 77:869cf507173a 1174 #define CAN_MSR_INAK ((uint16_t)0x0001) /*!<Initialization Acknowledge */
emilmont 77:869cf507173a 1175 #define CAN_MSR_SLAK ((uint16_t)0x0002) /*!<Sleep Acknowledge */
emilmont 77:869cf507173a 1176 #define CAN_MSR_ERRI ((uint16_t)0x0004) /*!<Error Interrupt */
emilmont 77:869cf507173a 1177 #define CAN_MSR_WKUI ((uint16_t)0x0008) /*!<Wakeup Interrupt */
emilmont 77:869cf507173a 1178 #define CAN_MSR_SLAKI ((uint16_t)0x0010) /*!<Sleep Acknowledge Interrupt */
emilmont 77:869cf507173a 1179 #define CAN_MSR_TXM ((uint16_t)0x0100) /*!<Transmit Mode */
emilmont 77:869cf507173a 1180 #define CAN_MSR_RXM ((uint16_t)0x0200) /*!<Receive Mode */
emilmont 77:869cf507173a 1181 #define CAN_MSR_SAMP ((uint16_t)0x0400) /*!<Last Sample Point */
emilmont 77:869cf507173a 1182 #define CAN_MSR_RX ((uint16_t)0x0800) /*!<CAN Rx Signal */
emilmont 77:869cf507173a 1183
emilmont 77:869cf507173a 1184 /******************* Bit definition for CAN_TSR register ********************/
emilmont 77:869cf507173a 1185 #define CAN_TSR_RQCP0 ((uint32_t)0x00000001) /*!<Request Completed Mailbox0 */
emilmont 77:869cf507173a 1186 #define CAN_TSR_TXOK0 ((uint32_t)0x00000002) /*!<Transmission OK of Mailbox0 */
emilmont 77:869cf507173a 1187 #define CAN_TSR_ALST0 ((uint32_t)0x00000004) /*!<Arbitration Lost for Mailbox0 */
emilmont 77:869cf507173a 1188 #define CAN_TSR_TERR0 ((uint32_t)0x00000008) /*!<Transmission Error of Mailbox0 */
emilmont 77:869cf507173a 1189 #define CAN_TSR_ABRQ0 ((uint32_t)0x00000080) /*!<Abort Request for Mailbox0 */
emilmont 77:869cf507173a 1190 #define CAN_TSR_RQCP1 ((uint32_t)0x00000100) /*!<Request Completed Mailbox1 */
emilmont 77:869cf507173a 1191 #define CAN_TSR_TXOK1 ((uint32_t)0x00000200) /*!<Transmission OK of Mailbox1 */
emilmont 77:869cf507173a 1192 #define CAN_TSR_ALST1 ((uint32_t)0x00000400) /*!<Arbitration Lost for Mailbox1 */
emilmont 77:869cf507173a 1193 #define CAN_TSR_TERR1 ((uint32_t)0x00000800) /*!<Transmission Error of Mailbox1 */
emilmont 77:869cf507173a 1194 #define CAN_TSR_ABRQ1 ((uint32_t)0x00008000) /*!<Abort Request for Mailbox 1 */
emilmont 77:869cf507173a 1195 #define CAN_TSR_RQCP2 ((uint32_t)0x00010000) /*!<Request Completed Mailbox2 */
emilmont 77:869cf507173a 1196 #define CAN_TSR_TXOK2 ((uint32_t)0x00020000) /*!<Transmission OK of Mailbox 2 */
emilmont 77:869cf507173a 1197 #define CAN_TSR_ALST2 ((uint32_t)0x00040000) /*!<Arbitration Lost for mailbox 2 */
emilmont 77:869cf507173a 1198 #define CAN_TSR_TERR2 ((uint32_t)0x00080000) /*!<Transmission Error of Mailbox 2 */
emilmont 77:869cf507173a 1199 #define CAN_TSR_ABRQ2 ((uint32_t)0x00800000) /*!<Abort Request for Mailbox 2 */
emilmont 77:869cf507173a 1200 #define CAN_TSR_CODE ((uint32_t)0x03000000) /*!<Mailbox Code */
emilmont 77:869cf507173a 1201
emilmont 77:869cf507173a 1202 #define CAN_TSR_TME ((uint32_t)0x1C000000) /*!<TME[2:0] bits */
emilmont 77:869cf507173a 1203 #define CAN_TSR_TME0 ((uint32_t)0x04000000) /*!<Transmit Mailbox 0 Empty */
emilmont 77:869cf507173a 1204 #define CAN_TSR_TME1 ((uint32_t)0x08000000) /*!<Transmit Mailbox 1 Empty */
emilmont 77:869cf507173a 1205 #define CAN_TSR_TME2 ((uint32_t)0x10000000) /*!<Transmit Mailbox 2 Empty */
emilmont 77:869cf507173a 1206
emilmont 77:869cf507173a 1207 #define CAN_TSR_LOW ((uint32_t)0xE0000000) /*!<LOW[2:0] bits */
emilmont 77:869cf507173a 1208 #define CAN_TSR_LOW0 ((uint32_t)0x20000000) /*!<Lowest Priority Flag for Mailbox 0 */
emilmont 77:869cf507173a 1209 #define CAN_TSR_LOW1 ((uint32_t)0x40000000) /*!<Lowest Priority Flag for Mailbox 1 */
emilmont 77:869cf507173a 1210 #define CAN_TSR_LOW2 ((uint32_t)0x80000000) /*!<Lowest Priority Flag for Mailbox 2 */
emilmont 77:869cf507173a 1211
emilmont 77:869cf507173a 1212 /******************* Bit definition for CAN_RF0R register *******************/
emilmont 77:869cf507173a 1213 #define CAN_RF0R_FMP0 ((uint8_t)0x03) /*!<FIFO 0 Message Pending */
emilmont 77:869cf507173a 1214 #define CAN_RF0R_FULL0 ((uint8_t)0x08) /*!<FIFO 0 Full */
emilmont 77:869cf507173a 1215 #define CAN_RF0R_FOVR0 ((uint8_t)0x10) /*!<FIFO 0 Overrun */
emilmont 77:869cf507173a 1216 #define CAN_RF0R_RFOM0 ((uint8_t)0x20) /*!<Release FIFO 0 Output Mailbox */
emilmont 77:869cf507173a 1217
emilmont 77:869cf507173a 1218 /******************* Bit definition for CAN_RF1R register *******************/
emilmont 77:869cf507173a 1219 #define CAN_RF1R_FMP1 ((uint8_t)0x03) /*!<FIFO 1 Message Pending */
emilmont 77:869cf507173a 1220 #define CAN_RF1R_FULL1 ((uint8_t)0x08) /*!<FIFO 1 Full */
emilmont 77:869cf507173a 1221 #define CAN_RF1R_FOVR1 ((uint8_t)0x10) /*!<FIFO 1 Overrun */
emilmont 77:869cf507173a 1222 #define CAN_RF1R_RFOM1 ((uint8_t)0x20) /*!<Release FIFO 1 Output Mailbox */
emilmont 77:869cf507173a 1223
emilmont 77:869cf507173a 1224 /******************** Bit definition for CAN_IER register *******************/
emilmont 77:869cf507173a 1225 #define CAN_IER_TMEIE ((uint32_t)0x00000001) /*!<Transmit Mailbox Empty Interrupt Enable */
emilmont 77:869cf507173a 1226 #define CAN_IER_FMPIE0 ((uint32_t)0x00000002) /*!<FIFO Message Pending Interrupt Enable */
emilmont 77:869cf507173a 1227 #define CAN_IER_FFIE0 ((uint32_t)0x00000004) /*!<FIFO Full Interrupt Enable */
emilmont 77:869cf507173a 1228 #define CAN_IER_FOVIE0 ((uint32_t)0x00000008) /*!<FIFO Overrun Interrupt Enable */
emilmont 77:869cf507173a 1229 #define CAN_IER_FMPIE1 ((uint32_t)0x00000010) /*!<FIFO Message Pending Interrupt Enable */
emilmont 77:869cf507173a 1230 #define CAN_IER_FFIE1 ((uint32_t)0x00000020) /*!<FIFO Full Interrupt Enable */
emilmont 77:869cf507173a 1231 #define CAN_IER_FOVIE1 ((uint32_t)0x00000040) /*!<FIFO Overrun Interrupt Enable */
emilmont 77:869cf507173a 1232 #define CAN_IER_EWGIE ((uint32_t)0x00000100) /*!<Error Warning Interrupt Enable */
emilmont 77:869cf507173a 1233 #define CAN_IER_EPVIE ((uint32_t)0x00000200) /*!<Error Passive Interrupt Enable */
emilmont 77:869cf507173a 1234 #define CAN_IER_BOFIE ((uint32_t)0x00000400) /*!<Bus-Off Interrupt Enable */
emilmont 77:869cf507173a 1235 #define CAN_IER_LECIE ((uint32_t)0x00000800) /*!<Last Error Code Interrupt Enable */
emilmont 77:869cf507173a 1236 #define CAN_IER_ERRIE ((uint32_t)0x00008000) /*!<Error Interrupt Enable */
emilmont 77:869cf507173a 1237 #define CAN_IER_WKUIE ((uint32_t)0x00010000) /*!<Wakeup Interrupt Enable */
emilmont 77:869cf507173a 1238 #define CAN_IER_SLKIE ((uint32_t)0x00020000) /*!<Sleep Interrupt Enable */
emilmont 77:869cf507173a 1239
emilmont 77:869cf507173a 1240 /******************** Bit definition for CAN_ESR register *******************/
emilmont 77:869cf507173a 1241 #define CAN_ESR_EWGF ((uint32_t)0x00000001) /*!<Error Warning Flag */
emilmont 77:869cf507173a 1242 #define CAN_ESR_EPVF ((uint32_t)0x00000002) /*!<Error Passive Flag */
emilmont 77:869cf507173a 1243 #define CAN_ESR_BOFF ((uint32_t)0x00000004) /*!<Bus-Off Flag */
emilmont 77:869cf507173a 1244
emilmont 77:869cf507173a 1245 #define CAN_ESR_LEC ((uint32_t)0x00000070) /*!<LEC[2:0] bits (Last Error Code) */
emilmont 77:869cf507173a 1246 #define CAN_ESR_LEC_0 ((uint32_t)0x00000010) /*!<Bit 0 */
emilmont 77:869cf507173a 1247 #define CAN_ESR_LEC_1 ((uint32_t)0x00000020) /*!<Bit 1 */
emilmont 77:869cf507173a 1248 #define CAN_ESR_LEC_2 ((uint32_t)0x00000040) /*!<Bit 2 */
emilmont 77:869cf507173a 1249
emilmont 77:869cf507173a 1250 #define CAN_ESR_TEC ((uint32_t)0x00FF0000) /*!<Least significant byte of the 9-bit Transmit Error Counter */
emilmont 77:869cf507173a 1251 #define CAN_ESR_REC ((uint32_t)0xFF000000) /*!<Receive Error Counter */
emilmont 77:869cf507173a 1252
emilmont 77:869cf507173a 1253 /******************* Bit definition for CAN_BTR register ********************/
emilmont 77:869cf507173a 1254 #define CAN_BTR_BRP ((uint32_t)0x000003FF) /*!<Baud Rate Prescaler */
emilmont 77:869cf507173a 1255 #define CAN_BTR_TS1 ((uint32_t)0x000F0000) /*!<Time Segment 1 */
emilmont 77:869cf507173a 1256 #define CAN_BTR_TS2 ((uint32_t)0x00700000) /*!<Time Segment 2 */
emilmont 77:869cf507173a 1257 #define CAN_BTR_SJW ((uint32_t)0x03000000) /*!<Resynchronization Jump Width */
emilmont 77:869cf507173a 1258 #define CAN_BTR_LBKM ((uint32_t)0x40000000) /*!<Loop Back Mode (Debug) */
emilmont 77:869cf507173a 1259 #define CAN_BTR_SILM ((uint32_t)0x80000000) /*!<Silent Mode */
emilmont 77:869cf507173a 1260
emilmont 77:869cf507173a 1261 /*!<Mailbox registers */
emilmont 77:869cf507173a 1262 /****************** Bit definition for CAN_TI0R register ********************/
emilmont 77:869cf507173a 1263 #define CAN_TI0R_TXRQ ((uint32_t)0x00000001) /*!<Transmit Mailbox Request */
emilmont 77:869cf507173a 1264 #define CAN_TI0R_RTR ((uint32_t)0x00000002) /*!<Remote Transmission Request */
emilmont 77:869cf507173a 1265 #define CAN_TI0R_IDE ((uint32_t)0x00000004) /*!<Identifier Extension */
emilmont 77:869cf507173a 1266 #define CAN_TI0R_EXID ((uint32_t)0x001FFFF8) /*!<Extended Identifier */
emilmont 77:869cf507173a 1267 #define CAN_TI0R_STID ((uint32_t)0xFFE00000) /*!<Standard Identifier or Extended Identifier */
emilmont 77:869cf507173a 1268
emilmont 77:869cf507173a 1269 /****************** Bit definition for CAN_TDT0R register *******************/
emilmont 77:869cf507173a 1270 #define CAN_TDT0R_DLC ((uint32_t)0x0000000F) /*!<Data Length Code */
emilmont 77:869cf507173a 1271 #define CAN_TDT0R_TGT ((uint32_t)0x00000100) /*!<Transmit Global Time */
emilmont 77:869cf507173a 1272 #define CAN_TDT0R_TIME ((uint32_t)0xFFFF0000) /*!<Message Time Stamp */
emilmont 77:869cf507173a 1273
emilmont 77:869cf507173a 1274 /****************** Bit definition for CAN_TDL0R register *******************/
emilmont 77:869cf507173a 1275 #define CAN_TDL0R_DATA0 ((uint32_t)0x000000FF) /*!<Data byte 0 */
emilmont 77:869cf507173a 1276 #define CAN_TDL0R_DATA1 ((uint32_t)0x0000FF00) /*!<Data byte 1 */
emilmont 77:869cf507173a 1277 #define CAN_TDL0R_DATA2 ((uint32_t)0x00FF0000) /*!<Data byte 2 */
emilmont 77:869cf507173a 1278 #define CAN_TDL0R_DATA3 ((uint32_t)0xFF000000) /*!<Data byte 3 */
emilmont 77:869cf507173a 1279
emilmont 77:869cf507173a 1280 /****************** Bit definition for CAN_TDH0R register *******************/
emilmont 77:869cf507173a 1281 #define CAN_TDH0R_DATA4 ((uint32_t)0x000000FF) /*!<Data byte 4 */
emilmont 77:869cf507173a 1282 #define CAN_TDH0R_DATA5 ((uint32_t)0x0000FF00) /*!<Data byte 5 */
emilmont 77:869cf507173a 1283 #define CAN_TDH0R_DATA6 ((uint32_t)0x00FF0000) /*!<Data byte 6 */
emilmont 77:869cf507173a 1284 #define CAN_TDH0R_DATA7 ((uint32_t)0xFF000000) /*!<Data byte 7 */
emilmont 77:869cf507173a 1285
emilmont 77:869cf507173a 1286 /******************* Bit definition for CAN_TI1R register *******************/
emilmont 77:869cf507173a 1287 #define CAN_TI1R_TXRQ ((uint32_t)0x00000001) /*!<Transmit Mailbox Request */
emilmont 77:869cf507173a 1288 #define CAN_TI1R_RTR ((uint32_t)0x00000002) /*!<Remote Transmission Request */
emilmont 77:869cf507173a 1289 #define CAN_TI1R_IDE ((uint32_t)0x00000004) /*!<Identifier Extension */
emilmont 77:869cf507173a 1290 #define CAN_TI1R_EXID ((uint32_t)0x001FFFF8) /*!<Extended Identifier */
emilmont 77:869cf507173a 1291 #define CAN_TI1R_STID ((uint32_t)0xFFE00000) /*!<Standard Identifier or Extended Identifier */
emilmont 77:869cf507173a 1292
emilmont 77:869cf507173a 1293 /******************* Bit definition for CAN_TDT1R register ******************/
emilmont 77:869cf507173a 1294 #define CAN_TDT1R_DLC ((uint32_t)0x0000000F) /*!<Data Length Code */
emilmont 77:869cf507173a 1295 #define CAN_TDT1R_TGT ((uint32_t)0x00000100) /*!<Transmit Global Time */
emilmont 77:869cf507173a 1296 #define CAN_TDT1R_TIME ((uint32_t)0xFFFF0000) /*!<Message Time Stamp */
emilmont 77:869cf507173a 1297
emilmont 77:869cf507173a 1298 /******************* Bit definition for CAN_TDL1R register ******************/
emilmont 77:869cf507173a 1299 #define CAN_TDL1R_DATA0 ((uint32_t)0x000000FF) /*!<Data byte 0 */
emilmont 77:869cf507173a 1300 #define CAN_TDL1R_DATA1 ((uint32_t)0x0000FF00) /*!<Data byte 1 */
emilmont 77:869cf507173a 1301 #define CAN_TDL1R_DATA2 ((uint32_t)0x00FF0000) /*!<Data byte 2 */
emilmont 77:869cf507173a 1302 #define CAN_TDL1R_DATA3 ((uint32_t)0xFF000000) /*!<Data byte 3 */
emilmont 77:869cf507173a 1303
emilmont 77:869cf507173a 1304 /******************* Bit definition for CAN_TDH1R register ******************/
emilmont 77:869cf507173a 1305 #define CAN_TDH1R_DATA4 ((uint32_t)0x000000FF) /*!<Data byte 4 */
emilmont 77:869cf507173a 1306 #define CAN_TDH1R_DATA5 ((uint32_t)0x0000FF00) /*!<Data byte 5 */
emilmont 77:869cf507173a 1307 #define CAN_TDH1R_DATA6 ((uint32_t)0x00FF0000) /*!<Data byte 6 */
emilmont 77:869cf507173a 1308 #define CAN_TDH1R_DATA7 ((uint32_t)0xFF000000) /*!<Data byte 7 */
emilmont 77:869cf507173a 1309
emilmont 77:869cf507173a 1310 /******************* Bit definition for CAN_TI2R register *******************/
emilmont 77:869cf507173a 1311 #define CAN_TI2R_TXRQ ((uint32_t)0x00000001) /*!<Transmit Mailbox Request */
emilmont 77:869cf507173a 1312 #define CAN_TI2R_RTR ((uint32_t)0x00000002) /*!<Remote Transmission Request */
emilmont 77:869cf507173a 1313 #define CAN_TI2R_IDE ((uint32_t)0x00000004) /*!<Identifier Extension */
emilmont 77:869cf507173a 1314 #define CAN_TI2R_EXID ((uint32_t)0x001FFFF8) /*!<Extended identifier */
emilmont 77:869cf507173a 1315 #define CAN_TI2R_STID ((uint32_t)0xFFE00000) /*!<Standard Identifier or Extended Identifier */
emilmont 77:869cf507173a 1316
emilmont 77:869cf507173a 1317 /******************* Bit definition for CAN_TDT2R register ******************/
emilmont 77:869cf507173a 1318 #define CAN_TDT2R_DLC ((uint32_t)0x0000000F) /*!<Data Length Code */
emilmont 77:869cf507173a 1319 #define CAN_TDT2R_TGT ((uint32_t)0x00000100) /*!<Transmit Global Time */
emilmont 77:869cf507173a 1320 #define CAN_TDT2R_TIME ((uint32_t)0xFFFF0000) /*!<Message Time Stamp */
emilmont 77:869cf507173a 1321
emilmont 77:869cf507173a 1322 /******************* Bit definition for CAN_TDL2R register ******************/
emilmont 77:869cf507173a 1323 #define CAN_TDL2R_DATA0 ((uint32_t)0x000000FF) /*!<Data byte 0 */
emilmont 77:869cf507173a 1324 #define CAN_TDL2R_DATA1 ((uint32_t)0x0000FF00) /*!<Data byte 1 */
emilmont 77:869cf507173a 1325 #define CAN_TDL2R_DATA2 ((uint32_t)0x00FF0000) /*!<Data byte 2 */
emilmont 77:869cf507173a 1326 #define CAN_TDL2R_DATA3 ((uint32_t)0xFF000000) /*!<Data byte 3 */
emilmont 77:869cf507173a 1327
emilmont 77:869cf507173a 1328 /******************* Bit definition for CAN_TDH2R register ******************/
emilmont 77:869cf507173a 1329 #define CAN_TDH2R_DATA4 ((uint32_t)0x000000FF) /*!<Data byte 4 */
emilmont 77:869cf507173a 1330 #define CAN_TDH2R_DATA5 ((uint32_t)0x0000FF00) /*!<Data byte 5 */
emilmont 77:869cf507173a 1331 #define CAN_TDH2R_DATA6 ((uint32_t)0x00FF0000) /*!<Data byte 6 */
emilmont 77:869cf507173a 1332 #define CAN_TDH2R_DATA7 ((uint32_t)0xFF000000) /*!<Data byte 7 */
emilmont 77:869cf507173a 1333
emilmont 77:869cf507173a 1334 /******************* Bit definition for CAN_RI0R register *******************/
emilmont 77:869cf507173a 1335 #define CAN_RI0R_RTR ((uint32_t)0x00000002) /*!<Remote Transmission Request */
emilmont 77:869cf507173a 1336 #define CAN_RI0R_IDE ((uint32_t)0x00000004) /*!<Identifier Extension */
emilmont 77:869cf507173a 1337 #define CAN_RI0R_EXID ((uint32_t)0x001FFFF8) /*!<Extended Identifier */
emilmont 77:869cf507173a 1338 #define CAN_RI0R_STID ((uint32_t)0xFFE00000) /*!<Standard Identifier or Extended Identifier */
emilmont 77:869cf507173a 1339
emilmont 77:869cf507173a 1340 /******************* Bit definition for CAN_RDT0R register ******************/
emilmont 77:869cf507173a 1341 #define CAN_RDT0R_DLC ((uint32_t)0x0000000F) /*!<Data Length Code */
emilmont 77:869cf507173a 1342 #define CAN_RDT0R_FMI ((uint32_t)0x0000FF00) /*!<Filter Match Index */
emilmont 77:869cf507173a 1343 #define CAN_RDT0R_TIME ((uint32_t)0xFFFF0000) /*!<Message Time Stamp */
emilmont 77:869cf507173a 1344
emilmont 77:869cf507173a 1345 /******************* Bit definition for CAN_RDL0R register ******************/
emilmont 77:869cf507173a 1346 #define CAN_RDL0R_DATA0 ((uint32_t)0x000000FF) /*!<Data byte 0 */
emilmont 77:869cf507173a 1347 #define CAN_RDL0R_DATA1 ((uint32_t)0x0000FF00) /*!<Data byte 1 */
emilmont 77:869cf507173a 1348 #define CAN_RDL0R_DATA2 ((uint32_t)0x00FF0000) /*!<Data byte 2 */
emilmont 77:869cf507173a 1349 #define CAN_RDL0R_DATA3 ((uint32_t)0xFF000000) /*!<Data byte 3 */
emilmont 77:869cf507173a 1350
emilmont 77:869cf507173a 1351 /******************* Bit definition for CAN_RDH0R register ******************/
emilmont 77:869cf507173a 1352 #define CAN_RDH0R_DATA4 ((uint32_t)0x000000FF) /*!<Data byte 4 */
emilmont 77:869cf507173a 1353 #define CAN_RDH0R_DATA5 ((uint32_t)0x0000FF00) /*!<Data byte 5 */
emilmont 77:869cf507173a 1354 #define CAN_RDH0R_DATA6 ((uint32_t)0x00FF0000) /*!<Data byte 6 */
emilmont 77:869cf507173a 1355 #define CAN_RDH0R_DATA7 ((uint32_t)0xFF000000) /*!<Data byte 7 */
emilmont 77:869cf507173a 1356
emilmont 77:869cf507173a 1357 /******************* Bit definition for CAN_RI1R register *******************/
emilmont 77:869cf507173a 1358 #define CAN_RI1R_RTR ((uint32_t)0x00000002) /*!<Remote Transmission Request */
emilmont 77:869cf507173a 1359 #define CAN_RI1R_IDE ((uint32_t)0x00000004) /*!<Identifier Extension */
emilmont 77:869cf507173a 1360 #define CAN_RI1R_EXID ((uint32_t)0x001FFFF8) /*!<Extended identifier */
emilmont 77:869cf507173a 1361 #define CAN_RI1R_STID ((uint32_t)0xFFE00000) /*!<Standard Identifier or Extended Identifier */
emilmont 77:869cf507173a 1362
emilmont 77:869cf507173a 1363 /******************* Bit definition for CAN_RDT1R register ******************/
emilmont 77:869cf507173a 1364 #define CAN_RDT1R_DLC ((uint32_t)0x0000000F) /*!<Data Length Code */
emilmont 77:869cf507173a 1365 #define CAN_RDT1R_FMI ((uint32_t)0x0000FF00) /*!<Filter Match Index */
emilmont 77:869cf507173a 1366 #define CAN_RDT1R_TIME ((uint32_t)0xFFFF0000) /*!<Message Time Stamp */
emilmont 77:869cf507173a 1367
emilmont 77:869cf507173a 1368 /******************* Bit definition for CAN_RDL1R register ******************/
emilmont 77:869cf507173a 1369 #define CAN_RDL1R_DATA0 ((uint32_t)0x000000FF) /*!<Data byte 0 */
emilmont 77:869cf507173a 1370 #define CAN_RDL1R_DATA1 ((uint32_t)0x0000FF00) /*!<Data byte 1 */
emilmont 77:869cf507173a 1371 #define CAN_RDL1R_DATA2 ((uint32_t)0x00FF0000) /*!<Data byte 2 */
emilmont 77:869cf507173a 1372 #define CAN_RDL1R_DATA3 ((uint32_t)0xFF000000) /*!<Data byte 3 */
emilmont 77:869cf507173a 1373
emilmont 77:869cf507173a 1374 /******************* Bit definition for CAN_RDH1R register ******************/
emilmont 77:869cf507173a 1375 #define CAN_RDH1R_DATA4 ((uint32_t)0x000000FF) /*!<Data byte 4 */
emilmont 77:869cf507173a 1376 #define CAN_RDH1R_DATA5 ((uint32_t)0x0000FF00) /*!<Data byte 5 */
emilmont 77:869cf507173a 1377 #define CAN_RDH1R_DATA6 ((uint32_t)0x00FF0000) /*!<Data byte 6 */
emilmont 77:869cf507173a 1378 #define CAN_RDH1R_DATA7 ((uint32_t)0xFF000000) /*!<Data byte 7 */
emilmont 77:869cf507173a 1379
emilmont 77:869cf507173a 1380 /*!<CAN filter registers */
emilmont 77:869cf507173a 1381 /******************* Bit definition for CAN_FMR register ********************/
emilmont 77:869cf507173a 1382 #define CAN_FMR_FINIT ((uint8_t)0x01) /*!<Filter Init Mode */
emilmont 77:869cf507173a 1383
emilmont 77:869cf507173a 1384 /******************* Bit definition for CAN_FM1R register *******************/
emilmont 77:869cf507173a 1385 #define CAN_FM1R_FBM ((uint16_t)0x3FFF) /*!<Filter Mode */
emilmont 77:869cf507173a 1386 #define CAN_FM1R_FBM0 ((uint16_t)0x0001) /*!<Filter Init Mode bit 0 */
emilmont 77:869cf507173a 1387 #define CAN_FM1R_FBM1 ((uint16_t)0x0002) /*!<Filter Init Mode bit 1 */
emilmont 77:869cf507173a 1388 #define CAN_FM1R_FBM2 ((uint16_t)0x0004) /*!<Filter Init Mode bit 2 */
emilmont 77:869cf507173a 1389 #define CAN_FM1R_FBM3 ((uint16_t)0x0008) /*!<Filter Init Mode bit 3 */
emilmont 77:869cf507173a 1390 #define CAN_FM1R_FBM4 ((uint16_t)0x0010) /*!<Filter Init Mode bit 4 */
emilmont 77:869cf507173a 1391 #define CAN_FM1R_FBM5 ((uint16_t)0x0020) /*!<Filter Init Mode bit 5 */
emilmont 77:869cf507173a 1392 #define CAN_FM1R_FBM6 ((uint16_t)0x0040) /*!<Filter Init Mode bit 6 */
emilmont 77:869cf507173a 1393 #define CAN_FM1R_FBM7 ((uint16_t)0x0080) /*!<Filter Init Mode bit 7 */
emilmont 77:869cf507173a 1394 #define CAN_FM1R_FBM8 ((uint16_t)0x0100) /*!<Filter Init Mode bit 8 */
emilmont 77:869cf507173a 1395 #define CAN_FM1R_FBM9 ((uint16_t)0x0200) /*!<Filter Init Mode bit 9 */
emilmont 77:869cf507173a 1396 #define CAN_FM1R_FBM10 ((uint16_t)0x0400) /*!<Filter Init Mode bit 10 */
emilmont 77:869cf507173a 1397 #define CAN_FM1R_FBM11 ((uint16_t)0x0800) /*!<Filter Init Mode bit 11 */
emilmont 77:869cf507173a 1398 #define CAN_FM1R_FBM12 ((uint16_t)0x1000) /*!<Filter Init Mode bit 12 */
emilmont 77:869cf507173a 1399 #define CAN_FM1R_FBM13 ((uint16_t)0x2000) /*!<Filter Init Mode bit 13 */
emilmont 77:869cf507173a 1400
emilmont 77:869cf507173a 1401 /******************* Bit definition for CAN_FS1R register *******************/
emilmont 77:869cf507173a 1402 #define CAN_FS1R_FSC ((uint16_t)0x3FFF) /*!<Filter Scale Configuration */
emilmont 77:869cf507173a 1403 #define CAN_FS1R_FSC0 ((uint16_t)0x0001) /*!<Filter Scale Configuration bit 0 */
emilmont 77:869cf507173a 1404 #define CAN_FS1R_FSC1 ((uint16_t)0x0002) /*!<Filter Scale Configuration bit 1 */
emilmont 77:869cf507173a 1405 #define CAN_FS1R_FSC2 ((uint16_t)0x0004) /*!<Filter Scale Configuration bit 2 */
emilmont 77:869cf507173a 1406 #define CAN_FS1R_FSC3 ((uint16_t)0x0008) /*!<Filter Scale Configuration bit 3 */
emilmont 77:869cf507173a 1407 #define CAN_FS1R_FSC4 ((uint16_t)0x0010) /*!<Filter Scale Configuration bit 4 */
emilmont 77:869cf507173a 1408 #define CAN_FS1R_FSC5 ((uint16_t)0x0020) /*!<Filter Scale Configuration bit 5 */
emilmont 77:869cf507173a 1409 #define CAN_FS1R_FSC6 ((uint16_t)0x0040) /*!<Filter Scale Configuration bit 6 */
emilmont 77:869cf507173a 1410 #define CAN_FS1R_FSC7 ((uint16_t)0x0080) /*!<Filter Scale Configuration bit 7 */
emilmont 77:869cf507173a 1411 #define CAN_FS1R_FSC8 ((uint16_t)0x0100) /*!<Filter Scale Configuration bit 8 */
emilmont 77:869cf507173a 1412 #define CAN_FS1R_FSC9 ((uint16_t)0x0200) /*!<Filter Scale Configuration bit 9 */
emilmont 77:869cf507173a 1413 #define CAN_FS1R_FSC10 ((uint16_t)0x0400) /*!<Filter Scale Configuration bit 10 */
emilmont 77:869cf507173a 1414 #define CAN_FS1R_FSC11 ((uint16_t)0x0800) /*!<Filter Scale Configuration bit 11 */
emilmont 77:869cf507173a 1415 #define CAN_FS1R_FSC12 ((uint16_t)0x1000) /*!<Filter Scale Configuration bit 12 */
emilmont 77:869cf507173a 1416 #define CAN_FS1R_FSC13 ((uint16_t)0x2000) /*!<Filter Scale Configuration bit 13 */
emilmont 77:869cf507173a 1417
emilmont 77:869cf507173a 1418 /****************** Bit definition for CAN_FFA1R register *******************/
emilmont 77:869cf507173a 1419 #define CAN_FFA1R_FFA ((uint16_t)0x3FFF) /*!<Filter FIFO Assignment */
emilmont 77:869cf507173a 1420 #define CAN_FFA1R_FFA0 ((uint16_t)0x0001) /*!<Filter FIFO Assignment for Filter 0 */
emilmont 77:869cf507173a 1421 #define CAN_FFA1R_FFA1 ((uint16_t)0x0002) /*!<Filter FIFO Assignment for Filter 1 */
emilmont 77:869cf507173a 1422 #define CAN_FFA1R_FFA2 ((uint16_t)0x0004) /*!<Filter FIFO Assignment for Filter 2 */
emilmont 77:869cf507173a 1423 #define CAN_FFA1R_FFA3 ((uint16_t)0x0008) /*!<Filter FIFO Assignment for Filter 3 */
emilmont 77:869cf507173a 1424 #define CAN_FFA1R_FFA4 ((uint16_t)0x0010) /*!<Filter FIFO Assignment for Filter 4 */
emilmont 77:869cf507173a 1425 #define CAN_FFA1R_FFA5 ((uint16_t)0x0020) /*!<Filter FIFO Assignment for Filter 5 */
emilmont 77:869cf507173a 1426 #define CAN_FFA1R_FFA6 ((uint16_t)0x0040) /*!<Filter FIFO Assignment for Filter 6 */
emilmont 77:869cf507173a 1427 #define CAN_FFA1R_FFA7 ((uint16_t)0x0080) /*!<Filter FIFO Assignment for Filter 7 */
emilmont 77:869cf507173a 1428 #define CAN_FFA1R_FFA8 ((uint16_t)0x0100) /*!<Filter FIFO Assignment for Filter 8 */
emilmont 77:869cf507173a 1429 #define CAN_FFA1R_FFA9 ((uint16_t)0x0200) /*!<Filter FIFO Assignment for Filter 9 */
emilmont 77:869cf507173a 1430 #define CAN_FFA1R_FFA10 ((uint16_t)0x0400) /*!<Filter FIFO Assignment for Filter 10 */
emilmont 77:869cf507173a 1431 #define CAN_FFA1R_FFA11 ((uint16_t)0x0800) /*!<Filter FIFO Assignment for Filter 11 */
emilmont 77:869cf507173a 1432 #define CAN_FFA1R_FFA12 ((uint16_t)0x1000) /*!<Filter FIFO Assignment for Filter 12 */
emilmont 77:869cf507173a 1433 #define CAN_FFA1R_FFA13 ((uint16_t)0x2000) /*!<Filter FIFO Assignment for Filter 13 */
emilmont 77:869cf507173a 1434
emilmont 77:869cf507173a 1435 /******************* Bit definition for CAN_FA1R register *******************/
emilmont 77:869cf507173a 1436 #define CAN_FA1R_FACT ((uint16_t)0x3FFF) /*!<Filter Active */
emilmont 77:869cf507173a 1437 #define CAN_FA1R_FACT0 ((uint16_t)0x0001) /*!<Filter 0 Active */
emilmont 77:869cf507173a 1438 #define CAN_FA1R_FACT1 ((uint16_t)0x0002) /*!<Filter 1 Active */
emilmont 77:869cf507173a 1439 #define CAN_FA1R_FACT2 ((uint16_t)0x0004) /*!<Filter 2 Active */
emilmont 77:869cf507173a 1440 #define CAN_FA1R_FACT3 ((uint16_t)0x0008) /*!<Filter 3 Active */
emilmont 77:869cf507173a 1441 #define CAN_FA1R_FACT4 ((uint16_t)0x0010) /*!<Filter 4 Active */
emilmont 77:869cf507173a 1442 #define CAN_FA1R_FACT5 ((uint16_t)0x0020) /*!<Filter 5 Active */
emilmont 77:869cf507173a 1443 #define CAN_FA1R_FACT6 ((uint16_t)0x0040) /*!<Filter 6 Active */
emilmont 77:869cf507173a 1444 #define CAN_FA1R_FACT7 ((uint16_t)0x0080) /*!<Filter 7 Active */
emilmont 77:869cf507173a 1445 #define CAN_FA1R_FACT8 ((uint16_t)0x0100) /*!<Filter 8 Active */
emilmont 77:869cf507173a 1446 #define CAN_FA1R_FACT9 ((uint16_t)0x0200) /*!<Filter 9 Active */
emilmont 77:869cf507173a 1447 #define CAN_FA1R_FACT10 ((uint16_t)0x0400) /*!<Filter 10 Active */
emilmont 77:869cf507173a 1448 #define CAN_FA1R_FACT11 ((uint16_t)0x0800) /*!<Filter 11 Active */
emilmont 77:869cf507173a 1449 #define CAN_FA1R_FACT12 ((uint16_t)0x1000) /*!<Filter 12 Active */
emilmont 77:869cf507173a 1450 #define CAN_FA1R_FACT13 ((uint16_t)0x2000) /*!<Filter 13 Active */
emilmont 77:869cf507173a 1451
emilmont 77:869cf507173a 1452 /******************* Bit definition for CAN_F0R1 register *******************/
emilmont 77:869cf507173a 1453 #define CAN_F0R1_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */
emilmont 77:869cf507173a 1454 #define CAN_F0R1_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */
emilmont 77:869cf507173a 1455 #define CAN_F0R1_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */
emilmont 77:869cf507173a 1456 #define CAN_F0R1_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */
emilmont 77:869cf507173a 1457 #define CAN_F0R1_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */
emilmont 77:869cf507173a 1458 #define CAN_F0R1_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */
emilmont 77:869cf507173a 1459 #define CAN_F0R1_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */
emilmont 77:869cf507173a 1460 #define CAN_F0R1_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */
emilmont 77:869cf507173a 1461 #define CAN_F0R1_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */
emilmont 77:869cf507173a 1462 #define CAN_F0R1_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */
emilmont 77:869cf507173a 1463 #define CAN_F0R1_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */
emilmont 77:869cf507173a 1464 #define CAN_F0R1_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */
emilmont 77:869cf507173a 1465 #define CAN_F0R1_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */
emilmont 77:869cf507173a 1466 #define CAN_F0R1_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */
emilmont 77:869cf507173a 1467 #define CAN_F0R1_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */
emilmont 77:869cf507173a 1468 #define CAN_F0R1_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */
emilmont 77:869cf507173a 1469 #define CAN_F0R1_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */
emilmont 77:869cf507173a 1470 #define CAN_F0R1_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */
emilmont 77:869cf507173a 1471 #define CAN_F0R1_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */
emilmont 77:869cf507173a 1472 #define CAN_F0R1_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */
emilmont 77:869cf507173a 1473 #define CAN_F0R1_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */
emilmont 77:869cf507173a 1474 #define CAN_F0R1_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */
emilmont 77:869cf507173a 1475 #define CAN_F0R1_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */
emilmont 77:869cf507173a 1476 #define CAN_F0R1_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */
emilmont 77:869cf507173a 1477 #define CAN_F0R1_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */
emilmont 77:869cf507173a 1478 #define CAN_F0R1_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */
emilmont 77:869cf507173a 1479 #define CAN_F0R1_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */
emilmont 77:869cf507173a 1480 #define CAN_F0R1_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */
emilmont 77:869cf507173a 1481 #define CAN_F0R1_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */
emilmont 77:869cf507173a 1482 #define CAN_F0R1_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */
emilmont 77:869cf507173a 1483 #define CAN_F0R1_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */
emilmont 77:869cf507173a 1484 #define CAN_F0R1_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */
emilmont 77:869cf507173a 1485
emilmont 77:869cf507173a 1486 /******************* Bit definition for CAN_F1R1 register *******************/
emilmont 77:869cf507173a 1487 #define CAN_F1R1_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */
emilmont 77:869cf507173a 1488 #define CAN_F1R1_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */
emilmont 77:869cf507173a 1489 #define CAN_F1R1_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */
emilmont 77:869cf507173a 1490 #define CAN_F1R1_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */
emilmont 77:869cf507173a 1491 #define CAN_F1R1_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */
emilmont 77:869cf507173a 1492 #define CAN_F1R1_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */
emilmont 77:869cf507173a 1493 #define CAN_F1R1_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */
emilmont 77:869cf507173a 1494 #define CAN_F1R1_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */
emilmont 77:869cf507173a 1495 #define CAN_F1R1_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */
emilmont 77:869cf507173a 1496 #define CAN_F1R1_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */
emilmont 77:869cf507173a 1497 #define CAN_F1R1_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */
emilmont 77:869cf507173a 1498 #define CAN_F1R1_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */
emilmont 77:869cf507173a 1499 #define CAN_F1R1_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */
emilmont 77:869cf507173a 1500 #define CAN_F1R1_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */
emilmont 77:869cf507173a 1501 #define CAN_F1R1_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */
emilmont 77:869cf507173a 1502 #define CAN_F1R1_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */
emilmont 77:869cf507173a 1503 #define CAN_F1R1_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */
emilmont 77:869cf507173a 1504 #define CAN_F1R1_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */
emilmont 77:869cf507173a 1505 #define CAN_F1R1_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */
emilmont 77:869cf507173a 1506 #define CAN_F1R1_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */
emilmont 77:869cf507173a 1507 #define CAN_F1R1_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */
emilmont 77:869cf507173a 1508 #define CAN_F1R1_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */
emilmont 77:869cf507173a 1509 #define CAN_F1R1_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */
emilmont 77:869cf507173a 1510 #define CAN_F1R1_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */
emilmont 77:869cf507173a 1511 #define CAN_F1R1_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */
emilmont 77:869cf507173a 1512 #define CAN_F1R1_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */
emilmont 77:869cf507173a 1513 #define CAN_F1R1_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */
emilmont 77:869cf507173a 1514 #define CAN_F1R1_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */
emilmont 77:869cf507173a 1515 #define CAN_F1R1_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */
emilmont 77:869cf507173a 1516 #define CAN_F1R1_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */
emilmont 77:869cf507173a 1517 #define CAN_F1R1_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */
emilmont 77:869cf507173a 1518 #define CAN_F1R1_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */
emilmont 77:869cf507173a 1519
emilmont 77:869cf507173a 1520 /******************* Bit definition for CAN_F2R1 register *******************/
emilmont 77:869cf507173a 1521 #define CAN_F2R1_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */
emilmont 77:869cf507173a 1522 #define CAN_F2R1_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */
emilmont 77:869cf507173a 1523 #define CAN_F2R1_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */
emilmont 77:869cf507173a 1524 #define CAN_F2R1_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */
emilmont 77:869cf507173a 1525 #define CAN_F2R1_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */
emilmont 77:869cf507173a 1526 #define CAN_F2R1_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */
emilmont 77:869cf507173a 1527 #define CAN_F2R1_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */
emilmont 77:869cf507173a 1528 #define CAN_F2R1_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */
emilmont 77:869cf507173a 1529 #define CAN_F2R1_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */
emilmont 77:869cf507173a 1530 #define CAN_F2R1_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */
emilmont 77:869cf507173a 1531 #define CAN_F2R1_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */
emilmont 77:869cf507173a 1532 #define CAN_F2R1_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */
emilmont 77:869cf507173a 1533 #define CAN_F2R1_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */
emilmont 77:869cf507173a 1534 #define CAN_F2R1_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */
emilmont 77:869cf507173a 1535 #define CAN_F2R1_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */
emilmont 77:869cf507173a 1536 #define CAN_F2R1_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */
emilmont 77:869cf507173a 1537 #define CAN_F2R1_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */
emilmont 77:869cf507173a 1538 #define CAN_F2R1_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */
emilmont 77:869cf507173a 1539 #define CAN_F2R1_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */
emilmont 77:869cf507173a 1540 #define CAN_F2R1_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */
emilmont 77:869cf507173a 1541 #define CAN_F2R1_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */
emilmont 77:869cf507173a 1542 #define CAN_F2R1_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */
emilmont 77:869cf507173a 1543 #define CAN_F2R1_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */
emilmont 77:869cf507173a 1544 #define CAN_F2R1_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */
emilmont 77:869cf507173a 1545 #define CAN_F2R1_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */
emilmont 77:869cf507173a 1546 #define CAN_F2R1_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */
emilmont 77:869cf507173a 1547 #define CAN_F2R1_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */
emilmont 77:869cf507173a 1548 #define CAN_F2R1_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */
emilmont 77:869cf507173a 1549 #define CAN_F2R1_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */
emilmont 77:869cf507173a 1550 #define CAN_F2R1_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */
emilmont 77:869cf507173a 1551 #define CAN_F2R1_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */
emilmont 77:869cf507173a 1552 #define CAN_F2R1_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */
emilmont 77:869cf507173a 1553
emilmont 77:869cf507173a 1554 /******************* Bit definition for CAN_F3R1 register *******************/
emilmont 77:869cf507173a 1555 #define CAN_F3R1_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */
emilmont 77:869cf507173a 1556 #define CAN_F3R1_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */
emilmont 77:869cf507173a 1557 #define CAN_F3R1_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */
emilmont 77:869cf507173a 1558 #define CAN_F3R1_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */
emilmont 77:869cf507173a 1559 #define CAN_F3R1_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */
emilmont 77:869cf507173a 1560 #define CAN_F3R1_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */
emilmont 77:869cf507173a 1561 #define CAN_F3R1_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */
emilmont 77:869cf507173a 1562 #define CAN_F3R1_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */
emilmont 77:869cf507173a 1563 #define CAN_F3R1_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */
emilmont 77:869cf507173a 1564 #define CAN_F3R1_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */
emilmont 77:869cf507173a 1565 #define CAN_F3R1_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */
emilmont 77:869cf507173a 1566 #define CAN_F3R1_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */
emilmont 77:869cf507173a 1567 #define CAN_F3R1_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */
emilmont 77:869cf507173a 1568 #define CAN_F3R1_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */
emilmont 77:869cf507173a 1569 #define CAN_F3R1_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */
emilmont 77:869cf507173a 1570 #define CAN_F3R1_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */
emilmont 77:869cf507173a 1571 #define CAN_F3R1_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */
emilmont 77:869cf507173a 1572 #define CAN_F3R1_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */
emilmont 77:869cf507173a 1573 #define CAN_F3R1_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */
emilmont 77:869cf507173a 1574 #define CAN_F3R1_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */
emilmont 77:869cf507173a 1575 #define CAN_F3R1_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */
emilmont 77:869cf507173a 1576 #define CAN_F3R1_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */
emilmont 77:869cf507173a 1577 #define CAN_F3R1_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */
emilmont 77:869cf507173a 1578 #define CAN_F3R1_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */
emilmont 77:869cf507173a 1579 #define CAN_F3R1_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */
emilmont 77:869cf507173a 1580 #define CAN_F3R1_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */
emilmont 77:869cf507173a 1581 #define CAN_F3R1_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */
emilmont 77:869cf507173a 1582 #define CAN_F3R1_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */
emilmont 77:869cf507173a 1583 #define CAN_F3R1_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */
emilmont 77:869cf507173a 1584 #define CAN_F3R1_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */
emilmont 77:869cf507173a 1585 #define CAN_F3R1_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */
emilmont 77:869cf507173a 1586 #define CAN_F3R1_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */
emilmont 77:869cf507173a 1587
emilmont 77:869cf507173a 1588 /******************* Bit definition for CAN_F4R1 register *******************/
emilmont 77:869cf507173a 1589 #define CAN_F4R1_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */
emilmont 77:869cf507173a 1590 #define CAN_F4R1_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */
emilmont 77:869cf507173a 1591 #define CAN_F4R1_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */
emilmont 77:869cf507173a 1592 #define CAN_F4R1_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */
emilmont 77:869cf507173a 1593 #define CAN_F4R1_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */
emilmont 77:869cf507173a 1594 #define CAN_F4R1_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */
emilmont 77:869cf507173a 1595 #define CAN_F4R1_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */
emilmont 77:869cf507173a 1596 #define CAN_F4R1_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */
emilmont 77:869cf507173a 1597 #define CAN_F4R1_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */
emilmont 77:869cf507173a 1598 #define CAN_F4R1_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */
emilmont 77:869cf507173a 1599 #define CAN_F4R1_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */
emilmont 77:869cf507173a 1600 #define CAN_F4R1_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */
emilmont 77:869cf507173a 1601 #define CAN_F4R1_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */
emilmont 77:869cf507173a 1602 #define CAN_F4R1_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */
emilmont 77:869cf507173a 1603 #define CAN_F4R1_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */
emilmont 77:869cf507173a 1604 #define CAN_F4R1_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */
emilmont 77:869cf507173a 1605 #define CAN_F4R1_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */
emilmont 77:869cf507173a 1606 #define CAN_F4R1_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */
emilmont 77:869cf507173a 1607 #define CAN_F4R1_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */
emilmont 77:869cf507173a 1608 #define CAN_F4R1_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */
emilmont 77:869cf507173a 1609 #define CAN_F4R1_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */
emilmont 77:869cf507173a 1610 #define CAN_F4R1_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */
emilmont 77:869cf507173a 1611 #define CAN_F4R1_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */
emilmont 77:869cf507173a 1612 #define CAN_F4R1_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */
emilmont 77:869cf507173a 1613 #define CAN_F4R1_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */
emilmont 77:869cf507173a 1614 #define CAN_F4R1_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */
emilmont 77:869cf507173a 1615 #define CAN_F4R1_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */
emilmont 77:869cf507173a 1616 #define CAN_F4R1_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */
emilmont 77:869cf507173a 1617 #define CAN_F4R1_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */
emilmont 77:869cf507173a 1618 #define CAN_F4R1_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */
emilmont 77:869cf507173a 1619 #define CAN_F4R1_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */
emilmont 77:869cf507173a 1620 #define CAN_F4R1_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */
emilmont 77:869cf507173a 1621
emilmont 77:869cf507173a 1622 /******************* Bit definition for CAN_F5R1 register *******************/
emilmont 77:869cf507173a 1623 #define CAN_F5R1_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */
emilmont 77:869cf507173a 1624 #define CAN_F5R1_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */
emilmont 77:869cf507173a 1625 #define CAN_F5R1_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */
emilmont 77:869cf507173a 1626 #define CAN_F5R1_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */
emilmont 77:869cf507173a 1627 #define CAN_F5R1_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */
emilmont 77:869cf507173a 1628 #define CAN_F5R1_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */
emilmont 77:869cf507173a 1629 #define CAN_F5R1_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */
emilmont 77:869cf507173a 1630 #define CAN_F5R1_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */
emilmont 77:869cf507173a 1631 #define CAN_F5R1_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */
emilmont 77:869cf507173a 1632 #define CAN_F5R1_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */
emilmont 77:869cf507173a 1633 #define CAN_F5R1_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */
emilmont 77:869cf507173a 1634 #define CAN_F5R1_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */
emilmont 77:869cf507173a 1635 #define CAN_F5R1_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */
emilmont 77:869cf507173a 1636 #define CAN_F5R1_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */
emilmont 77:869cf507173a 1637 #define CAN_F5R1_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */
emilmont 77:869cf507173a 1638 #define CAN_F5R1_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */
emilmont 77:869cf507173a 1639 #define CAN_F5R1_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */
emilmont 77:869cf507173a 1640 #define CAN_F5R1_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */
emilmont 77:869cf507173a 1641 #define CAN_F5R1_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */
emilmont 77:869cf507173a 1642 #define CAN_F5R1_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */
emilmont 77:869cf507173a 1643 #define CAN_F5R1_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */
emilmont 77:869cf507173a 1644 #define CAN_F5R1_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */
emilmont 77:869cf507173a 1645 #define CAN_F5R1_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */
emilmont 77:869cf507173a 1646 #define CAN_F5R1_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */
emilmont 77:869cf507173a 1647 #define CAN_F5R1_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */
emilmont 77:869cf507173a 1648 #define CAN_F5R1_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */
emilmont 77:869cf507173a 1649 #define CAN_F5R1_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */
emilmont 77:869cf507173a 1650 #define CAN_F5R1_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */
emilmont 77:869cf507173a 1651 #define CAN_F5R1_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */
emilmont 77:869cf507173a 1652 #define CAN_F5R1_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */
emilmont 77:869cf507173a 1653 #define CAN_F5R1_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */
emilmont 77:869cf507173a 1654 #define CAN_F5R1_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */
emilmont 77:869cf507173a 1655
emilmont 77:869cf507173a 1656 /******************* Bit definition for CAN_F6R1 register *******************/
emilmont 77:869cf507173a 1657 #define CAN_F6R1_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */
emilmont 77:869cf507173a 1658 #define CAN_F6R1_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */
emilmont 77:869cf507173a 1659 #define CAN_F6R1_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */
emilmont 77:869cf507173a 1660 #define CAN_F6R1_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */
emilmont 77:869cf507173a 1661 #define CAN_F6R1_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */
emilmont 77:869cf507173a 1662 #define CAN_F6R1_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */
emilmont 77:869cf507173a 1663 #define CAN_F6R1_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */
emilmont 77:869cf507173a 1664 #define CAN_F6R1_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */
emilmont 77:869cf507173a 1665 #define CAN_F6R1_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */
emilmont 77:869cf507173a 1666 #define CAN_F6R1_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */
emilmont 77:869cf507173a 1667 #define CAN_F6R1_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */
emilmont 77:869cf507173a 1668 #define CAN_F6R1_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */
emilmont 77:869cf507173a 1669 #define CAN_F6R1_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */
emilmont 77:869cf507173a 1670 #define CAN_F6R1_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */
emilmont 77:869cf507173a 1671 #define CAN_F6R1_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */
emilmont 77:869cf507173a 1672 #define CAN_F6R1_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */
emilmont 77:869cf507173a 1673 #define CAN_F6R1_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */
emilmont 77:869cf507173a 1674 #define CAN_F6R1_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */
emilmont 77:869cf507173a 1675 #define CAN_F6R1_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */
emilmont 77:869cf507173a 1676 #define CAN_F6R1_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */
emilmont 77:869cf507173a 1677 #define CAN_F6R1_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */
emilmont 77:869cf507173a 1678 #define CAN_F6R1_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */
emilmont 77:869cf507173a 1679 #define CAN_F6R1_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */
emilmont 77:869cf507173a 1680 #define CAN_F6R1_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */
emilmont 77:869cf507173a 1681 #define CAN_F6R1_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */
emilmont 77:869cf507173a 1682 #define CAN_F6R1_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */
emilmont 77:869cf507173a 1683 #define CAN_F6R1_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */
emilmont 77:869cf507173a 1684 #define CAN_F6R1_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */
emilmont 77:869cf507173a 1685 #define CAN_F6R1_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */
emilmont 77:869cf507173a 1686 #define CAN_F6R1_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */
emilmont 77:869cf507173a 1687 #define CAN_F6R1_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */
emilmont 77:869cf507173a 1688 #define CAN_F6R1_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */
emilmont 77:869cf507173a 1689
emilmont 77:869cf507173a 1690 /******************* Bit definition for CAN_F7R1 register *******************/
emilmont 77:869cf507173a 1691 #define CAN_F7R1_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */
emilmont 77:869cf507173a 1692 #define CAN_F7R1_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */
emilmont 77:869cf507173a 1693 #define CAN_F7R1_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */
emilmont 77:869cf507173a 1694 #define CAN_F7R1_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */
emilmont 77:869cf507173a 1695 #define CAN_F7R1_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */
emilmont 77:869cf507173a 1696 #define CAN_F7R1_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */
emilmont 77:869cf507173a 1697 #define CAN_F7R1_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */
emilmont 77:869cf507173a 1698 #define CAN_F7R1_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */
emilmont 77:869cf507173a 1699 #define CAN_F7R1_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */
emilmont 77:869cf507173a 1700 #define CAN_F7R1_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */
emilmont 77:869cf507173a 1701 #define CAN_F7R1_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */
emilmont 77:869cf507173a 1702 #define CAN_F7R1_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */
emilmont 77:869cf507173a 1703 #define CAN_F7R1_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */
emilmont 77:869cf507173a 1704 #define CAN_F7R1_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */
emilmont 77:869cf507173a 1705 #define CAN_F7R1_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */
emilmont 77:869cf507173a 1706 #define CAN_F7R1_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */
emilmont 77:869cf507173a 1707 #define CAN_F7R1_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */
emilmont 77:869cf507173a 1708 #define CAN_F7R1_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */
emilmont 77:869cf507173a 1709 #define CAN_F7R1_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */
emilmont 77:869cf507173a 1710 #define CAN_F7R1_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */
emilmont 77:869cf507173a 1711 #define CAN_F7R1_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */
emilmont 77:869cf507173a 1712 #define CAN_F7R1_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */
emilmont 77:869cf507173a 1713 #define CAN_F7R1_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */
emilmont 77:869cf507173a 1714 #define CAN_F7R1_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */
emilmont 77:869cf507173a 1715 #define CAN_F7R1_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */
emilmont 77:869cf507173a 1716 #define CAN_F7R1_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */
emilmont 77:869cf507173a 1717 #define CAN_F7R1_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */
emilmont 77:869cf507173a 1718 #define CAN_F7R1_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */
emilmont 77:869cf507173a 1719 #define CAN_F7R1_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */
emilmont 77:869cf507173a 1720 #define CAN_F7R1_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */
emilmont 77:869cf507173a 1721 #define CAN_F7R1_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */
emilmont 77:869cf507173a 1722 #define CAN_F7R1_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */
emilmont 77:869cf507173a 1723
emilmont 77:869cf507173a 1724 /******************* Bit definition for CAN_F8R1 register *******************/
emilmont 77:869cf507173a 1725 #define CAN_F8R1_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */
emilmont 77:869cf507173a 1726 #define CAN_F8R1_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */
emilmont 77:869cf507173a 1727 #define CAN_F8R1_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */
emilmont 77:869cf507173a 1728 #define CAN_F8R1_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */
emilmont 77:869cf507173a 1729 #define CAN_F8R1_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */
emilmont 77:869cf507173a 1730 #define CAN_F8R1_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */
emilmont 77:869cf507173a 1731 #define CAN_F8R1_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */
emilmont 77:869cf507173a 1732 #define CAN_F8R1_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */
emilmont 77:869cf507173a 1733 #define CAN_F8R1_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */
emilmont 77:869cf507173a 1734 #define CAN_F8R1_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */
emilmont 77:869cf507173a 1735 #define CAN_F8R1_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */
emilmont 77:869cf507173a 1736 #define CAN_F8R1_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */
emilmont 77:869cf507173a 1737 #define CAN_F8R1_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */
emilmont 77:869cf507173a 1738 #define CAN_F8R1_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */
emilmont 77:869cf507173a 1739 #define CAN_F8R1_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */
emilmont 77:869cf507173a 1740 #define CAN_F8R1_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */
emilmont 77:869cf507173a 1741 #define CAN_F8R1_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */
emilmont 77:869cf507173a 1742 #define CAN_F8R1_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */
emilmont 77:869cf507173a 1743 #define CAN_F8R1_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */
emilmont 77:869cf507173a 1744 #define CAN_F8R1_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */
emilmont 77:869cf507173a 1745 #define CAN_F8R1_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */
emilmont 77:869cf507173a 1746 #define CAN_F8R1_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */
emilmont 77:869cf507173a 1747 #define CAN_F8R1_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */
emilmont 77:869cf507173a 1748 #define CAN_F8R1_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */
emilmont 77:869cf507173a 1749 #define CAN_F8R1_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */
emilmont 77:869cf507173a 1750 #define CAN_F8R1_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */
emilmont 77:869cf507173a 1751 #define CAN_F8R1_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */
emilmont 77:869cf507173a 1752 #define CAN_F8R1_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */
emilmont 77:869cf507173a 1753 #define CAN_F8R1_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */
emilmont 77:869cf507173a 1754 #define CAN_F8R1_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */
emilmont 77:869cf507173a 1755 #define CAN_F8R1_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */
emilmont 77:869cf507173a 1756 #define CAN_F8R1_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */
emilmont 77:869cf507173a 1757
emilmont 77:869cf507173a 1758 /******************* Bit definition for CAN_F9R1 register *******************/
emilmont 77:869cf507173a 1759 #define CAN_F9R1_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */
emilmont 77:869cf507173a 1760 #define CAN_F9R1_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */
emilmont 77:869cf507173a 1761 #define CAN_F9R1_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */
emilmont 77:869cf507173a 1762 #define CAN_F9R1_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */
emilmont 77:869cf507173a 1763 #define CAN_F9R1_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */
emilmont 77:869cf507173a 1764 #define CAN_F9R1_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */
emilmont 77:869cf507173a 1765 #define CAN_F9R1_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */
emilmont 77:869cf507173a 1766 #define CAN_F9R1_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */
emilmont 77:869cf507173a 1767 #define CAN_F9R1_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */
emilmont 77:869cf507173a 1768 #define CAN_F9R1_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */
emilmont 77:869cf507173a 1769 #define CAN_F9R1_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */
emilmont 77:869cf507173a 1770 #define CAN_F9R1_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */
emilmont 77:869cf507173a 1771 #define CAN_F9R1_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */
emilmont 77:869cf507173a 1772 #define CAN_F9R1_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */
emilmont 77:869cf507173a 1773 #define CAN_F9R1_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */
emilmont 77:869cf507173a 1774 #define CAN_F9R1_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */
emilmont 77:869cf507173a 1775 #define CAN_F9R1_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */
emilmont 77:869cf507173a 1776 #define CAN_F9R1_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */
emilmont 77:869cf507173a 1777 #define CAN_F9R1_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */
emilmont 77:869cf507173a 1778 #define CAN_F9R1_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */
emilmont 77:869cf507173a 1779 #define CAN_F9R1_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */
emilmont 77:869cf507173a 1780 #define CAN_F9R1_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */
emilmont 77:869cf507173a 1781 #define CAN_F9R1_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */
emilmont 77:869cf507173a 1782 #define CAN_F9R1_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */
emilmont 77:869cf507173a 1783 #define CAN_F9R1_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */
emilmont 77:869cf507173a 1784 #define CAN_F9R1_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */
emilmont 77:869cf507173a 1785 #define CAN_F9R1_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */
emilmont 77:869cf507173a 1786 #define CAN_F9R1_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */
emilmont 77:869cf507173a 1787 #define CAN_F9R1_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */
emilmont 77:869cf507173a 1788 #define CAN_F9R1_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */
emilmont 77:869cf507173a 1789 #define CAN_F9R1_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */
emilmont 77:869cf507173a 1790 #define CAN_F9R1_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */
emilmont 77:869cf507173a 1791
emilmont 77:869cf507173a 1792 /******************* Bit definition for CAN_F10R1 register ******************/
emilmont 77:869cf507173a 1793 #define CAN_F10R1_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */
emilmont 77:869cf507173a 1794 #define CAN_F10R1_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */
emilmont 77:869cf507173a 1795 #define CAN_F10R1_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */
emilmont 77:869cf507173a 1796 #define CAN_F10R1_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */
emilmont 77:869cf507173a 1797 #define CAN_F10R1_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */
emilmont 77:869cf507173a 1798 #define CAN_F10R1_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */
emilmont 77:869cf507173a 1799 #define CAN_F10R1_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */
emilmont 77:869cf507173a 1800 #define CAN_F10R1_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */
emilmont 77:869cf507173a 1801 #define CAN_F10R1_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */
emilmont 77:869cf507173a 1802 #define CAN_F10R1_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */
emilmont 77:869cf507173a 1803 #define CAN_F10R1_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */
emilmont 77:869cf507173a 1804 #define CAN_F10R1_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */
emilmont 77:869cf507173a 1805 #define CAN_F10R1_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */
emilmont 77:869cf507173a 1806 #define CAN_F10R1_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */
emilmont 77:869cf507173a 1807 #define CAN_F10R1_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */
emilmont 77:869cf507173a 1808 #define CAN_F10R1_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */
emilmont 77:869cf507173a 1809 #define CAN_F10R1_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */
emilmont 77:869cf507173a 1810 #define CAN_F10R1_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */
emilmont 77:869cf507173a 1811 #define CAN_F10R1_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */
emilmont 77:869cf507173a 1812 #define CAN_F10R1_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */
emilmont 77:869cf507173a 1813 #define CAN_F10R1_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */
emilmont 77:869cf507173a 1814 #define CAN_F10R1_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */
emilmont 77:869cf507173a 1815 #define CAN_F10R1_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */
emilmont 77:869cf507173a 1816 #define CAN_F10R1_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */
emilmont 77:869cf507173a 1817 #define CAN_F10R1_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */
emilmont 77:869cf507173a 1818 #define CAN_F10R1_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */
emilmont 77:869cf507173a 1819 #define CAN_F10R1_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */
emilmont 77:869cf507173a 1820 #define CAN_F10R1_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */
emilmont 77:869cf507173a 1821 #define CAN_F10R1_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */
emilmont 77:869cf507173a 1822 #define CAN_F10R1_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */
emilmont 77:869cf507173a 1823 #define CAN_F10R1_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */
emilmont 77:869cf507173a 1824 #define CAN_F10R1_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */
emilmont 77:869cf507173a 1825
emilmont 77:869cf507173a 1826 /******************* Bit definition for CAN_F11R1 register ******************/
emilmont 77:869cf507173a 1827 #define CAN_F11R1_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */
emilmont 77:869cf507173a 1828 #define CAN_F11R1_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */
emilmont 77:869cf507173a 1829 #define CAN_F11R1_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */
emilmont 77:869cf507173a 1830 #define CAN_F11R1_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */
emilmont 77:869cf507173a 1831 #define CAN_F11R1_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */
emilmont 77:869cf507173a 1832 #define CAN_F11R1_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */
emilmont 77:869cf507173a 1833 #define CAN_F11R1_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */
emilmont 77:869cf507173a 1834 #define CAN_F11R1_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */
emilmont 77:869cf507173a 1835 #define CAN_F11R1_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */
emilmont 77:869cf507173a 1836 #define CAN_F11R1_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */
emilmont 77:869cf507173a 1837 #define CAN_F11R1_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */
emilmont 77:869cf507173a 1838 #define CAN_F11R1_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */
emilmont 77:869cf507173a 1839 #define CAN_F11R1_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */
emilmont 77:869cf507173a 1840 #define CAN_F11R1_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */
emilmont 77:869cf507173a 1841 #define CAN_F11R1_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */
emilmont 77:869cf507173a 1842 #define CAN_F11R1_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */
emilmont 77:869cf507173a 1843 #define CAN_F11R1_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */
emilmont 77:869cf507173a 1844 #define CAN_F11R1_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */
emilmont 77:869cf507173a 1845 #define CAN_F11R1_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */
emilmont 77:869cf507173a 1846 #define CAN_F11R1_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */
emilmont 77:869cf507173a 1847 #define CAN_F11R1_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */
emilmont 77:869cf507173a 1848 #define CAN_F11R1_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */
emilmont 77:869cf507173a 1849 #define CAN_F11R1_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */
emilmont 77:869cf507173a 1850 #define CAN_F11R1_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */
emilmont 77:869cf507173a 1851 #define CAN_F11R1_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */
emilmont 77:869cf507173a 1852 #define CAN_F11R1_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */
emilmont 77:869cf507173a 1853 #define CAN_F11R1_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */
emilmont 77:869cf507173a 1854 #define CAN_F11R1_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */
emilmont 77:869cf507173a 1855 #define CAN_F11R1_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */
emilmont 77:869cf507173a 1856 #define CAN_F11R1_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */
emilmont 77:869cf507173a 1857 #define CAN_F11R1_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */
emilmont 77:869cf507173a 1858 #define CAN_F11R1_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */
emilmont 77:869cf507173a 1859
emilmont 77:869cf507173a 1860 /******************* Bit definition for CAN_F12R1 register ******************/
emilmont 77:869cf507173a 1861 #define CAN_F12R1_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */
emilmont 77:869cf507173a 1862 #define CAN_F12R1_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */
emilmont 77:869cf507173a 1863 #define CAN_F12R1_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */
emilmont 77:869cf507173a 1864 #define CAN_F12R1_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */
emilmont 77:869cf507173a 1865 #define CAN_F12R1_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */
emilmont 77:869cf507173a 1866 #define CAN_F12R1_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */
emilmont 77:869cf507173a 1867 #define CAN_F12R1_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */
emilmont 77:869cf507173a 1868 #define CAN_F12R1_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */
emilmont 77:869cf507173a 1869 #define CAN_F12R1_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */
emilmont 77:869cf507173a 1870 #define CAN_F12R1_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */
emilmont 77:869cf507173a 1871 #define CAN_F12R1_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */
emilmont 77:869cf507173a 1872 #define CAN_F12R1_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */
emilmont 77:869cf507173a 1873 #define CAN_F12R1_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */
emilmont 77:869cf507173a 1874 #define CAN_F12R1_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */
emilmont 77:869cf507173a 1875 #define CAN_F12R1_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */
emilmont 77:869cf507173a 1876 #define CAN_F12R1_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */
emilmont 77:869cf507173a 1877 #define CAN_F12R1_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */
emilmont 77:869cf507173a 1878 #define CAN_F12R1_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */
emilmont 77:869cf507173a 1879 #define CAN_F12R1_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */
emilmont 77:869cf507173a 1880 #define CAN_F12R1_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */
emilmont 77:869cf507173a 1881 #define CAN_F12R1_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */
emilmont 77:869cf507173a 1882 #define CAN_F12R1_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */
emilmont 77:869cf507173a 1883 #define CAN_F12R1_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */
emilmont 77:869cf507173a 1884 #define CAN_F12R1_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */
emilmont 77:869cf507173a 1885 #define CAN_F12R1_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */
emilmont 77:869cf507173a 1886 #define CAN_F12R1_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */
emilmont 77:869cf507173a 1887 #define CAN_F12R1_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */
emilmont 77:869cf507173a 1888 #define CAN_F12R1_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */
emilmont 77:869cf507173a 1889 #define CAN_F12R1_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */
emilmont 77:869cf507173a 1890 #define CAN_F12R1_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */
emilmont 77:869cf507173a 1891 #define CAN_F12R1_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */
emilmont 77:869cf507173a 1892 #define CAN_F12R1_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */
emilmont 77:869cf507173a 1893
emilmont 77:869cf507173a 1894 /******************* Bit definition for CAN_F13R1 register ******************/
emilmont 77:869cf507173a 1895 #define CAN_F13R1_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */
emilmont 77:869cf507173a 1896 #define CAN_F13R1_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */
emilmont 77:869cf507173a 1897 #define CAN_F13R1_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */
emilmont 77:869cf507173a 1898 #define CAN_F13R1_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */
emilmont 77:869cf507173a 1899 #define CAN_F13R1_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */
emilmont 77:869cf507173a 1900 #define CAN_F13R1_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */
emilmont 77:869cf507173a 1901 #define CAN_F13R1_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */
emilmont 77:869cf507173a 1902 #define CAN_F13R1_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */
emilmont 77:869cf507173a 1903 #define CAN_F13R1_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */
emilmont 77:869cf507173a 1904 #define CAN_F13R1_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */
emilmont 77:869cf507173a 1905 #define CAN_F13R1_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */
emilmont 77:869cf507173a 1906 #define CAN_F13R1_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */
emilmont 77:869cf507173a 1907 #define CAN_F13R1_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */
emilmont 77:869cf507173a 1908 #define CAN_F13R1_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */
emilmont 77:869cf507173a 1909 #define CAN_F13R1_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */
emilmont 77:869cf507173a 1910 #define CAN_F13R1_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */
emilmont 77:869cf507173a 1911 #define CAN_F13R1_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */
emilmont 77:869cf507173a 1912 #define CAN_F13R1_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */
emilmont 77:869cf507173a 1913 #define CAN_F13R1_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */
emilmont 77:869cf507173a 1914 #define CAN_F13R1_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */
emilmont 77:869cf507173a 1915 #define CAN_F13R1_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */
emilmont 77:869cf507173a 1916 #define CAN_F13R1_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */
emilmont 77:869cf507173a 1917 #define CAN_F13R1_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */
emilmont 77:869cf507173a 1918 #define CAN_F13R1_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */
emilmont 77:869cf507173a 1919 #define CAN_F13R1_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */
emilmont 77:869cf507173a 1920 #define CAN_F13R1_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */
emilmont 77:869cf507173a 1921 #define CAN_F13R1_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */
emilmont 77:869cf507173a 1922 #define CAN_F13R1_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */
emilmont 77:869cf507173a 1923 #define CAN_F13R1_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */
emilmont 77:869cf507173a 1924 #define CAN_F13R1_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */
emilmont 77:869cf507173a 1925 #define CAN_F13R1_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */
emilmont 77:869cf507173a 1926 #define CAN_F13R1_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */
emilmont 77:869cf507173a 1927
emilmont 77:869cf507173a 1928 /******************* Bit definition for CAN_F0R2 register *******************/
emilmont 77:869cf507173a 1929 #define CAN_F0R2_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */
emilmont 77:869cf507173a 1930 #define CAN_F0R2_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */
emilmont 77:869cf507173a 1931 #define CAN_F0R2_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */
emilmont 77:869cf507173a 1932 #define CAN_F0R2_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */
emilmont 77:869cf507173a 1933 #define CAN_F0R2_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */
emilmont 77:869cf507173a 1934 #define CAN_F0R2_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */
emilmont 77:869cf507173a 1935 #define CAN_F0R2_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */
emilmont 77:869cf507173a 1936 #define CAN_F0R2_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */
emilmont 77:869cf507173a 1937 #define CAN_F0R2_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */
emilmont 77:869cf507173a 1938 #define CAN_F0R2_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */
emilmont 77:869cf507173a 1939 #define CAN_F0R2_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */
emilmont 77:869cf507173a 1940 #define CAN_F0R2_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */
emilmont 77:869cf507173a 1941 #define CAN_F0R2_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */
emilmont 77:869cf507173a 1942 #define CAN_F0R2_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */
emilmont 77:869cf507173a 1943 #define CAN_F0R2_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */
emilmont 77:869cf507173a 1944 #define CAN_F0R2_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */
emilmont 77:869cf507173a 1945 #define CAN_F0R2_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */
emilmont 77:869cf507173a 1946 #define CAN_F0R2_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */
emilmont 77:869cf507173a 1947 #define CAN_F0R2_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */
emilmont 77:869cf507173a 1948 #define CAN_F0R2_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */
emilmont 77:869cf507173a 1949 #define CAN_F0R2_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */
emilmont 77:869cf507173a 1950 #define CAN_F0R2_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */
emilmont 77:869cf507173a 1951 #define CAN_F0R2_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */
emilmont 77:869cf507173a 1952 #define CAN_F0R2_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */
emilmont 77:869cf507173a 1953 #define CAN_F0R2_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */
emilmont 77:869cf507173a 1954 #define CAN_F0R2_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */
emilmont 77:869cf507173a 1955 #define CAN_F0R2_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */
emilmont 77:869cf507173a 1956 #define CAN_F0R2_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */
emilmont 77:869cf507173a 1957 #define CAN_F0R2_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */
emilmont 77:869cf507173a 1958 #define CAN_F0R2_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */
emilmont 77:869cf507173a 1959 #define CAN_F0R2_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */
emilmont 77:869cf507173a 1960 #define CAN_F0R2_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */
emilmont 77:869cf507173a 1961
emilmont 77:869cf507173a 1962 /******************* Bit definition for CAN_F1R2 register *******************/
emilmont 77:869cf507173a 1963 #define CAN_F1R2_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */
emilmont 77:869cf507173a 1964 #define CAN_F1R2_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */
emilmont 77:869cf507173a 1965 #define CAN_F1R2_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */
emilmont 77:869cf507173a 1966 #define CAN_F1R2_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */
emilmont 77:869cf507173a 1967 #define CAN_F1R2_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */
emilmont 77:869cf507173a 1968 #define CAN_F1R2_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */
emilmont 77:869cf507173a 1969 #define CAN_F1R2_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */
emilmont 77:869cf507173a 1970 #define CAN_F1R2_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */
emilmont 77:869cf507173a 1971 #define CAN_F1R2_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */
emilmont 77:869cf507173a 1972 #define CAN_F1R2_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */
emilmont 77:869cf507173a 1973 #define CAN_F1R2_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */
emilmont 77:869cf507173a 1974 #define CAN_F1R2_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */
emilmont 77:869cf507173a 1975 #define CAN_F1R2_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */
emilmont 77:869cf507173a 1976 #define CAN_F1R2_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */
emilmont 77:869cf507173a 1977 #define CAN_F1R2_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */
emilmont 77:869cf507173a 1978 #define CAN_F1R2_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */
emilmont 77:869cf507173a 1979 #define CAN_F1R2_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */
emilmont 77:869cf507173a 1980 #define CAN_F1R2_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */
emilmont 77:869cf507173a 1981 #define CAN_F1R2_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */
emilmont 77:869cf507173a 1982 #define CAN_F1R2_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */
emilmont 77:869cf507173a 1983 #define CAN_F1R2_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */
emilmont 77:869cf507173a 1984 #define CAN_F1R2_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */
emilmont 77:869cf507173a 1985 #define CAN_F1R2_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */
emilmont 77:869cf507173a 1986 #define CAN_F1R2_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */
emilmont 77:869cf507173a 1987 #define CAN_F1R2_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */
emilmont 77:869cf507173a 1988 #define CAN_F1R2_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */
emilmont 77:869cf507173a 1989 #define CAN_F1R2_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */
emilmont 77:869cf507173a 1990 #define CAN_F1R2_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */
emilmont 77:869cf507173a 1991 #define CAN_F1R2_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */
emilmont 77:869cf507173a 1992 #define CAN_F1R2_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */
emilmont 77:869cf507173a 1993 #define CAN_F1R2_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */
emilmont 77:869cf507173a 1994 #define CAN_F1R2_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */
emilmont 77:869cf507173a 1995
emilmont 77:869cf507173a 1996 /******************* Bit definition for CAN_F2R2 register *******************/
emilmont 77:869cf507173a 1997 #define CAN_F2R2_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */
emilmont 77:869cf507173a 1998 #define CAN_F2R2_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */
emilmont 77:869cf507173a 1999 #define CAN_F2R2_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */
emilmont 77:869cf507173a 2000 #define CAN_F2R2_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */
emilmont 77:869cf507173a 2001 #define CAN_F2R2_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */
emilmont 77:869cf507173a 2002 #define CAN_F2R2_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */
emilmont 77:869cf507173a 2003 #define CAN_F2R2_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */
emilmont 77:869cf507173a 2004 #define CAN_F2R2_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */
emilmont 77:869cf507173a 2005 #define CAN_F2R2_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */
emilmont 77:869cf507173a 2006 #define CAN_F2R2_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */
emilmont 77:869cf507173a 2007 #define CAN_F2R2_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */
emilmont 77:869cf507173a 2008 #define CAN_F2R2_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */
emilmont 77:869cf507173a 2009 #define CAN_F2R2_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */
emilmont 77:869cf507173a 2010 #define CAN_F2R2_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */
emilmont 77:869cf507173a 2011 #define CAN_F2R2_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */
emilmont 77:869cf507173a 2012 #define CAN_F2R2_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */
emilmont 77:869cf507173a 2013 #define CAN_F2R2_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */
emilmont 77:869cf507173a 2014 #define CAN_F2R2_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */
emilmont 77:869cf507173a 2015 #define CAN_F2R2_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */
emilmont 77:869cf507173a 2016 #define CAN_F2R2_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */
emilmont 77:869cf507173a 2017 #define CAN_F2R2_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */
emilmont 77:869cf507173a 2018 #define CAN_F2R2_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */
emilmont 77:869cf507173a 2019 #define CAN_F2R2_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */
emilmont 77:869cf507173a 2020 #define CAN_F2R2_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */
emilmont 77:869cf507173a 2021 #define CAN_F2R2_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */
emilmont 77:869cf507173a 2022 #define CAN_F2R2_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */
emilmont 77:869cf507173a 2023 #define CAN_F2R2_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */
emilmont 77:869cf507173a 2024 #define CAN_F2R2_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */
emilmont 77:869cf507173a 2025 #define CAN_F2R2_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */
emilmont 77:869cf507173a 2026 #define CAN_F2R2_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */
emilmont 77:869cf507173a 2027 #define CAN_F2R2_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */
emilmont 77:869cf507173a 2028 #define CAN_F2R2_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */
emilmont 77:869cf507173a 2029
emilmont 77:869cf507173a 2030 /******************* Bit definition for CAN_F3R2 register *******************/
emilmont 77:869cf507173a 2031 #define CAN_F3R2_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */
emilmont 77:869cf507173a 2032 #define CAN_F3R2_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */
emilmont 77:869cf507173a 2033 #define CAN_F3R2_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */
emilmont 77:869cf507173a 2034 #define CAN_F3R2_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */
emilmont 77:869cf507173a 2035 #define CAN_F3R2_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */
emilmont 77:869cf507173a 2036 #define CAN_F3R2_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */
emilmont 77:869cf507173a 2037 #define CAN_F3R2_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */
emilmont 77:869cf507173a 2038 #define CAN_F3R2_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */
emilmont 77:869cf507173a 2039 #define CAN_F3R2_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */
emilmont 77:869cf507173a 2040 #define CAN_F3R2_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */
emilmont 77:869cf507173a 2041 #define CAN_F3R2_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */
emilmont 77:869cf507173a 2042 #define CAN_F3R2_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */
emilmont 77:869cf507173a 2043 #define CAN_F3R2_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */
emilmont 77:869cf507173a 2044 #define CAN_F3R2_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */
emilmont 77:869cf507173a 2045 #define CAN_F3R2_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */
emilmont 77:869cf507173a 2046 #define CAN_F3R2_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */
emilmont 77:869cf507173a 2047 #define CAN_F3R2_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */
emilmont 77:869cf507173a 2048 #define CAN_F3R2_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */
emilmont 77:869cf507173a 2049 #define CAN_F3R2_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */
emilmont 77:869cf507173a 2050 #define CAN_F3R2_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */
emilmont 77:869cf507173a 2051 #define CAN_F3R2_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */
emilmont 77:869cf507173a 2052 #define CAN_F3R2_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */
emilmont 77:869cf507173a 2053 #define CAN_F3R2_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */
emilmont 77:869cf507173a 2054 #define CAN_F3R2_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */
emilmont 77:869cf507173a 2055 #define CAN_F3R2_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */
emilmont 77:869cf507173a 2056 #define CAN_F3R2_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */
emilmont 77:869cf507173a 2057 #define CAN_F3R2_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */
emilmont 77:869cf507173a 2058 #define CAN_F3R2_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */
emilmont 77:869cf507173a 2059 #define CAN_F3R2_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */
emilmont 77:869cf507173a 2060 #define CAN_F3R2_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */
emilmont 77:869cf507173a 2061 #define CAN_F3R2_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */
emilmont 77:869cf507173a 2062 #define CAN_F3R2_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */
emilmont 77:869cf507173a 2063
emilmont 77:869cf507173a 2064 /******************* Bit definition for CAN_F4R2 register *******************/
emilmont 77:869cf507173a 2065 #define CAN_F4R2_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */
emilmont 77:869cf507173a 2066 #define CAN_F4R2_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */
emilmont 77:869cf507173a 2067 #define CAN_F4R2_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */
emilmont 77:869cf507173a 2068 #define CAN_F4R2_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */
emilmont 77:869cf507173a 2069 #define CAN_F4R2_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */
emilmont 77:869cf507173a 2070 #define CAN_F4R2_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */
emilmont 77:869cf507173a 2071 #define CAN_F4R2_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */
emilmont 77:869cf507173a 2072 #define CAN_F4R2_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */
emilmont 77:869cf507173a 2073 #define CAN_F4R2_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */
emilmont 77:869cf507173a 2074 #define CAN_F4R2_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */
emilmont 77:869cf507173a 2075 #define CAN_F4R2_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */
emilmont 77:869cf507173a 2076 #define CAN_F4R2_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */
emilmont 77:869cf507173a 2077 #define CAN_F4R2_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */
emilmont 77:869cf507173a 2078 #define CAN_F4R2_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */
emilmont 77:869cf507173a 2079 #define CAN_F4R2_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */
emilmont 77:869cf507173a 2080 #define CAN_F4R2_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */
emilmont 77:869cf507173a 2081 #define CAN_F4R2_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */
emilmont 77:869cf507173a 2082 #define CAN_F4R2_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */
emilmont 77:869cf507173a 2083 #define CAN_F4R2_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */
emilmont 77:869cf507173a 2084 #define CAN_F4R2_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */
emilmont 77:869cf507173a 2085 #define CAN_F4R2_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */
emilmont 77:869cf507173a 2086 #define CAN_F4R2_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */
emilmont 77:869cf507173a 2087 #define CAN_F4R2_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */
emilmont 77:869cf507173a 2088 #define CAN_F4R2_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */
emilmont 77:869cf507173a 2089 #define CAN_F4R2_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */
emilmont 77:869cf507173a 2090 #define CAN_F4R2_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */
emilmont 77:869cf507173a 2091 #define CAN_F4R2_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */
emilmont 77:869cf507173a 2092 #define CAN_F4R2_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */
emilmont 77:869cf507173a 2093 #define CAN_F4R2_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */
emilmont 77:869cf507173a 2094 #define CAN_F4R2_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */
emilmont 77:869cf507173a 2095 #define CAN_F4R2_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */
emilmont 77:869cf507173a 2096 #define CAN_F4R2_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */
emilmont 77:869cf507173a 2097
emilmont 77:869cf507173a 2098 /******************* Bit definition for CAN_F5R2 register *******************/
emilmont 77:869cf507173a 2099 #define CAN_F5R2_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */
emilmont 77:869cf507173a 2100 #define CAN_F5R2_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */
emilmont 77:869cf507173a 2101 #define CAN_F5R2_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */
emilmont 77:869cf507173a 2102 #define CAN_F5R2_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */
emilmont 77:869cf507173a 2103 #define CAN_F5R2_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */
emilmont 77:869cf507173a 2104 #define CAN_F5R2_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */
emilmont 77:869cf507173a 2105 #define CAN_F5R2_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */
emilmont 77:869cf507173a 2106 #define CAN_F5R2_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */
emilmont 77:869cf507173a 2107 #define CAN_F5R2_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */
emilmont 77:869cf507173a 2108 #define CAN_F5R2_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */
emilmont 77:869cf507173a 2109 #define CAN_F5R2_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */
emilmont 77:869cf507173a 2110 #define CAN_F5R2_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */
emilmont 77:869cf507173a 2111 #define CAN_F5R2_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */
emilmont 77:869cf507173a 2112 #define CAN_F5R2_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */
emilmont 77:869cf507173a 2113 #define CAN_F5R2_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */
emilmont 77:869cf507173a 2114 #define CAN_F5R2_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */
emilmont 77:869cf507173a 2115 #define CAN_F5R2_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */
emilmont 77:869cf507173a 2116 #define CAN_F5R2_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */
emilmont 77:869cf507173a 2117 #define CAN_F5R2_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */
emilmont 77:869cf507173a 2118 #define CAN_F5R2_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */
emilmont 77:869cf507173a 2119 #define CAN_F5R2_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */
emilmont 77:869cf507173a 2120 #define CAN_F5R2_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */
emilmont 77:869cf507173a 2121 #define CAN_F5R2_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */
emilmont 77:869cf507173a 2122 #define CAN_F5R2_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */
emilmont 77:869cf507173a 2123 #define CAN_F5R2_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */
emilmont 77:869cf507173a 2124 #define CAN_F5R2_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */
emilmont 77:869cf507173a 2125 #define CAN_F5R2_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */
emilmont 77:869cf507173a 2126 #define CAN_F5R2_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */
emilmont 77:869cf507173a 2127 #define CAN_F5R2_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */
emilmont 77:869cf507173a 2128 #define CAN_F5R2_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */
emilmont 77:869cf507173a 2129 #define CAN_F5R2_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */
emilmont 77:869cf507173a 2130 #define CAN_F5R2_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */
emilmont 77:869cf507173a 2131
emilmont 77:869cf507173a 2132 /******************* Bit definition for CAN_F6R2 register *******************/
emilmont 77:869cf507173a 2133 #define CAN_F6R2_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */
emilmont 77:869cf507173a 2134 #define CAN_F6R2_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */
emilmont 77:869cf507173a 2135 #define CAN_F6R2_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */
emilmont 77:869cf507173a 2136 #define CAN_F6R2_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */
emilmont 77:869cf507173a 2137 #define CAN_F6R2_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */
emilmont 77:869cf507173a 2138 #define CAN_F6R2_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */
emilmont 77:869cf507173a 2139 #define CAN_F6R2_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */
emilmont 77:869cf507173a 2140 #define CAN_F6R2_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */
emilmont 77:869cf507173a 2141 #define CAN_F6R2_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */
emilmont 77:869cf507173a 2142 #define CAN_F6R2_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */
emilmont 77:869cf507173a 2143 #define CAN_F6R2_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */
emilmont 77:869cf507173a 2144 #define CAN_F6R2_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */
emilmont 77:869cf507173a 2145 #define CAN_F6R2_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */
emilmont 77:869cf507173a 2146 #define CAN_F6R2_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */
emilmont 77:869cf507173a 2147 #define CAN_F6R2_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */
emilmont 77:869cf507173a 2148 #define CAN_F6R2_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */
emilmont 77:869cf507173a 2149 #define CAN_F6R2_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */
emilmont 77:869cf507173a 2150 #define CAN_F6R2_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */
emilmont 77:869cf507173a 2151 #define CAN_F6R2_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */
emilmont 77:869cf507173a 2152 #define CAN_F6R2_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */
emilmont 77:869cf507173a 2153 #define CAN_F6R2_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */
emilmont 77:869cf507173a 2154 #define CAN_F6R2_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */
emilmont 77:869cf507173a 2155 #define CAN_F6R2_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */
emilmont 77:869cf507173a 2156 #define CAN_F6R2_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */
emilmont 77:869cf507173a 2157 #define CAN_F6R2_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */
emilmont 77:869cf507173a 2158 #define CAN_F6R2_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */
emilmont 77:869cf507173a 2159 #define CAN_F6R2_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */
emilmont 77:869cf507173a 2160 #define CAN_F6R2_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */
emilmont 77:869cf507173a 2161 #define CAN_F6R2_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */
emilmont 77:869cf507173a 2162 #define CAN_F6R2_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */
emilmont 77:869cf507173a 2163 #define CAN_F6R2_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */
emilmont 77:869cf507173a 2164 #define CAN_F6R2_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */
emilmont 77:869cf507173a 2165
emilmont 77:869cf507173a 2166 /******************* Bit definition for CAN_F7R2 register *******************/
emilmont 77:869cf507173a 2167 #define CAN_F7R2_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */
emilmont 77:869cf507173a 2168 #define CAN_F7R2_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */
emilmont 77:869cf507173a 2169 #define CAN_F7R2_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */
emilmont 77:869cf507173a 2170 #define CAN_F7R2_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */
emilmont 77:869cf507173a 2171 #define CAN_F7R2_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */
emilmont 77:869cf507173a 2172 #define CAN_F7R2_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */
emilmont 77:869cf507173a 2173 #define CAN_F7R2_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */
emilmont 77:869cf507173a 2174 #define CAN_F7R2_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */
emilmont 77:869cf507173a 2175 #define CAN_F7R2_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */
emilmont 77:869cf507173a 2176 #define CAN_F7R2_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */
emilmont 77:869cf507173a 2177 #define CAN_F7R2_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */
emilmont 77:869cf507173a 2178 #define CAN_F7R2_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */
emilmont 77:869cf507173a 2179 #define CAN_F7R2_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */
emilmont 77:869cf507173a 2180 #define CAN_F7R2_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */
emilmont 77:869cf507173a 2181 #define CAN_F7R2_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */
emilmont 77:869cf507173a 2182 #define CAN_F7R2_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */
emilmont 77:869cf507173a 2183 #define CAN_F7R2_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */
emilmont 77:869cf507173a 2184 #define CAN_F7R2_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */
emilmont 77:869cf507173a 2185 #define CAN_F7R2_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */
emilmont 77:869cf507173a 2186 #define CAN_F7R2_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */
emilmont 77:869cf507173a 2187 #define CAN_F7R2_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */
emilmont 77:869cf507173a 2188 #define CAN_F7R2_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */
emilmont 77:869cf507173a 2189 #define CAN_F7R2_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */
emilmont 77:869cf507173a 2190 #define CAN_F7R2_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */
emilmont 77:869cf507173a 2191 #define CAN_F7R2_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */
emilmont 77:869cf507173a 2192 #define CAN_F7R2_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */
emilmont 77:869cf507173a 2193 #define CAN_F7R2_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */
emilmont 77:869cf507173a 2194 #define CAN_F7R2_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */
emilmont 77:869cf507173a 2195 #define CAN_F7R2_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */
emilmont 77:869cf507173a 2196 #define CAN_F7R2_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */
emilmont 77:869cf507173a 2197 #define CAN_F7R2_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */
emilmont 77:869cf507173a 2198 #define CAN_F7R2_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */
emilmont 77:869cf507173a 2199
emilmont 77:869cf507173a 2200 /******************* Bit definition for CAN_F8R2 register *******************/
emilmont 77:869cf507173a 2201 #define CAN_F8R2_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */
emilmont 77:869cf507173a 2202 #define CAN_F8R2_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */
emilmont 77:869cf507173a 2203 #define CAN_F8R2_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */
emilmont 77:869cf507173a 2204 #define CAN_F8R2_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */
emilmont 77:869cf507173a 2205 #define CAN_F8R2_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */
emilmont 77:869cf507173a 2206 #define CAN_F8R2_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */
emilmont 77:869cf507173a 2207 #define CAN_F8R2_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */
emilmont 77:869cf507173a 2208 #define CAN_F8R2_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */
emilmont 77:869cf507173a 2209 #define CAN_F8R2_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */
emilmont 77:869cf507173a 2210 #define CAN_F8R2_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */
emilmont 77:869cf507173a 2211 #define CAN_F8R2_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */
emilmont 77:869cf507173a 2212 #define CAN_F8R2_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */
emilmont 77:869cf507173a 2213 #define CAN_F8R2_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */
emilmont 77:869cf507173a 2214 #define CAN_F8R2_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */
emilmont 77:869cf507173a 2215 #define CAN_F8R2_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */
emilmont 77:869cf507173a 2216 #define CAN_F8R2_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */
emilmont 77:869cf507173a 2217 #define CAN_F8R2_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */
emilmont 77:869cf507173a 2218 #define CAN_F8R2_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */
emilmont 77:869cf507173a 2219 #define CAN_F8R2_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */
emilmont 77:869cf507173a 2220 #define CAN_F8R2_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */
emilmont 77:869cf507173a 2221 #define CAN_F8R2_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */
emilmont 77:869cf507173a 2222 #define CAN_F8R2_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */
emilmont 77:869cf507173a 2223 #define CAN_F8R2_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */
emilmont 77:869cf507173a 2224 #define CAN_F8R2_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */
emilmont 77:869cf507173a 2225 #define CAN_F8R2_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */
emilmont 77:869cf507173a 2226 #define CAN_F8R2_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */
emilmont 77:869cf507173a 2227 #define CAN_F8R2_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */
emilmont 77:869cf507173a 2228 #define CAN_F8R2_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */
emilmont 77:869cf507173a 2229 #define CAN_F8R2_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */
emilmont 77:869cf507173a 2230 #define CAN_F8R2_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */
emilmont 77:869cf507173a 2231 #define CAN_F8R2_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */
emilmont 77:869cf507173a 2232 #define CAN_F8R2_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */
emilmont 77:869cf507173a 2233
emilmont 77:869cf507173a 2234 /******************* Bit definition for CAN_F9R2 register *******************/
emilmont 77:869cf507173a 2235 #define CAN_F9R2_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */
emilmont 77:869cf507173a 2236 #define CAN_F9R2_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */
emilmont 77:869cf507173a 2237 #define CAN_F9R2_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */
emilmont 77:869cf507173a 2238 #define CAN_F9R2_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */
emilmont 77:869cf507173a 2239 #define CAN_F9R2_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */
emilmont 77:869cf507173a 2240 #define CAN_F9R2_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */
emilmont 77:869cf507173a 2241 #define CAN_F9R2_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */
emilmont 77:869cf507173a 2242 #define CAN_F9R2_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */
emilmont 77:869cf507173a 2243 #define CAN_F9R2_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */
emilmont 77:869cf507173a 2244 #define CAN_F9R2_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */
emilmont 77:869cf507173a 2245 #define CAN_F9R2_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */
emilmont 77:869cf507173a 2246 #define CAN_F9R2_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */
emilmont 77:869cf507173a 2247 #define CAN_F9R2_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */
emilmont 77:869cf507173a 2248 #define CAN_F9R2_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */
emilmont 77:869cf507173a 2249 #define CAN_F9R2_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */
emilmont 77:869cf507173a 2250 #define CAN_F9R2_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */
emilmont 77:869cf507173a 2251 #define CAN_F9R2_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */
emilmont 77:869cf507173a 2252 #define CAN_F9R2_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */
emilmont 77:869cf507173a 2253 #define CAN_F9R2_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */
emilmont 77:869cf507173a 2254 #define CAN_F9R2_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */
emilmont 77:869cf507173a 2255 #define CAN_F9R2_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */
emilmont 77:869cf507173a 2256 #define CAN_F9R2_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */
emilmont 77:869cf507173a 2257 #define CAN_F9R2_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */
emilmont 77:869cf507173a 2258 #define CAN_F9R2_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */
emilmont 77:869cf507173a 2259 #define CAN_F9R2_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */
emilmont 77:869cf507173a 2260 #define CAN_F9R2_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */
emilmont 77:869cf507173a 2261 #define CAN_F9R2_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */
emilmont 77:869cf507173a 2262 #define CAN_F9R2_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */
emilmont 77:869cf507173a 2263 #define CAN_F9R2_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */
emilmont 77:869cf507173a 2264 #define CAN_F9R2_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */
emilmont 77:869cf507173a 2265 #define CAN_F9R2_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */
emilmont 77:869cf507173a 2266 #define CAN_F9R2_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */
emilmont 77:869cf507173a 2267
emilmont 77:869cf507173a 2268 /******************* Bit definition for CAN_F10R2 register ******************/
emilmont 77:869cf507173a 2269 #define CAN_F10R2_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */
emilmont 77:869cf507173a 2270 #define CAN_F10R2_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */
emilmont 77:869cf507173a 2271 #define CAN_F10R2_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */
emilmont 77:869cf507173a 2272 #define CAN_F10R2_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */
emilmont 77:869cf507173a 2273 #define CAN_F10R2_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */
emilmont 77:869cf507173a 2274 #define CAN_F10R2_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */
emilmont 77:869cf507173a 2275 #define CAN_F10R2_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */
emilmont 77:869cf507173a 2276 #define CAN_F10R2_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */
emilmont 77:869cf507173a 2277 #define CAN_F10R2_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */
emilmont 77:869cf507173a 2278 #define CAN_F10R2_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */
emilmont 77:869cf507173a 2279 #define CAN_F10R2_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */
emilmont 77:869cf507173a 2280 #define CAN_F10R2_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */
emilmont 77:869cf507173a 2281 #define CAN_F10R2_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */
emilmont 77:869cf507173a 2282 #define CAN_F10R2_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */
emilmont 77:869cf507173a 2283 #define CAN_F10R2_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */
emilmont 77:869cf507173a 2284 #define CAN_F10R2_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */
emilmont 77:869cf507173a 2285 #define CAN_F10R2_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */
emilmont 77:869cf507173a 2286 #define CAN_F10R2_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */
emilmont 77:869cf507173a 2287 #define CAN_F10R2_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */
emilmont 77:869cf507173a 2288 #define CAN_F10R2_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */
emilmont 77:869cf507173a 2289 #define CAN_F10R2_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */
emilmont 77:869cf507173a 2290 #define CAN_F10R2_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */
emilmont 77:869cf507173a 2291 #define CAN_F10R2_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */
emilmont 77:869cf507173a 2292 #define CAN_F10R2_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */
emilmont 77:869cf507173a 2293 #define CAN_F10R2_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */
emilmont 77:869cf507173a 2294 #define CAN_F10R2_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */
emilmont 77:869cf507173a 2295 #define CAN_F10R2_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */
emilmont 77:869cf507173a 2296 #define CAN_F10R2_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */
emilmont 77:869cf507173a 2297 #define CAN_F10R2_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */
emilmont 77:869cf507173a 2298 #define CAN_F10R2_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */
emilmont 77:869cf507173a 2299 #define CAN_F10R2_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */
emilmont 77:869cf507173a 2300 #define CAN_F10R2_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */
emilmont 77:869cf507173a 2301
emilmont 77:869cf507173a 2302 /******************* Bit definition for CAN_F11R2 register ******************/
emilmont 77:869cf507173a 2303 #define CAN_F11R2_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */
emilmont 77:869cf507173a 2304 #define CAN_F11R2_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */
emilmont 77:869cf507173a 2305 #define CAN_F11R2_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */
emilmont 77:869cf507173a 2306 #define CAN_F11R2_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */
emilmont 77:869cf507173a 2307 #define CAN_F11R2_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */
emilmont 77:869cf507173a 2308 #define CAN_F11R2_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */
emilmont 77:869cf507173a 2309 #define CAN_F11R2_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */
emilmont 77:869cf507173a 2310 #define CAN_F11R2_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */
emilmont 77:869cf507173a 2311 #define CAN_F11R2_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */
emilmont 77:869cf507173a 2312 #define CAN_F11R2_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */
emilmont 77:869cf507173a 2313 #define CAN_F11R2_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */
emilmont 77:869cf507173a 2314 #define CAN_F11R2_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */
emilmont 77:869cf507173a 2315 #define CAN_F11R2_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */
emilmont 77:869cf507173a 2316 #define CAN_F11R2_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */
emilmont 77:869cf507173a 2317 #define CAN_F11R2_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */
emilmont 77:869cf507173a 2318 #define CAN_F11R2_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */
emilmont 77:869cf507173a 2319 #define CAN_F11R2_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */
emilmont 77:869cf507173a 2320 #define CAN_F11R2_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */
emilmont 77:869cf507173a 2321 #define CAN_F11R2_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */
emilmont 77:869cf507173a 2322 #define CAN_F11R2_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */
emilmont 77:869cf507173a 2323 #define CAN_F11R2_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */
emilmont 77:869cf507173a 2324 #define CAN_F11R2_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */
emilmont 77:869cf507173a 2325 #define CAN_F11R2_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */
emilmont 77:869cf507173a 2326 #define CAN_F11R2_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */
emilmont 77:869cf507173a 2327 #define CAN_F11R2_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */
emilmont 77:869cf507173a 2328 #define CAN_F11R2_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */
emilmont 77:869cf507173a 2329 #define CAN_F11R2_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */
emilmont 77:869cf507173a 2330 #define CAN_F11R2_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */
emilmont 77:869cf507173a 2331 #define CAN_F11R2_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */
emilmont 77:869cf507173a 2332 #define CAN_F11R2_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */
emilmont 77:869cf507173a 2333 #define CAN_F11R2_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */
emilmont 77:869cf507173a 2334 #define CAN_F11R2_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */
emilmont 77:869cf507173a 2335
emilmont 77:869cf507173a 2336 /******************* Bit definition for CAN_F12R2 register ******************/
emilmont 77:869cf507173a 2337 #define CAN_F12R2_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */
emilmont 77:869cf507173a 2338 #define CAN_F12R2_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */
emilmont 77:869cf507173a 2339 #define CAN_F12R2_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */
emilmont 77:869cf507173a 2340 #define CAN_F12R2_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */
emilmont 77:869cf507173a 2341 #define CAN_F12R2_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */
emilmont 77:869cf507173a 2342 #define CAN_F12R2_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */
emilmont 77:869cf507173a 2343 #define CAN_F12R2_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */
emilmont 77:869cf507173a 2344 #define CAN_F12R2_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */
emilmont 77:869cf507173a 2345 #define CAN_F12R2_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */
emilmont 77:869cf507173a 2346 #define CAN_F12R2_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */
emilmont 77:869cf507173a 2347 #define CAN_F12R2_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */
emilmont 77:869cf507173a 2348 #define CAN_F12R2_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */
emilmont 77:869cf507173a 2349 #define CAN_F12R2_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */
emilmont 77:869cf507173a 2350 #define CAN_F12R2_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */
emilmont 77:869cf507173a 2351 #define CAN_F12R2_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */
emilmont 77:869cf507173a 2352 #define CAN_F12R2_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */
emilmont 77:869cf507173a 2353 #define CAN_F12R2_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */
emilmont 77:869cf507173a 2354 #define CAN_F12R2_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */
emilmont 77:869cf507173a 2355 #define CAN_F12R2_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */
emilmont 77:869cf507173a 2356 #define CAN_F12R2_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */
emilmont 77:869cf507173a 2357 #define CAN_F12R2_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */
emilmont 77:869cf507173a 2358 #define CAN_F12R2_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */
emilmont 77:869cf507173a 2359 #define CAN_F12R2_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */
emilmont 77:869cf507173a 2360 #define CAN_F12R2_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */
emilmont 77:869cf507173a 2361 #define CAN_F12R2_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */
emilmont 77:869cf507173a 2362 #define CAN_F12R2_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */
emilmont 77:869cf507173a 2363 #define CAN_F12R2_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */
emilmont 77:869cf507173a 2364 #define CAN_F12R2_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */
emilmont 77:869cf507173a 2365 #define CAN_F12R2_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */
emilmont 77:869cf507173a 2366 #define CAN_F12R2_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */
emilmont 77:869cf507173a 2367 #define CAN_F12R2_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */
emilmont 77:869cf507173a 2368 #define CAN_F12R2_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */
emilmont 77:869cf507173a 2369
emilmont 77:869cf507173a 2370 /******************* Bit definition for CAN_F13R2 register ******************/
emilmont 77:869cf507173a 2371 #define CAN_F13R2_FB0 ((uint32_t)0x00000001) /*!<Filter bit 0 */
emilmont 77:869cf507173a 2372 #define CAN_F13R2_FB1 ((uint32_t)0x00000002) /*!<Filter bit 1 */
emilmont 77:869cf507173a 2373 #define CAN_F13R2_FB2 ((uint32_t)0x00000004) /*!<Filter bit 2 */
emilmont 77:869cf507173a 2374 #define CAN_F13R2_FB3 ((uint32_t)0x00000008) /*!<Filter bit 3 */
emilmont 77:869cf507173a 2375 #define CAN_F13R2_FB4 ((uint32_t)0x00000010) /*!<Filter bit 4 */
emilmont 77:869cf507173a 2376 #define CAN_F13R2_FB5 ((uint32_t)0x00000020) /*!<Filter bit 5 */
emilmont 77:869cf507173a 2377 #define CAN_F13R2_FB6 ((uint32_t)0x00000040) /*!<Filter bit 6 */
emilmont 77:869cf507173a 2378 #define CAN_F13R2_FB7 ((uint32_t)0x00000080) /*!<Filter bit 7 */
emilmont 77:869cf507173a 2379 #define CAN_F13R2_FB8 ((uint32_t)0x00000100) /*!<Filter bit 8 */
emilmont 77:869cf507173a 2380 #define CAN_F13R2_FB9 ((uint32_t)0x00000200) /*!<Filter bit 9 */
emilmont 77:869cf507173a 2381 #define CAN_F13R2_FB10 ((uint32_t)0x00000400) /*!<Filter bit 10 */
emilmont 77:869cf507173a 2382 #define CAN_F13R2_FB11 ((uint32_t)0x00000800) /*!<Filter bit 11 */
emilmont 77:869cf507173a 2383 #define CAN_F13R2_FB12 ((uint32_t)0x00001000) /*!<Filter bit 12 */
emilmont 77:869cf507173a 2384 #define CAN_F13R2_FB13 ((uint32_t)0x00002000) /*!<Filter bit 13 */
emilmont 77:869cf507173a 2385 #define CAN_F13R2_FB14 ((uint32_t)0x00004000) /*!<Filter bit 14 */
emilmont 77:869cf507173a 2386 #define CAN_F13R2_FB15 ((uint32_t)0x00008000) /*!<Filter bit 15 */
emilmont 77:869cf507173a 2387 #define CAN_F13R2_FB16 ((uint32_t)0x00010000) /*!<Filter bit 16 */
emilmont 77:869cf507173a 2388 #define CAN_F13R2_FB17 ((uint32_t)0x00020000) /*!<Filter bit 17 */
emilmont 77:869cf507173a 2389 #define CAN_F13R2_FB18 ((uint32_t)0x00040000) /*!<Filter bit 18 */
emilmont 77:869cf507173a 2390 #define CAN_F13R2_FB19 ((uint32_t)0x00080000) /*!<Filter bit 19 */
emilmont 77:869cf507173a 2391 #define CAN_F13R2_FB20 ((uint32_t)0x00100000) /*!<Filter bit 20 */
emilmont 77:869cf507173a 2392 #define CAN_F13R2_FB21 ((uint32_t)0x00200000) /*!<Filter bit 21 */
emilmont 77:869cf507173a 2393 #define CAN_F13R2_FB22 ((uint32_t)0x00400000) /*!<Filter bit 22 */
emilmont 77:869cf507173a 2394 #define CAN_F13R2_FB23 ((uint32_t)0x00800000) /*!<Filter bit 23 */
emilmont 77:869cf507173a 2395 #define CAN_F13R2_FB24 ((uint32_t)0x01000000) /*!<Filter bit 24 */
emilmont 77:869cf507173a 2396 #define CAN_F13R2_FB25 ((uint32_t)0x02000000) /*!<Filter bit 25 */
emilmont 77:869cf507173a 2397 #define CAN_F13R2_FB26 ((uint32_t)0x04000000) /*!<Filter bit 26 */
emilmont 77:869cf507173a 2398 #define CAN_F13R2_FB27 ((uint32_t)0x08000000) /*!<Filter bit 27 */
emilmont 77:869cf507173a 2399 #define CAN_F13R2_FB28 ((uint32_t)0x10000000) /*!<Filter bit 28 */
emilmont 77:869cf507173a 2400 #define CAN_F13R2_FB29 ((uint32_t)0x20000000) /*!<Filter bit 29 */
emilmont 77:869cf507173a 2401 #define CAN_F13R2_FB30 ((uint32_t)0x40000000) /*!<Filter bit 30 */
emilmont 77:869cf507173a 2402 #define CAN_F13R2_FB31 ((uint32_t)0x80000000) /*!<Filter bit 31 */
emilmont 77:869cf507173a 2403
emilmont 77:869cf507173a 2404
emilmont 77:869cf507173a 2405 /******************************************************************************/
emilmont 77:869cf507173a 2406 /* */
emilmont 77:869cf507173a 2407 /* HDMI-CEC (CEC) */
emilmont 77:869cf507173a 2408 /* */
emilmont 77:869cf507173a 2409 /******************************************************************************/
emilmont 77:869cf507173a 2410
emilmont 77:869cf507173a 2411 /******************* Bit definition for CEC_CR register *********************/
emilmont 77:869cf507173a 2412 #define CEC_CR_CECEN ((uint32_t)0x00000001) /*!< CEC Enable */
emilmont 77:869cf507173a 2413 #define CEC_CR_TXSOM ((uint32_t)0x00000002) /*!< CEC Tx Start Of Message */
emilmont 77:869cf507173a 2414 #define CEC_CR_TXEOM ((uint32_t)0x00000004) /*!< CEC Tx End Of Message */
emilmont 77:869cf507173a 2415
emilmont 77:869cf507173a 2416 /******************* Bit definition for CEC_CFGR register *******************/
emilmont 77:869cf507173a 2417 #define CEC_CFGR_SFT ((uint32_t)0x00000007) /*!< CEC Signal Free Time */
emilmont 77:869cf507173a 2418 #define CEC_CFGR_RXTOL ((uint32_t)0x00000008) /*!< CEC Tolerance */
emilmont 77:869cf507173a 2419 #define CEC_CFGR_BRESTP ((uint32_t)0x00000010) /*!< CEC Rx Stop */
emilmont 77:869cf507173a 2420 #define CEC_CFGR_BREGEN ((uint32_t)0x00000020) /*!< CEC Bit Rising Error generation */
emilmont 77:869cf507173a 2421 #define CEC_CFGR_LREGEN ((uint32_t)0x00000040) /*!< CEC Long Period Error generation */
emilmont 77:869cf507173a 2422 #define CEC_CFGR_BRDNOGEN ((uint32_t)0x00000080) /*!< CEC Broadcast no Error generation */
emilmont 77:869cf507173a 2423 #define CEC_CFGR_SFTOPT ((uint32_t)0x00000100) /*!< CEC Signal Free Time optional */
emilmont 77:869cf507173a 2424 #define CEC_CFGR_OAR ((uint32_t)0x7FFF0000) /*!< CEC Own Address */
emilmont 77:869cf507173a 2425 #define CEC_CFGR_LSTN ((uint32_t)0x80000000) /*!< CEC Listen mode */
emilmont 77:869cf507173a 2426
emilmont 77:869cf507173a 2427 /******************* Bit definition for CEC_TXDR register *******************/
emilmont 77:869cf507173a 2428 #define CEC_TXDR_TXD ((uint32_t)0x000000FF) /*!< CEC Tx Data */
emilmont 77:869cf507173a 2429
emilmont 77:869cf507173a 2430 /******************* Bit definition for CEC_RXDR register *******************/
emilmont 77:869cf507173a 2431 #define CEC_TXDR_RXD ((uint32_t)0x000000FF) /*!< CEC Rx Data */
emilmont 77:869cf507173a 2432
emilmont 77:869cf507173a 2433 /******************* Bit definition for CEC_ISR register ********************/
emilmont 77:869cf507173a 2434 #define CEC_ISR_RXBR ((uint32_t)0x00000001) /*!< CEC Rx-Byte Received */
emilmont 77:869cf507173a 2435 #define CEC_ISR_RXEND ((uint32_t)0x00000002) /*!< CEC End Of Reception */
emilmont 77:869cf507173a 2436 #define CEC_ISR_RXOVR ((uint32_t)0x00000004) /*!< CEC Rx-Overrun */
emilmont 77:869cf507173a 2437 #define CEC_ISR_BRE ((uint32_t)0x00000008) /*!< CEC Rx Bit Rising Error */
emilmont 77:869cf507173a 2438 #define CEC_ISR_SBPE ((uint32_t)0x00000010) /*!< CEC Rx Short Bit period Error */
emilmont 77:869cf507173a 2439 #define CEC_ISR_LBPE ((uint32_t)0x00000020) /*!< CEC Rx Long Bit period Error */
emilmont 77:869cf507173a 2440 #define CEC_ISR_RXACKE ((uint32_t)0x00000040) /*!< CEC Rx Missing Acknowledge */
emilmont 77:869cf507173a 2441 #define CEC_ISR_ARBLST ((uint32_t)0x00000080) /*!< CEC Arbitration Lost */
emilmont 77:869cf507173a 2442 #define CEC_ISR_TXBR ((uint32_t)0x00000100) /*!< CEC Tx Byte Request */
emilmont 77:869cf507173a 2443 #define CEC_ISR_TXEND ((uint32_t)0x00000200) /*!< CEC End of Transmission */
emilmont 77:869cf507173a 2444 #define CEC_ISR_TXUDR ((uint32_t)0x00000400) /*!< CEC Tx-Buffer Underrun */
emilmont 77:869cf507173a 2445 #define CEC_ISR_TXERR ((uint32_t)0x00000800) /*!< CEC Tx-Error */
emilmont 77:869cf507173a 2446 #define CEC_ISR_TXACKE ((uint32_t)0x00001000) /*!< CEC Tx Missing Acknowledge */
emilmont 77:869cf507173a 2447
emilmont 77:869cf507173a 2448 /******************* Bit definition for CEC_IER register ********************/
emilmont 77:869cf507173a 2449 #define CEC_IER_RXBRIE ((uint32_t)0x00000001) /*!< CEC Rx-Byte Received IT Enable */
emilmont 77:869cf507173a 2450 #define CEC_IER_RXENDIE ((uint32_t)0x00000002) /*!< CEC End Of Reception IT Enable */
emilmont 77:869cf507173a 2451 #define CEC_IER_RXOVRIE ((uint32_t)0x00000004) /*!< CEC Rx-Overrun IT Enable */
emilmont 77:869cf507173a 2452 #define CEC_IER_BREIEIE ((uint32_t)0x00000008) /*!< CEC Rx Bit Rising Error IT Enable */
emilmont 77:869cf507173a 2453 #define CEC_IER_SBPEIE ((uint32_t)0x00000010) /*!< CEC Rx Short Bit period Error IT Enable*/
emilmont 77:869cf507173a 2454 #define CEC_IER_LBPEIE ((uint32_t)0x00000020) /*!< CEC Rx Long Bit period Error IT Enable */
emilmont 77:869cf507173a 2455 #define CEC_IER_RXACKEIE ((uint32_t)0x00000040) /*!< CEC Rx Missing Acknowledge IT Enable */
emilmont 77:869cf507173a 2456 #define CEC_IER_ARBLSTIE ((uint32_t)0x00000080) /*!< CEC Arbitration Lost IT Enable */
emilmont 77:869cf507173a 2457 #define CEC_IER_TXBRIE ((uint32_t)0x00000100) /*!< CEC Tx Byte Request IT Enable */
emilmont 77:869cf507173a 2458 #define CEC_IER_TXENDIE ((uint32_t)0x00000200) /*!< CEC End of Transmission IT Enable */
emilmont 77:869cf507173a 2459 #define CEC_IER_TXUDRIE ((uint32_t)0x00000400) /*!< CEC Tx-Buffer Underrun IT Enable */
emilmont 77:869cf507173a 2460 #define CEC_IER_TXERRIE ((uint32_t)0x00000800) /*!< CEC Tx-Error IT Enable */
emilmont 77:869cf507173a 2461 #define CEC_IER_TXACKEIE ((uint32_t)0x00001000) /*!< CEC Tx Missing Acknowledge IT Enable */
emilmont 77:869cf507173a 2462
emilmont 77:869cf507173a 2463 /******************************************************************************/
emilmont 77:869cf507173a 2464 /* */
emilmont 77:869cf507173a 2465 /* Analog Comparators (COMP) */
emilmont 77:869cf507173a 2466 /* */
emilmont 77:869cf507173a 2467 /******************************************************************************/
emilmont 77:869cf507173a 2468 /*********************** Bit definition for COMP_CSR register ***************/
emilmont 77:869cf507173a 2469 /* COMP1 bits definition */
emilmont 77:869cf507173a 2470 #define COMP_CSR_COMP1EN ((uint32_t)0x00000001) /*!< COMP1 enable */
emilmont 77:869cf507173a 2471 #define COMP_CSR_COMP1SW1 ((uint32_t)0x00000002) /*!< SW1 switch control */
emilmont 77:869cf507173a 2472 #define COMP_CSR_COMP1MODE ((uint32_t)0x0000000C) /*!< COMP1 power mode */
emilmont 77:869cf507173a 2473 #define COMP_CSR_COMP1MODE_0 ((uint32_t)0x00000004) /*!< COMP1 power mode bit 0 */
emilmont 77:869cf507173a 2474 #define COMP_CSR_COMP1MODE_1 ((uint32_t)0x00000008) /*!< COMP1 power mode bit 1 */
emilmont 77:869cf507173a 2475 #define COMP_CSR_COMP1INSEL ((uint32_t)0x00000070) /*!< COMP1 inverting input select */
emilmont 77:869cf507173a 2476 #define COMP_CSR_COMP1INSEL_0 ((uint32_t)0x00000010) /*!< COMP1 inverting input select bit 0 */
emilmont 77:869cf507173a 2477 #define COMP_CSR_COMP1INSEL_1 ((uint32_t)0x00000020) /*!< COMP1 inverting input select bit 1 */
emilmont 77:869cf507173a 2478 #define COMP_CSR_COMP1INSEL_2 ((uint32_t)0x00000040) /*!< COMP1 inverting input select bit 2 */
emilmont 77:869cf507173a 2479 #define COMP_CSR_COMP1OUTSEL ((uint32_t)0x00000700) /*!< COMP1 output select */
emilmont 77:869cf507173a 2480 #define COMP_CSR_COMP1OUTSEL_0 ((uint32_t)0x00000100) /*!< COMP1 output select bit 0 */
emilmont 77:869cf507173a 2481 #define COMP_CSR_COMP1OUTSEL_1 ((uint32_t)0x00000200) /*!< COMP1 output select bit 1 */
emilmont 77:869cf507173a 2482 #define COMP_CSR_COMP1OUTSEL_2 ((uint32_t)0x00000400) /*!< COMP1 output select bit 2 */
emilmont 77:869cf507173a 2483 #define COMP_CSR_COMP1POL ((uint32_t)0x00000800) /*!< COMP1 output polarity */
emilmont 77:869cf507173a 2484 #define COMP_CSR_COMP1HYST ((uint32_t)0x00003000) /*!< COMP1 hysteresis */
emilmont 77:869cf507173a 2485 #define COMP_CSR_COMP1HYST_0 ((uint32_t)0x00001000) /*!< COMP1 hysteresis bit 0 */
emilmont 77:869cf507173a 2486 #define COMP_CSR_COMP1HYST_1 ((uint32_t)0x00002000) /*!< COMP1 hysteresis bit 1 */
emilmont 77:869cf507173a 2487 #define COMP_CSR_COMP1OUT ((uint32_t)0x00004000) /*!< COMP1 output level */
emilmont 77:869cf507173a 2488 #define COMP_CSR_COMP1LOCK ((uint32_t)0x00008000) /*!< COMP1 lock */
emilmont 77:869cf507173a 2489 /* COMP2 bits definition */
emilmont 77:869cf507173a 2490 #define COMP_CSR_COMP2EN ((uint32_t)0x00010000) /*!< COMP2 enable */
emilmont 77:869cf507173a 2491 #define COMP_CSR_COMP2MODE ((uint32_t)0x000C0000) /*!< COMP2 power mode */
emilmont 77:869cf507173a 2492 #define COMP_CSR_COMP2MODE_0 ((uint32_t)0x00040000) /*!< COMP2 power mode bit 0 */
emilmont 77:869cf507173a 2493 #define COMP_CSR_COMP2MODE_1 ((uint32_t)0x00080000) /*!< COMP2 power mode bit 1 */
emilmont 77:869cf507173a 2494 #define COMP_CSR_COMP2INSEL ((uint32_t)0x00700000) /*!< COMP2 inverting input select */
emilmont 77:869cf507173a 2495 #define COMP_CSR_COMP2INSEL_0 ((uint32_t)0x00100000) /*!< COMP2 inverting input select bit 0 */
emilmont 77:869cf507173a 2496 #define COMP_CSR_COMP2INSEL_1 ((uint32_t)0x00200000) /*!< COMP2 inverting input select bit 1 */
emilmont 77:869cf507173a 2497 #define COMP_CSR_COMP2INSEL_2 ((uint32_t)0x00400000) /*!< COMP2 inverting input select bit 2 */
emilmont 77:869cf507173a 2498 #define COMP_CSR_WNDWEN ((uint32_t)0x00800000) /*!< Comparators window mode enable */
emilmont 77:869cf507173a 2499 #define COMP_CSR_COMP2OUTSEL ((uint32_t)0x07000000) /*!< COMP2 output select */
emilmont 77:869cf507173a 2500 #define COMP_CSR_COMP2OUTSEL_0 ((uint32_t)0x01000000) /*!< COMP2 output select bit 0 */
emilmont 77:869cf507173a 2501 #define COMP_CSR_COMP2OUTSEL_1 ((uint32_t)0x02000000) /*!< COMP2 output select bit 1 */
emilmont 77:869cf507173a 2502 #define COMP_CSR_COMP2OUTSEL_2 ((uint32_t)0x04000000) /*!< COMP2 output select bit 2 */
emilmont 77:869cf507173a 2503 #define COMP_CSR_COMP2POL ((uint32_t)0x08000000) /*!< COMP2 output polarity */
emilmont 77:869cf507173a 2504 #define COMP_CSR_COMP2HYST ((uint32_t)0x30000000) /*!< COMP2 hysteresis */
emilmont 77:869cf507173a 2505 #define COMP_CSR_COMP2HYST_0 ((uint32_t)0x10000000) /*!< COMP2 hysteresis bit 0 */
emilmont 77:869cf507173a 2506 #define COMP_CSR_COMP2HYST_1 ((uint32_t)0x20000000) /*!< COMP2 hysteresis bit 1 */
emilmont 77:869cf507173a 2507 #define COMP_CSR_COMP2OUT ((uint32_t)0x40000000) /*!< COMP2 output level */
emilmont 77:869cf507173a 2508 #define COMP_CSR_COMP2LOCK ((uint32_t)0x80000000) /*!< COMP2 lock */
emilmont 77:869cf507173a 2509
emilmont 77:869cf507173a 2510 /******************************************************************************/
emilmont 77:869cf507173a 2511 /* */
emilmont 77:869cf507173a 2512 /* CRC calculation unit (CRC) */
emilmont 77:869cf507173a 2513 /* */
emilmont 77:869cf507173a 2514 /******************************************************************************/
emilmont 77:869cf507173a 2515 /******************* Bit definition for CRC_DR register *********************/
emilmont 77:869cf507173a 2516 #define CRC_DR_DR ((uint32_t)0xFFFFFFFF) /*!< Data register bits */
emilmont 77:869cf507173a 2517
emilmont 77:869cf507173a 2518 /******************* Bit definition for CRC_IDR register ********************/
emilmont 77:869cf507173a 2519 #define CRC_IDR_IDR ((uint8_t)0xFF) /*!< General-purpose 8-bit data register bits */
emilmont 77:869cf507173a 2520
emilmont 77:869cf507173a 2521 /******************** Bit definition for CRC_CR register ********************/
emilmont 77:869cf507173a 2522 #define CRC_CR_RESET ((uint32_t)0x00000001) /*!< RESET the CRC computation unit bit */
emilmont 77:869cf507173a 2523 #define CRC_CR_POLSIZE ((uint32_t)0x00000018) /*!< Polynomial size bits (only for STM32F072 devices)*/
emilmont 77:869cf507173a 2524 #define CRC_CR_POLSIZE_0 ((uint32_t)0x00000008) /*!< Polynomial size bit 0 (only for STM32F072 devices) */
emilmont 77:869cf507173a 2525 #define CRC_CR_POLSIZE_1 ((uint32_t)0x00000010) /*!< Polynomial size bit 1 (only for STM32F072 devices) */
emilmont 77:869cf507173a 2526 #define CRC_CR_REV_IN ((uint32_t)0x00000060) /*!< REV_IN Reverse Input Data bits */
emilmont 77:869cf507173a 2527 #define CRC_CR_REV_IN_0 ((uint32_t)0x00000020) /*!< REV_IN Bit 0 */
emilmont 77:869cf507173a 2528 #define CRC_CR_REV_IN_1 ((uint32_t)0x00000040) /*!< REV_IN Bit 1 */
emilmont 77:869cf507173a 2529 #define CRC_CR_REV_OUT ((uint32_t)0x00000080) /*!< REV_OUT Reverse Output Data bits */
emilmont 77:869cf507173a 2530
emilmont 77:869cf507173a 2531 /******************* Bit definition for CRC_INIT register *******************/
emilmont 77:869cf507173a 2532 #define CRC_INIT_INIT ((uint32_t)0xFFFFFFFF) /*!< Initial CRC value bits */
emilmont 77:869cf507173a 2533
emilmont 77:869cf507173a 2534 /******************* Bit definition for CRC_POL register ********************/
emilmont 77:869cf507173a 2535 #define CRC_POL_POL ((uint32_t)0xFFFFFFFF) /*!< Coefficients of the polynomial (only for STM32F072 devices) */
emilmont 77:869cf507173a 2536
emilmont 77:869cf507173a 2537 /******************************************************************************/
emilmont 77:869cf507173a 2538 /* */
emilmont 77:869cf507173a 2539 /* CRS Clock Recovery System */
emilmont 77:869cf507173a 2540 /* (Available only for STM32F072 devices) */
emilmont 77:869cf507173a 2541 /******************************************************************************/
emilmont 77:869cf507173a 2542
emilmont 77:869cf507173a 2543 /******************* Bit definition for CRS_CR register *********************/
emilmont 77:869cf507173a 2544 #define CRS_CR_SYNCOKIE ((uint32_t)0x00000001) /* SYNC event OK interrupt enable */
emilmont 77:869cf507173a 2545 #define CRS_CR_SYNCWARNIE ((uint32_t)0x00000002) /* SYNC warning interrupt enable */
emilmont 77:869cf507173a 2546 #define CRS_CR_ERRIE ((uint32_t)0x00000004) /* SYNC error interrupt enable */
emilmont 77:869cf507173a 2547 #define CRS_CR_ESYNCIE ((uint32_t)0x00000008) /* Expected SYNC(ESYNCF) interrupt Enable*/
emilmont 77:869cf507173a 2548 #define CRS_CR_CEN ((uint32_t)0x00000020) /* Frequency error counter enable */
emilmont 77:869cf507173a 2549 #define CRS_CR_AUTOTRIMEN ((uint32_t)0x00000040) /* Automatic trimming enable */
emilmont 77:869cf507173a 2550 #define CRS_CR_SWSYNC ((uint32_t)0x00000080) /* A Software SYNC event is generated */
emilmont 77:869cf507173a 2551 #define CRS_CR_TRIM ((uint32_t)0x00003F00) /* HSI48 oscillator smooth trimming */
emilmont 77:869cf507173a 2552
emilmont 77:869cf507173a 2553 /******************* Bit definition for CRS_CFGR register *********************/
emilmont 77:869cf507173a 2554 #define CRS_CFGR_RELOAD ((uint32_t)0x0000FFFF) /* Counter reload value */
emilmont 77:869cf507173a 2555 #define CRS_CFGR_FELIM ((uint32_t)0x00FF0000) /* Frequency error limit */
emilmont 77:869cf507173a 2556 #define CRS_CFGR_SYNCDIV ((uint32_t)0x07000000) /* SYNC divider */
emilmont 77:869cf507173a 2557 #define CRS_CFGR_SYNCDIV_0 ((uint32_t)0x01000000) /* Bit 0 */
emilmont 77:869cf507173a 2558 #define CRS_CFGR_SYNCDIV_1 ((uint32_t)0x02000000) /* Bit 1 */
emilmont 77:869cf507173a 2559 #define CRS_CFGR_SYNCDIV_2 ((uint32_t)0x04000000) /* Bit 2 */
emilmont 77:869cf507173a 2560 #define CRS_CFGR_SYNCSRC ((uint32_t)0x30000000) /* SYNC signal source selection */
emilmont 77:869cf507173a 2561 #define CRS_CFGR_SYNCSRC_0 ((uint32_t)0x10000000) /* Bit 0 */
emilmont 77:869cf507173a 2562 #define CRS_CFGR_SYNCSRC_1 ((uint32_t)0x20000000) /* Bit 1 */
emilmont 77:869cf507173a 2563 #define CRS_CFGR_SYNCPOL ((uint32_t)0x80000000) /* SYNC polarity selection */
emilmont 77:869cf507173a 2564
emilmont 77:869cf507173a 2565 /******************* Bit definition for CRS_ISR register *********************/
emilmont 77:869cf507173a 2566 #define CRS_ISR_SYNCOKF ((uint32_t)0x00000001) /* SYNC event OK flag */
emilmont 77:869cf507173a 2567 #define CRS_ISR_SYNCWARNF ((uint32_t)0x00000002) /* SYNC warning */
emilmont 77:869cf507173a 2568 #define CRS_ISR_ERRF ((uint32_t)0x00000004) /* SYNC error flag */
emilmont 77:869cf507173a 2569 #define CRS_ISR_ESYNCF ((uint32_t)0x00000008) /* Expected SYNC flag */
emilmont 77:869cf507173a 2570 #define CRS_ISR_SYNCERR ((uint32_t)0x00000100) /* SYNC error */
emilmont 77:869cf507173a 2571 #define CRS_ISR_SYNCMISS ((uint32_t)0x00000200) /* SYNC missed */
emilmont 77:869cf507173a 2572 #define CRS_ISR_TRIMOVF ((uint32_t)0x00000400) /* Trimming overflow or underflow */
emilmont 77:869cf507173a 2573 #define CRS_ISR_FEDIR ((uint32_t)0x00008000) /* Frequency error direction */
emilmont 77:869cf507173a 2574 #define CRS_ISR_FECAP ((uint32_t)0xFFFF0000) /* Frequency error capture */
emilmont 77:869cf507173a 2575
emilmont 77:869cf507173a 2576 /******************* Bit definition for CRS_ICR register *********************/
emilmont 77:869cf507173a 2577 #define CRS_ICR_SYNCOKC ((uint32_t)0x00000001) /* SYNC event OK clear flag */
emilmont 77:869cf507173a 2578 #define CRS_ICR_SYNCWARNC ((uint32_t)0x00000002) /* SYNC warning clear flag */
emilmont 77:869cf507173a 2579 #define CRS_ICR_ERRC ((uint32_t)0x00000004) /* Error clear flag */
emilmont 77:869cf507173a 2580 #define CRS_ICR_ESYNCC ((uint32_t)0x00000008) /* Expected SYNC clear flag */
emilmont 77:869cf507173a 2581
emilmont 77:869cf507173a 2582 /******************************************************************************/
emilmont 77:869cf507173a 2583 /* */
emilmont 77:869cf507173a 2584 /* Digital to Analog Converter (DAC) */
emilmont 77:869cf507173a 2585 /* */
emilmont 77:869cf507173a 2586 /******************************************************************************/
emilmont 77:869cf507173a 2587 /******************** Bit definition for DAC_CR register ********************/
emilmont 77:869cf507173a 2588 #define DAC_CR_EN1 ((uint32_t)0x00000001) /*!< DAC channel1 enable */
emilmont 77:869cf507173a 2589 #define DAC_CR_BOFF1 ((uint32_t)0x00000002) /*!< DAC channel1 output buffer disable */
emilmont 77:869cf507173a 2590 #define DAC_CR_TEN1 ((uint32_t)0x00000004) /*!< DAC channel1 Trigger enable */
emilmont 77:869cf507173a 2591
emilmont 77:869cf507173a 2592 #define DAC_CR_TSEL1 ((uint32_t)0x00000038) /*!< TSEL1[2:0] (DAC channel1 Trigger selection) */
emilmont 77:869cf507173a 2593 #define DAC_CR_TSEL1_0 ((uint32_t)0x00000008) /*!< Bit 0 */
emilmont 77:869cf507173a 2594 #define DAC_CR_TSEL1_1 ((uint32_t)0x00000010) /*!< Bit 1 */
emilmont 77:869cf507173a 2595 #define DAC_CR_TSEL1_2 ((uint32_t)0x00000020) /*!< Bit 2 */
emilmont 77:869cf507173a 2596
emilmont 77:869cf507173a 2597 #define DAC_CR_WAVE1 ((uint32_t)0x000000C0) /*!< WAVE1[1:0] (DAC channel1 noise/triangle wave generation enable)(only for STM32F072 devices) */
emilmont 77:869cf507173a 2598 #define DAC_CR_WAVE1_0 ((uint32_t)0x00000040) /*!< Bit 0 */
emilmont 77:869cf507173a 2599 #define DAC_CR_WAVE1_1 ((uint32_t)0x00000080) /*!< Bit 1 */
emilmont 77:869cf507173a 2600
emilmont 77:869cf507173a 2601 #define DAC_CR_MAMP1 ((uint32_t)0x00000F00) /*!< MAMP1[3:0] (DAC channel1 Mask/Amplitude selector) (only for STM32F072 devices) */
emilmont 77:869cf507173a 2602 #define DAC_CR_MAMP1_0 ((uint32_t)0x00000100) /*!< Bit 0 */
emilmont 77:869cf507173a 2603 #define DAC_CR_MAMP1_1 ((uint32_t)0x00000200) /*!< Bit 1 */
emilmont 77:869cf507173a 2604 #define DAC_CR_MAMP1_2 ((uint32_t)0x00000400) /*!< Bit 2 */
emilmont 77:869cf507173a 2605 #define DAC_CR_MAMP1_3 ((uint32_t)0x00000800) /*!< Bit 3 */
emilmont 77:869cf507173a 2606
emilmont 77:869cf507173a 2607 #define DAC_CR_DMAEN1 ((uint32_t)0x00001000) /*!< DAC channel1 DMA enable */
emilmont 77:869cf507173a 2608 #define DAC_CR_DMAUDRIE1 ((uint32_t)0x00002000) /*!<DAC channel1 DMA Underrun Interrupt enable */
emilmont 77:869cf507173a 2609 #define DAC_CR_EN2 ((uint32_t)0x00010000) /*!< DAC channel2 enable */
emilmont 77:869cf507173a 2610 #define DAC_CR_BOFF2 ((uint32_t)0x00020000) /*!< DAC channel2 output buffer disable */
emilmont 77:869cf507173a 2611 #define DAC_CR_TEN2 ((uint32_t)0x00040000) /*!< DAC channel2 Trigger enable */
emilmont 77:869cf507173a 2612
emilmont 77:869cf507173a 2613 #define DAC_CR_TSEL2 ((uint32_t)0x00380000) /*!< TSEL2[2:0] (DAC channel2 Trigger selection) */
emilmont 77:869cf507173a 2614 #define DAC_CR_TSEL2_0 ((uint32_t)0x00080000) /*!< Bit 0 */
emilmont 77:869cf507173a 2615 #define DAC_CR_TSEL2_1 ((uint32_t)0x00100000) /*!< Bit 1 */
emilmont 77:869cf507173a 2616 #define DAC_CR_TSEL2_2 ((uint32_t)0x00200000) /*!< Bit 2 */
emilmont 77:869cf507173a 2617
emilmont 77:869cf507173a 2618 #define DAC_CR_WAVE2 ((uint32_t)0x00C00000) /*!< WAVE2[1:0] (DAC channel2 noise/triangle wave generation enable) */
emilmont 77:869cf507173a 2619 #define DAC_CR_WAVE2_0 ((uint32_t)0x00400000) /*!< Bit 0 */
emilmont 77:869cf507173a 2620 #define DAC_CR_WAVE2_1 ((uint32_t)0x00800000) /*!< Bit 1 */
emilmont 77:869cf507173a 2621
emilmont 77:869cf507173a 2622 #define DAC_CR_MAMP2 ((uint32_t)0x0F000000) /*!< MAMP2[3:0] (DAC channel2 Mask/Amplitude selector) */
emilmont 77:869cf507173a 2623 #define DAC_CR_MAMP2_0 ((uint32_t)0x01000000) /*!< Bit 0 */
emilmont 77:869cf507173a 2624 #define DAC_CR_MAMP2_1 ((uint32_t)0x02000000) /*!< Bit 1 */
emilmont 77:869cf507173a 2625 #define DAC_CR_MAMP2_2 ((uint32_t)0x04000000) /*!< Bit 2 */
emilmont 77:869cf507173a 2626 #define DAC_CR_MAMP2_3 ((uint32_t)0x08000000) /*!< Bit 3 */
emilmont 77:869cf507173a 2627
emilmont 77:869cf507173a 2628 #define DAC_CR_DMAEN2 ((uint32_t)0x10000000) /*!< DAC channel2 DMA enabled */
emilmont 77:869cf507173a 2629 #define DAC_CR_DMAUDRIE2 ((uint32_t)0x20000000) /*!<DAC channel2 DMA Underrun Interrupt enable */
emilmont 77:869cf507173a 2630
emilmont 77:869cf507173a 2631 /***************** Bit definition for DAC_SWTRIGR register ******************/
emilmont 77:869cf507173a 2632 #define DAC_SWTRIGR_SWTRIG1 ((uint32_t)0x00000001) /*!<DAC channel1 software trigger */
emilmont 77:869cf507173a 2633 #define DAC_SWTRIGR_SWTRIG2 ((uint32_t)0x00000002) /*!<DAC channel2 software trigger */
emilmont 77:869cf507173a 2634
emilmont 77:869cf507173a 2635 /***************** Bit definition for DAC_DHR12R1 register ******************/
emilmont 77:869cf507173a 2636 #define DAC_DHR12R1_DACC1DHR ((uint32_t)0x00000FFF) /*!<DAC channel1 12-bit Right aligned data */
emilmont 77:869cf507173a 2637
emilmont 77:869cf507173a 2638 /***************** Bit definition for DAC_DHR12L1 register ******************/
emilmont 77:869cf507173a 2639 #define DAC_DHR12L1_DACC1DHR ((uint32_t)0x0000FFF0) /*!<DAC channel1 12-bit Left aligned data */
emilmont 77:869cf507173a 2640
emilmont 77:869cf507173a 2641 /****************** Bit definition for DAC_DHR8R1 register ******************/
emilmont 77:869cf507173a 2642 #define DAC_DHR8R1_DACC1DHR ((uint32_t)0x000000FF) /*!<DAC channel1 8-bit Right aligned data */
emilmont 77:869cf507173a 2643
emilmont 77:869cf507173a 2644 /******************* Bit definition for DAC_DOR1 register *******************/
emilmont 77:869cf507173a 2645 #define DAC_DOR1_DACC1DOR ((uint32_t)0x00000FFF) /*!<DAC channel1 data output */
emilmont 77:869cf507173a 2646
emilmont 77:869cf507173a 2647 /******************** Bit definition for DAC_SR register ********************/
emilmont 77:869cf507173a 2648 #define DAC_SR_DMAUDR1 ((uint32_t)0x00002000) /*!< DAC channel1 DMA underrun flag */
emilmont 77:869cf507173a 2649 #define DAC_SR_DMAUDR2 ((uint32_t)0x20000000) /*!< DAC channel2 DMA underrun flag (only for STM32F072 and STM32F042 devices) */
emilmont 77:869cf507173a 2650
emilmont 77:869cf507173a 2651 /******************************************************************************/
emilmont 77:869cf507173a 2652 /* */
emilmont 77:869cf507173a 2653 /* Debug MCU (DBGMCU) */
emilmont 77:869cf507173a 2654 /* */
emilmont 77:869cf507173a 2655 /******************************************************************************/
emilmont 77:869cf507173a 2656
emilmont 77:869cf507173a 2657 /**************** Bit definition for DBGMCU_IDCODE register *****************/
emilmont 77:869cf507173a 2658 #define DBGMCU_IDCODE_DEV_ID ((uint32_t)0x00000FFF) /*!< Device Identifier */
emilmont 77:869cf507173a 2659
emilmont 77:869cf507173a 2660 #define DBGMCU_IDCODE_REV_ID ((uint32_t)0xFFFF0000) /*!< REV_ID[15:0] bits (Revision Identifier) */
emilmont 77:869cf507173a 2661 #define DBGMCU_IDCODE_REV_ID_0 ((uint32_t)0x00010000) /*!< Bit 0 */
emilmont 77:869cf507173a 2662 #define DBGMCU_IDCODE_REV_ID_1 ((uint32_t)0x00020000) /*!< Bit 1 */
emilmont 77:869cf507173a 2663 #define DBGMCU_IDCODE_REV_ID_2 ((uint32_t)0x00040000) /*!< Bit 2 */
emilmont 77:869cf507173a 2664 #define DBGMCU_IDCODE_REV_ID_3 ((uint32_t)0x00080000) /*!< Bit 3 */
emilmont 77:869cf507173a 2665 #define DBGMCU_IDCODE_REV_ID_4 ((uint32_t)0x00100000) /*!< Bit 4 */
emilmont 77:869cf507173a 2666 #define DBGMCU_IDCODE_REV_ID_5 ((uint32_t)0x00200000) /*!< Bit 5 */
emilmont 77:869cf507173a 2667 #define DBGMCU_IDCODE_REV_ID_6 ((uint32_t)0x00400000) /*!< Bit 6 */
emilmont 77:869cf507173a 2668 #define DBGMCU_IDCODE_REV_ID_7 ((uint32_t)0x00800000) /*!< Bit 7 */
emilmont 77:869cf507173a 2669 #define DBGMCU_IDCODE_REV_ID_8 ((uint32_t)0x01000000) /*!< Bit 8 */
emilmont 77:869cf507173a 2670 #define DBGMCU_IDCODE_REV_ID_9 ((uint32_t)0x02000000) /*!< Bit 9 */
emilmont 77:869cf507173a 2671 #define DBGMCU_IDCODE_REV_ID_10 ((uint32_t)0x04000000) /*!< Bit 10 */
emilmont 77:869cf507173a 2672 #define DBGMCU_IDCODE_REV_ID_11 ((uint32_t)0x08000000) /*!< Bit 11 */
emilmont 77:869cf507173a 2673 #define DBGMCU_IDCODE_REV_ID_12 ((uint32_t)0x10000000) /*!< Bit 12 */
emilmont 77:869cf507173a 2674 #define DBGMCU_IDCODE_REV_ID_13 ((uint32_t)0x20000000) /*!< Bit 13 */
emilmont 77:869cf507173a 2675 #define DBGMCU_IDCODE_REV_ID_14 ((uint32_t)0x40000000) /*!< Bit 14 */
emilmont 77:869cf507173a 2676 #define DBGMCU_IDCODE_REV_ID_15 ((uint32_t)0x80000000) /*!< Bit 15 */
emilmont 77:869cf507173a 2677
emilmont 77:869cf507173a 2678 /****************** Bit definition for DBGMCU_CR register *******************/
emilmont 77:869cf507173a 2679 #define DBGMCU_CR_DBG_STOP ((uint32_t)0x00000002) /*!< Debug Stop Mode */
emilmont 77:869cf507173a 2680 #define DBGMCU_CR_DBG_STANDBY ((uint32_t)0x00000004) /*!< Debug Standby mode */
emilmont 77:869cf507173a 2681
emilmont 77:869cf507173a 2682 /****************** Bit definition for DBGMCU_APB1_FZ register **************/
emilmont 77:869cf507173a 2683 #define DBGMCU_APB1_FZ_DBG_TIM2_STOP ((uint32_t)0x00000001) /*!< TIM2 counter stopped when core is halted */
emilmont 77:869cf507173a 2684 #define DBGMCU_APB1_FZ_DBG_TIM3_STOP ((uint32_t)0x00000002) /*!< TIM3 counter stopped when core is halted */
emilmont 77:869cf507173a 2685 #define DBGMCU_APB1_FZ_DBG_TIM6_STOP ((uint32_t)0x00000010) /*!< TIM6 counter stopped when core is halted (not available on STM32F042 devices)*/
emilmont 77:869cf507173a 2686 #define DBGMCU_APB1_FZ_DBG_TIM7_STOP ((uint32_t)0x00000020) /*!< TIM7 counter stopped when core is halted (only for STM32F072 devices) */
emilmont 77:869cf507173a 2687 #define DBGMCU_APB1_FZ_DBG_TIM14_STOP ((uint32_t)0x00000100) /*!< TIM14 counter stopped when core is halted */
emilmont 77:869cf507173a 2688 #define DBGMCU_APB1_FZ_DBG_RTC_STOP ((uint32_t)0x00000400) /*!< RTC Calendar frozen when core is halted */
emilmont 77:869cf507173a 2689 #define DBGMCU_APB1_FZ_DBG_WWDG_STOP ((uint32_t)0x00000800) /*!< Debug Window Watchdog stopped when Core is halted */
emilmont 77:869cf507173a 2690 #define DBGMCU_APB1_FZ_DBG_IWDG_STOP ((uint32_t)0x00001000) /*!< Debug Independent Watchdog stopped when Core is halted */
emilmont 77:869cf507173a 2691 #define DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT ((uint32_t)0x00200000) /*!< I2C1 SMBUS timeout mode stopped when Core is halted */
emilmont 77:869cf507173a 2692 #define DBGMCU_APB1_FZ_DBG_CAN_STOP ((uint32_t)0x02000000) /*!< CAN debug stopped when Core is halted (only for STM32F072 devices) */
emilmont 77:869cf507173a 2693
emilmont 77:869cf507173a 2694 /****************** Bit definition for DBGMCU_APB2_FZ register **************/
emilmont 77:869cf507173a 2695 #define DBGMCU_APB2_FZ_DBG_TIM1_STOP ((uint32_t)0x00000800) /*!< TIM1 counter stopped when core is halted */
emilmont 77:869cf507173a 2696 #define DBGMCU_APB2_FZ_DBG_TIM15_STOP ((uint32_t)0x00010000) /*!< TIM15 counter stopped when core is halted (not available on STM32F042 devices) */
emilmont 77:869cf507173a 2697 #define DBGMCU_APB2_FZ_DBG_TIM16_STOP ((uint32_t)0x00020000) /*!< TIM16 counter stopped when core is halted */
emilmont 77:869cf507173a 2698 #define DBGMCU_APB2_FZ_DBG_TIM17_STOP ((uint32_t)0x00040000) /*!< TIM17 counter stopped when core is halted */
emilmont 77:869cf507173a 2699
emilmont 77:869cf507173a 2700 /******************************************************************************/
emilmont 77:869cf507173a 2701 /* */
emilmont 77:869cf507173a 2702 /* DMA Controller (DMA) */
emilmont 77:869cf507173a 2703 /* */
emilmont 77:869cf507173a 2704 /******************************************************************************/
emilmont 77:869cf507173a 2705
emilmont 77:869cf507173a 2706 /******************* Bit definition for DMA_ISR register ********************/
emilmont 77:869cf507173a 2707 #define DMA_ISR_GIF1 ((uint32_t)0x00000001) /*!< Channel 1 Global interrupt flag */
emilmont 77:869cf507173a 2708 #define DMA_ISR_TCIF1 ((uint32_t)0x00000002) /*!< Channel 1 Transfer Complete flag */
emilmont 77:869cf507173a 2709 #define DMA_ISR_HTIF1 ((uint32_t)0x00000004) /*!< Channel 1 Half Transfer flag */
emilmont 77:869cf507173a 2710 #define DMA_ISR_TEIF1 ((uint32_t)0x00000008) /*!< Channel 1 Transfer Error flag */
emilmont 77:869cf507173a 2711 #define DMA_ISR_GIF2 ((uint32_t)0x00000010) /*!< Channel 2 Global interrupt flag */
emilmont 77:869cf507173a 2712 #define DMA_ISR_TCIF2 ((uint32_t)0x00000020) /*!< Channel 2 Transfer Complete flag */
emilmont 77:869cf507173a 2713 #define DMA_ISR_HTIF2 ((uint32_t)0x00000040) /*!< Channel 2 Half Transfer flag */
emilmont 77:869cf507173a 2714 #define DMA_ISR_TEIF2 ((uint32_t)0x00000080) /*!< Channel 2 Transfer Error flag */
emilmont 77:869cf507173a 2715 #define DMA_ISR_GIF3 ((uint32_t)0x00000100) /*!< Channel 3 Global interrupt flag */
emilmont 77:869cf507173a 2716 #define DMA_ISR_TCIF3 ((uint32_t)0x00000200) /*!< Channel 3 Transfer Complete flag */
emilmont 77:869cf507173a 2717 #define DMA_ISR_HTIF3 ((uint32_t)0x00000400) /*!< Channel 3 Half Transfer flag */
emilmont 77:869cf507173a 2718 #define DMA_ISR_TEIF3 ((uint32_t)0x00000800) /*!< Channel 3 Transfer Error flag */
emilmont 77:869cf507173a 2719 #define DMA_ISR_GIF4 ((uint32_t)0x00001000) /*!< Channel 4 Global interrupt flag */
emilmont 77:869cf507173a 2720 #define DMA_ISR_TCIF4 ((uint32_t)0x00002000) /*!< Channel 4 Transfer Complete flag */
emilmont 77:869cf507173a 2721 #define DMA_ISR_HTIF4 ((uint32_t)0x00004000) /*!< Channel 4 Half Transfer flag */
emilmont 77:869cf507173a 2722 #define DMA_ISR_TEIF4 ((uint32_t)0x00008000) /*!< Channel 4 Transfer Error flag */
emilmont 77:869cf507173a 2723 #define DMA_ISR_GIF5 ((uint32_t)0x00010000) /*!< Channel 5 Global interrupt flag */
emilmont 77:869cf507173a 2724 #define DMA_ISR_TCIF5 ((uint32_t)0x00020000) /*!< Channel 5 Transfer Complete flag */
emilmont 77:869cf507173a 2725 #define DMA_ISR_HTIF5 ((uint32_t)0x00040000) /*!< Channel 5 Half Transfer flag */
emilmont 77:869cf507173a 2726 #define DMA_ISR_TEIF5 ((uint32_t)0x00080000) /*!< Channel 5 Transfer Error flag */
emilmont 77:869cf507173a 2727 #define DMA_ISR_GIF6 ((uint32_t)0x00100000) /*!< Channel 6 Global interrupt flag (only for STM32F072 devices) */
emilmont 77:869cf507173a 2728 #define DMA_ISR_TCIF6 ((uint32_t)0x00200000) /*!< Channel 6 Transfer Complete flag (only for STM32F072 devices) */
emilmont 77:869cf507173a 2729 #define DMA_ISR_HTIF6 ((uint32_t)0x00400000) /*!< Channel 6 Half Transfer flag (only for STM32F072 devices) */
emilmont 77:869cf507173a 2730 #define DMA_ISR_TEIF6 ((uint32_t)0x00800000) /*!< Channel 6 Transfer Error flag (only for STM32F072 devices) */
emilmont 77:869cf507173a 2731 #define DMA_ISR_GIF7 ((uint32_t)0x01000000) /*!< Channel 7 Global interrupt flag (only for STM32F072 devices) */
emilmont 77:869cf507173a 2732 #define DMA_ISR_TCIF7 ((uint32_t)0x02000000) /*!< Channel 7 Transfer Complete flag (only for STM32F072 devices) */
emilmont 77:869cf507173a 2733 #define DMA_ISR_HTIF7 ((uint32_t)0x04000000) /*!< Channel 7 Half Transfer flag (only for STM32F072 devices) */
emilmont 77:869cf507173a 2734 #define DMA_ISR_TEIF7 ((uint32_t)0x08000000) /*!< Channel 7 Transfer Error flag (only for STM32F072 devices) */
emilmont 77:869cf507173a 2735
emilmont 77:869cf507173a 2736 /******************* Bit definition for DMA_IFCR register *******************/
emilmont 77:869cf507173a 2737 #define DMA_IFCR_CGIF1 ((uint32_t)0x00000001) /*!< Channel 1 Global interrupt clear */
emilmont 77:869cf507173a 2738 #define DMA_IFCR_CTCIF1 ((uint32_t)0x00000002) /*!< Channel 1 Transfer Complete clear */
emilmont 77:869cf507173a 2739 #define DMA_IFCR_CHTIF1 ((uint32_t)0x00000004) /*!< Channel 1 Half Transfer clear */
emilmont 77:869cf507173a 2740 #define DMA_IFCR_CTEIF1 ((uint32_t)0x00000008) /*!< Channel 1 Transfer Error clear */
emilmont 77:869cf507173a 2741 #define DMA_IFCR_CGIF2 ((uint32_t)0x00000010) /*!< Channel 2 Global interrupt clear */
emilmont 77:869cf507173a 2742 #define DMA_IFCR_CTCIF2 ((uint32_t)0x00000020) /*!< Channel 2 Transfer Complete clear */
emilmont 77:869cf507173a 2743 #define DMA_IFCR_CHTIF2 ((uint32_t)0x00000040) /*!< Channel 2 Half Transfer clear */
emilmont 77:869cf507173a 2744 #define DMA_IFCR_CTEIF2 ((uint32_t)0x00000080) /*!< Channel 2 Transfer Error clear */
emilmont 77:869cf507173a 2745 #define DMA_IFCR_CGIF3 ((uint32_t)0x00000100) /*!< Channel 3 Global interrupt clear */
emilmont 77:869cf507173a 2746 #define DMA_IFCR_CTCIF3 ((uint32_t)0x00000200) /*!< Channel 3 Transfer Complete clear */
emilmont 77:869cf507173a 2747 #define DMA_IFCR_CHTIF3 ((uint32_t)0x00000400) /*!< Channel 3 Half Transfer clear */
emilmont 77:869cf507173a 2748 #define DMA_IFCR_CTEIF3 ((uint32_t)0x00000800) /*!< Channel 3 Transfer Error clear */
emilmont 77:869cf507173a 2749 #define DMA_IFCR_CGIF4 ((uint32_t)0x00001000) /*!< Channel 4 Global interrupt clear */
emilmont 77:869cf507173a 2750 #define DMA_IFCR_CTCIF4 ((uint32_t)0x00002000) /*!< Channel 4 Transfer Complete clear */
emilmont 77:869cf507173a 2751 #define DMA_IFCR_CHTIF4 ((uint32_t)0x00004000) /*!< Channel 4 Half Transfer clear */
emilmont 77:869cf507173a 2752 #define DMA_IFCR_CTEIF4 ((uint32_t)0x00008000) /*!< Channel 4 Transfer Error clear */
emilmont 77:869cf507173a 2753 #define DMA_IFCR_CGIF5 ((uint32_t)0x00010000) /*!< Channel 5 Global interrupt clear */
emilmont 77:869cf507173a 2754 #define DMA_IFCR_CTCIF5 ((uint32_t)0x00020000) /*!< Channel 5 Transfer Complete clear */
emilmont 77:869cf507173a 2755 #define DMA_IFCR_CHTIF5 ((uint32_t)0x00040000) /*!< Channel 5 Half Transfer clear */
emilmont 77:869cf507173a 2756 #define DMA_IFCR_CTEIF5 ((uint32_t)0x00080000) /*!< Channel 5 Transfer Error clear */
emilmont 77:869cf507173a 2757 #define DMA_IFCR_CGIF6 ((uint32_t)0x00100000) /*!< Channel 6 Global interrupt clear (only for STM32F072 devices) */
emilmont 77:869cf507173a 2758 #define DMA_IFCR_CTCIF6 ((uint32_t)0x00200000) /*!< Channel 6 Transfer Complete clear (only for STM32F072 devices) */
emilmont 77:869cf507173a 2759 #define DMA_IFCR_CHTIF6 ((uint32_t)0x00400000) /*!< Channel 6 Half Transfer clear (only for STM32F072 devices) */
emilmont 77:869cf507173a 2760 #define DMA_IFCR_CTEIF6 ((uint32_t)0x00800000) /*!< Channel 6 Transfer Error clear (only for STM32F072 devices) */
emilmont 77:869cf507173a 2761 #define DMA_IFCR_CGIF7 ((uint32_t)0x01000000) /*!< Channel 7 Global interrupt clear (only for STM32F072 devices) */
emilmont 77:869cf507173a 2762 #define DMA_IFCR_CTCIF7 ((uint32_t)0x02000000) /*!< Channel 7 Transfer Complete clear (only for STM32F072 devices) */
emilmont 77:869cf507173a 2763 #define DMA_IFCR_CHTIF7 ((uint32_t)0x04000000) /*!< Channel 7 Half Transfer clear (only for STM32F072 devices) */
emilmont 77:869cf507173a 2764 #define DMA_IFCR_CTEIF7 ((uint32_t)0x08000000) /*!< Channel 7 Transfer Error clear (only for STM32F072 devices) */
emilmont 77:869cf507173a 2765
emilmont 77:869cf507173a 2766 /******************* Bit definition for DMA_CCR register ********************/
emilmont 77:869cf507173a 2767 #define DMA_CCR_EN ((uint32_t)0x00000001) /*!< Channel enable */
emilmont 77:869cf507173a 2768 #define DMA_CCR_TCIE ((uint32_t)0x00000002) /*!< Transfer complete interrupt enable */
emilmont 77:869cf507173a 2769 #define DMA_CCR_HTIE ((uint32_t)0x00000004) /*!< Half Transfer interrupt enable */
emilmont 77:869cf507173a 2770 #define DMA_CCR_TEIE ((uint32_t)0x00000008) /*!< Transfer error interrupt enable */
emilmont 77:869cf507173a 2771 #define DMA_CCR_DIR ((uint32_t)0x00000010) /*!< Data transfer direction */
emilmont 77:869cf507173a 2772 #define DMA_CCR_CIRC ((uint32_t)0x00000020) /*!< Circular mode */
emilmont 77:869cf507173a 2773 #define DMA_CCR_PINC ((uint32_t)0x00000040) /*!< Peripheral increment mode */
emilmont 77:869cf507173a 2774 #define DMA_CCR_MINC ((uint32_t)0x00000080) /*!< Memory increment mode */
emilmont 77:869cf507173a 2775
emilmont 77:869cf507173a 2776 #define DMA_CCR_PSIZE ((uint32_t)0x00000300) /*!< PSIZE[1:0] bits (Peripheral size) */
emilmont 77:869cf507173a 2777 #define DMA_CCR_PSIZE_0 ((uint32_t)0x00000100) /*!< Bit 0 */
emilmont 77:869cf507173a 2778 #define DMA_CCR_PSIZE_1 ((uint32_t)0x00000200) /*!< Bit 1 */
emilmont 77:869cf507173a 2779
emilmont 77:869cf507173a 2780 #define DMA_CCR_MSIZE ((uint32_t)0x00000C00) /*!< MSIZE[1:0] bits (Memory size) */
emilmont 77:869cf507173a 2781 #define DMA_CCR_MSIZE_0 ((uint32_t)0x00000400) /*!< Bit 0 */
emilmont 77:869cf507173a 2782 #define DMA_CCR_MSIZE_1 ((uint32_t)0x00000800) /*!< Bit 1 */
emilmont 77:869cf507173a 2783
emilmont 77:869cf507173a 2784 #define DMA_CCR_PL ((uint32_t)0x00003000) /*!< PL[1:0] bits(Channel Priority level)*/
emilmont 77:869cf507173a 2785 #define DMA_CCR_PL_0 ((uint32_t)0x00001000) /*!< Bit 0 */
emilmont 77:869cf507173a 2786 #define DMA_CCR_PL_1 ((uint32_t)0x00002000) /*!< Bit 1 */
emilmont 77:869cf507173a 2787
emilmont 77:869cf507173a 2788 #define DMA_CCR_MEM2MEM ((uint32_t)0x00004000) /*!< Memory to memory mode */
emilmont 77:869cf507173a 2789
emilmont 77:869cf507173a 2790 /****************** Bit definition for DMA_CNDTR register *******************/
emilmont 77:869cf507173a 2791 #define DMA_CNDTR_NDT ((uint32_t)0x0000FFFF) /*!< Number of data to Transfer */
emilmont 77:869cf507173a 2792
emilmont 77:869cf507173a 2793 /****************** Bit definition for DMA_CPAR register ********************/
emilmont 77:869cf507173a 2794 #define DMA_CPAR_PA ((uint32_t)0xFFFFFFFF) /*!< Peripheral Address */
emilmont 77:869cf507173a 2795
emilmont 77:869cf507173a 2796 /****************** Bit definition for DMA_CMAR register ********************/
emilmont 77:869cf507173a 2797 #define DMA_CMAR_MA ((uint32_t)0xFFFFFFFF) /*!< Memory Address */
emilmont 77:869cf507173a 2798
emilmont 77:869cf507173a 2799 /******************************************************************************/
emilmont 77:869cf507173a 2800 /* */
emilmont 77:869cf507173a 2801 /* External Interrupt/Event Controller (EXTI) */
emilmont 77:869cf507173a 2802 /* */
emilmont 77:869cf507173a 2803 /******************************************************************************/
emilmont 77:869cf507173a 2804 /******************* Bit definition for EXTI_IMR register *******************/
emilmont 77:869cf507173a 2805 #define EXTI_IMR_MR0 ((uint32_t)0x00000001) /*!< Interrupt Mask on line 0 */
emilmont 77:869cf507173a 2806 #define EXTI_IMR_MR1 ((uint32_t)0x00000002) /*!< Interrupt Mask on line 1 */
emilmont 77:869cf507173a 2807 #define EXTI_IMR_MR2 ((uint32_t)0x00000004) /*!< Interrupt Mask on line 2 */
emilmont 77:869cf507173a 2808 #define EXTI_IMR_MR3 ((uint32_t)0x00000008) /*!< Interrupt Mask on line 3 */
emilmont 77:869cf507173a 2809 #define EXTI_IMR_MR4 ((uint32_t)0x00000010) /*!< Interrupt Mask on line 4 */
emilmont 77:869cf507173a 2810 #define EXTI_IMR_MR5 ((uint32_t)0x00000020) /*!< Interrupt Mask on line 5 */
emilmont 77:869cf507173a 2811 #define EXTI_IMR_MR6 ((uint32_t)0x00000040) /*!< Interrupt Mask on line 6 */
emilmont 77:869cf507173a 2812 #define EXTI_IMR_MR7 ((uint32_t)0x00000080) /*!< Interrupt Mask on line 7 */
emilmont 77:869cf507173a 2813 #define EXTI_IMR_MR8 ((uint32_t)0x00000100) /*!< Interrupt Mask on line 8 */
emilmont 77:869cf507173a 2814 #define EXTI_IMR_MR9 ((uint32_t)0x00000200) /*!< Interrupt Mask on line 9 */
emilmont 77:869cf507173a 2815 #define EXTI_IMR_MR10 ((uint32_t)0x00000400) /*!< Interrupt Mask on line 10 */
emilmont 77:869cf507173a 2816 #define EXTI_IMR_MR11 ((uint32_t)0x00000800) /*!< Interrupt Mask on line 11 */
emilmont 77:869cf507173a 2817 #define EXTI_IMR_MR12 ((uint32_t)0x00001000) /*!< Interrupt Mask on line 12 */
emilmont 77:869cf507173a 2818 #define EXTI_IMR_MR13 ((uint32_t)0x00002000) /*!< Interrupt Mask on line 13 */
emilmont 77:869cf507173a 2819 #define EXTI_IMR_MR14 ((uint32_t)0x00004000) /*!< Interrupt Mask on line 14 */
emilmont 77:869cf507173a 2820 #define EXTI_IMR_MR15 ((uint32_t)0x00008000) /*!< Interrupt Mask on line 15 */
emilmont 77:869cf507173a 2821 #define EXTI_IMR_MR16 ((uint32_t)0x00010000) /*!< Interrupt Mask on line 16 */
emilmont 77:869cf507173a 2822 #define EXTI_IMR_MR17 ((uint32_t)0x00020000) /*!< Interrupt Mask on line 17 */
emilmont 77:869cf507173a 2823 #define EXTI_IMR_MR18 ((uint32_t)0x00040000) /*!< Interrupt Mask on line 18 */
emilmont 77:869cf507173a 2824 #define EXTI_IMR_MR19 ((uint32_t)0x00080000) /*!< Interrupt Mask on line 19 */
emilmont 77:869cf507173a 2825 #define EXTI_IMR_MR20 ((uint32_t)0x00100000) /*!< Interrupt Mask on line 20 */
emilmont 77:869cf507173a 2826 #define EXTI_IMR_MR21 ((uint32_t)0x00200000) /*!< Interrupt Mask on line 21 */
emilmont 77:869cf507173a 2827 #define EXTI_IMR_MR22 ((uint32_t)0x00400000) /*!< Interrupt Mask on line 22 */
emilmont 77:869cf507173a 2828 #define EXTI_IMR_MR23 ((uint32_t)0x00800000) /*!< Interrupt Mask on line 23 */
emilmont 77:869cf507173a 2829 #define EXTI_IMR_MR24 ((uint32_t)0x01000000) /*!< Interrupt Mask on line 24 */
emilmont 77:869cf507173a 2830 #define EXTI_IMR_MR25 ((uint32_t)0x02000000) /*!< Interrupt Mask on line 25 */
emilmont 77:869cf507173a 2831 #define EXTI_IMR_MR26 ((uint32_t)0x04000000) /*!< Interrupt Mask on line 26 */
emilmont 77:869cf507173a 2832 #define EXTI_IMR_MR27 ((uint32_t)0x08000000) /*!< Interrupt Mask on line 27 */
emilmont 77:869cf507173a 2833 #define EXTI_IMR_MR28 ((uint32_t)0x10000000) /*!< Interrupt Mask on line 28 */
emilmont 77:869cf507173a 2834 #define EXTI_IMR_MR29 ((uint32_t)0x20000000) /*!< Interrupt Mask on line 29 */
emilmont 77:869cf507173a 2835 #define EXTI_IMR_MR30 ((uint32_t)0x40000000) /*!< Interrupt Mask on line 30 */
emilmont 77:869cf507173a 2836 #define EXTI_IMR_MR31 ((uint32_t)0x80000000) /*!< Interrupt Mask on line 31 */
emilmont 77:869cf507173a 2837
emilmont 77:869cf507173a 2838 /****************** Bit definition for EXTI_EMR register ********************/
emilmont 77:869cf507173a 2839 #define EXTI_EMR_MR0 ((uint32_t)0x00000001) /*!< Event Mask on line 0 */
emilmont 77:869cf507173a 2840 #define EXTI_EMR_MR1 ((uint32_t)0x00000002) /*!< Event Mask on line 1 */
emilmont 77:869cf507173a 2841 #define EXTI_EMR_MR2 ((uint32_t)0x00000004) /*!< Event Mask on line 2 */
emilmont 77:869cf507173a 2842 #define EXTI_EMR_MR3 ((uint32_t)0x00000008) /*!< Event Mask on line 3 */
emilmont 77:869cf507173a 2843 #define EXTI_EMR_MR4 ((uint32_t)0x00000010) /*!< Event Mask on line 4 */
emilmont 77:869cf507173a 2844 #define EXTI_EMR_MR5 ((uint32_t)0x00000020) /*!< Event Mask on line 5 */
emilmont 77:869cf507173a 2845 #define EXTI_EMR_MR6 ((uint32_t)0x00000040) /*!< Event Mask on line 6 */
emilmont 77:869cf507173a 2846 #define EXTI_EMR_MR7 ((uint32_t)0x00000080) /*!< Event Mask on line 7 */
emilmont 77:869cf507173a 2847 #define EXTI_EMR_MR8 ((uint32_t)0x00000100) /*!< Event Mask on line 8 */
emilmont 77:869cf507173a 2848 #define EXTI_EMR_MR9 ((uint32_t)0x00000200) /*!< Event Mask on line 9 */
emilmont 77:869cf507173a 2849 #define EXTI_EMR_MR10 ((uint32_t)0x00000400) /*!< Event Mask on line 10 */
emilmont 77:869cf507173a 2850 #define EXTI_EMR_MR11 ((uint32_t)0x00000800) /*!< Event Mask on line 11 */
emilmont 77:869cf507173a 2851 #define EXTI_EMR_MR12 ((uint32_t)0x00001000) /*!< Event Mask on line 12 */
emilmont 77:869cf507173a 2852 #define EXTI_EMR_MR13 ((uint32_t)0x00002000) /*!< Event Mask on line 13 */
emilmont 77:869cf507173a 2853 #define EXTI_EMR_MR14 ((uint32_t)0x00004000) /*!< Event Mask on line 14 */
emilmont 77:869cf507173a 2854 #define EXTI_EMR_MR15 ((uint32_t)0x00008000) /*!< Event Mask on line 15 */
emilmont 77:869cf507173a 2855 #define EXTI_EMR_MR16 ((uint32_t)0x00010000) /*!< Event Mask on line 16 */
emilmont 77:869cf507173a 2856 #define EXTI_EMR_MR17 ((uint32_t)0x00020000) /*!< Event Mask on line 17 */
emilmont 77:869cf507173a 2857 #define EXTI_EMR_MR18 ((uint32_t)0x00040000) /*!< Event Mask on line 18 */
emilmont 77:869cf507173a 2858 #define EXTI_EMR_MR19 ((uint32_t)0x00080000) /*!< Event Mask on line 19 */
emilmont 77:869cf507173a 2859 #define EXTI_EMR_MR20 ((uint32_t)0x00100000) /*!< Event Mask on line 20 */
emilmont 77:869cf507173a 2860 #define EXTI_EMR_MR21 ((uint32_t)0x00200000) /*!< Event Mask on line 21 */
emilmont 77:869cf507173a 2861 #define EXTI_EMR_MR22 ((uint32_t)0x00400000) /*!< Event Mask on line 22 */
emilmont 77:869cf507173a 2862 #define EXTI_EMR_MR23 ((uint32_t)0x00800000) /*!< Event Mask on line 23 */
emilmont 77:869cf507173a 2863 #define EXTI_EMR_MR24 ((uint32_t)0x01000000) /*!< Event Mask on line 24 */
emilmont 77:869cf507173a 2864 #define EXTI_EMR_MR25 ((uint32_t)0x02000000) /*!< Event Mask on line 25 */
emilmont 77:869cf507173a 2865 #define EXTI_EMR_MR26 ((uint32_t)0x04000000) /*!< Event Mask on line 26 */
emilmont 77:869cf507173a 2866 #define EXTI_EMR_MR27 ((uint32_t)0x08000000) /*!< Event Mask on line 27 */
emilmont 77:869cf507173a 2867 #define EXTI_EMR_MR28 ((uint32_t)0x10000000) /*!< Event Mask on line 28 */
emilmont 77:869cf507173a 2868 #define EXTI_EMR_MR29 ((uint32_t)0x20000000) /*!< Event Mask on line 29 */
emilmont 77:869cf507173a 2869 #define EXTI_EMR_MR30 ((uint32_t)0x40000000) /*!< Event Mask on line 30 */
emilmont 77:869cf507173a 2870 #define EXTI_EMR_MR31 ((uint32_t)0x80000000) /*!< Event Mask on line 31 */
emilmont 77:869cf507173a 2871
emilmont 77:869cf507173a 2872 /******************* Bit definition for EXTI_RTSR register ******************/
emilmont 77:869cf507173a 2873 #define EXTI_RTSR_TR0 ((uint32_t)0x00000001) /*!< Rising trigger event configuration bit of line 0 */
emilmont 77:869cf507173a 2874 #define EXTI_RTSR_TR1 ((uint32_t)0x00000002) /*!< Rising trigger event configuration bit of line 1 */
emilmont 77:869cf507173a 2875 #define EXTI_RTSR_TR2 ((uint32_t)0x00000004) /*!< Rising trigger event configuration bit of line 2 */
emilmont 77:869cf507173a 2876 #define EXTI_RTSR_TR3 ((uint32_t)0x00000008) /*!< Rising trigger event configuration bit of line 3 */
emilmont 77:869cf507173a 2877 #define EXTI_RTSR_TR4 ((uint32_t)0x00000010) /*!< Rising trigger event configuration bit of line 4 */
emilmont 77:869cf507173a 2878 #define EXTI_RTSR_TR5 ((uint32_t)0x00000020) /*!< Rising trigger event configuration bit of line 5 */
emilmont 77:869cf507173a 2879 #define EXTI_RTSR_TR6 ((uint32_t)0x00000040) /*!< Rising trigger event configuration bit of line 6 */
emilmont 77:869cf507173a 2880 #define EXTI_RTSR_TR7 ((uint32_t)0x00000080) /*!< Rising trigger event configuration bit of line 7 */
emilmont 77:869cf507173a 2881 #define EXTI_RTSR_TR8 ((uint32_t)0x00000100) /*!< Rising trigger event configuration bit of line 8 */
emilmont 77:869cf507173a 2882 #define EXTI_RTSR_TR9 ((uint32_t)0x00000200) /*!< Rising trigger event configuration bit of line 9 */
emilmont 77:869cf507173a 2883 #define EXTI_RTSR_TR10 ((uint32_t)0x00000400) /*!< Rising trigger event configuration bit of line 10 */
emilmont 77:869cf507173a 2884 #define EXTI_RTSR_TR11 ((uint32_t)0x00000800) /*!< Rising trigger event configuration bit of line 11 */
emilmont 77:869cf507173a 2885 #define EXTI_RTSR_TR12 ((uint32_t)0x00001000) /*!< Rising trigger event configuration bit of line 12 */
emilmont 77:869cf507173a 2886 #define EXTI_RTSR_TR13 ((uint32_t)0x00002000) /*!< Rising trigger event configuration bit of line 13 */
emilmont 77:869cf507173a 2887 #define EXTI_RTSR_TR14 ((uint32_t)0x00004000) /*!< Rising trigger event configuration bit of line 14 */
emilmont 77:869cf507173a 2888 #define EXTI_RTSR_TR15 ((uint32_t)0x00008000) /*!< Rising trigger event configuration bit of line 15 */
emilmont 77:869cf507173a 2889 #define EXTI_RTSR_TR16 ((uint32_t)0x00010000) /*!< Rising trigger event configuration bit of line 16 */
emilmont 77:869cf507173a 2890 #define EXTI_RTSR_TR17 ((uint32_t)0x00020000) /*!< Rising trigger event configuration bit of line 17 */
emilmont 77:869cf507173a 2891 #define EXTI_RTSR_TR19 ((uint32_t)0x00080000) /*!< Rising trigger event configuration bit of line 19 */
emilmont 77:869cf507173a 2892 #define EXTI_RTSR_TR20 ((uint32_t)0x00100000) /*!< Rising trigger event configuration bit of line 20 */
emilmont 77:869cf507173a 2893 #define EXTI_RTSR_TR21 ((uint32_t)0x00200000) /*!< Rising trigger event configuration bit of line 21 */
emilmont 77:869cf507173a 2894 #define EXTI_RTSR_TR22 ((uint32_t)0x00400000) /*!< Rising trigger event configuration bit of line 22 */
emilmont 77:869cf507173a 2895
emilmont 77:869cf507173a 2896 /******************* Bit definition for EXTI_FTSR register *******************/
emilmont 77:869cf507173a 2897 #define EXTI_FTSR_TR0 ((uint32_t)0x00000001) /*!< Falling trigger event configuration bit of line 0 */
emilmont 77:869cf507173a 2898 #define EXTI_FTSR_TR1 ((uint32_t)0x00000002) /*!< Falling trigger event configuration bit of line 1 */
emilmont 77:869cf507173a 2899 #define EXTI_FTSR_TR2 ((uint32_t)0x00000004) /*!< Falling trigger event configuration bit of line 2 */
emilmont 77:869cf507173a 2900 #define EXTI_FTSR_TR3 ((uint32_t)0x00000008) /*!< Falling trigger event configuration bit of line 3 */
emilmont 77:869cf507173a 2901 #define EXTI_FTSR_TR4 ((uint32_t)0x00000010) /*!< Falling trigger event configuration bit of line 4 */
emilmont 77:869cf507173a 2902 #define EXTI_FTSR_TR5 ((uint32_t)0x00000020) /*!< Falling trigger event configuration bit of line 5 */
emilmont 77:869cf507173a 2903 #define EXTI_FTSR_TR6 ((uint32_t)0x00000040) /*!< Falling trigger event configuration bit of line 6 */
emilmont 77:869cf507173a 2904 #define EXTI_FTSR_TR7 ((uint32_t)0x00000080) /*!< Falling trigger event configuration bit of line 7 */
emilmont 77:869cf507173a 2905 #define EXTI_FTSR_TR8 ((uint32_t)0x00000100) /*!< Falling trigger event configuration bit of line 8 */
emilmont 77:869cf507173a 2906 #define EXTI_FTSR_TR9 ((uint32_t)0x00000200) /*!< Falling trigger event configuration bit of line 9 */
emilmont 77:869cf507173a 2907 #define EXTI_FTSR_TR10 ((uint32_t)0x00000400) /*!< Falling trigger event configuration bit of line 10 */
emilmont 77:869cf507173a 2908 #define EXTI_FTSR_TR11 ((uint32_t)0x00000800) /*!< Falling trigger event configuration bit of line 11 */
emilmont 77:869cf507173a 2909 #define EXTI_FTSR_TR12 ((uint32_t)0x00001000) /*!< Falling trigger event configuration bit of line 12 */
emilmont 77:869cf507173a 2910 #define EXTI_FTSR_TR13 ((uint32_t)0x00002000) /*!< Falling trigger event configuration bit of line 13 */
emilmont 77:869cf507173a 2911 #define EXTI_FTSR_TR14 ((uint32_t)0x00004000) /*!< Falling trigger event configuration bit of line 14 */
emilmont 77:869cf507173a 2912 #define EXTI_FTSR_TR15 ((uint32_t)0x00008000) /*!< Falling trigger event configuration bit of line 15 */
emilmont 77:869cf507173a 2913 #define EXTI_FTSR_TR16 ((uint32_t)0x00010000) /*!< Falling trigger event configuration bit of line 16 */
emilmont 77:869cf507173a 2914 #define EXTI_FTSR_TR17 ((uint32_t)0x00020000) /*!< Falling trigger event configuration bit of line 17 */
emilmont 77:869cf507173a 2915 #define EXTI_FTSR_TR19 ((uint32_t)0x00080000) /*!< Falling trigger event configuration bit of line 19 */
emilmont 77:869cf507173a 2916 #define EXTI_FTSR_TR20 ((uint32_t)0x00100000) /*!< Falling trigger event configuration bit of line 20 */
emilmont 77:869cf507173a 2917 #define EXTI_FTSR_TR21 ((uint32_t)0x00200000) /*!< Falling trigger event configuration bit of line 21 */
emilmont 77:869cf507173a 2918 #define EXTI_FTSR_TR22 ((uint32_t)0x00400000) /*!< Falling trigger event configuration bit of line 22 */
emilmont 77:869cf507173a 2919
emilmont 77:869cf507173a 2920 /******************* Bit definition for EXTI_SWIER register *******************/
emilmont 77:869cf507173a 2921 #define EXTI_SWIER_SWIER0 ((uint32_t)0x00000001) /*!< Software Interrupt on line 0 */
emilmont 77:869cf507173a 2922 #define EXTI_SWIER_SWIER1 ((uint32_t)0x00000002) /*!< Software Interrupt on line 1 */
emilmont 77:869cf507173a 2923 #define EXTI_SWIER_SWIER2 ((uint32_t)0x00000004) /*!< Software Interrupt on line 2 */
emilmont 77:869cf507173a 2924 #define EXTI_SWIER_SWIER3 ((uint32_t)0x00000008) /*!< Software Interrupt on line 3 */
emilmont 77:869cf507173a 2925 #define EXTI_SWIER_SWIER4 ((uint32_t)0x00000010) /*!< Software Interrupt on line 4 */
emilmont 77:869cf507173a 2926 #define EXTI_SWIER_SWIER5 ((uint32_t)0x00000020) /*!< Software Interrupt on line 5 */
emilmont 77:869cf507173a 2927 #define EXTI_SWIER_SWIER6 ((uint32_t)0x00000040) /*!< Software Interrupt on line 6 */
emilmont 77:869cf507173a 2928 #define EXTI_SWIER_SWIER7 ((uint32_t)0x00000080) /*!< Software Interrupt on line 7 */
emilmont 77:869cf507173a 2929 #define EXTI_SWIER_SWIER8 ((uint32_t)0x00000100) /*!< Software Interrupt on line 8 */
emilmont 77:869cf507173a 2930 #define EXTI_SWIER_SWIER9 ((uint32_t)0x00000200) /*!< Software Interrupt on line 9 */
emilmont 77:869cf507173a 2931 #define EXTI_SWIER_SWIER10 ((uint32_t)0x00000400) /*!< Software Interrupt on line 10 */
emilmont 77:869cf507173a 2932 #define EXTI_SWIER_SWIER11 ((uint32_t)0x00000800) /*!< Software Interrupt on line 11 */
emilmont 77:869cf507173a 2933 #define EXTI_SWIER_SWIER12 ((uint32_t)0x00001000) /*!< Software Interrupt on line 12 */
emilmont 77:869cf507173a 2934 #define EXTI_SWIER_SWIER13 ((uint32_t)0x00002000) /*!< Software Interrupt on line 13 */
emilmont 77:869cf507173a 2935 #define EXTI_SWIER_SWIER14 ((uint32_t)0x00004000) /*!< Software Interrupt on line 14 */
emilmont 77:869cf507173a 2936 #define EXTI_SWIER_SWIER15 ((uint32_t)0x00008000) /*!< Software Interrupt on line 15 */
emilmont 77:869cf507173a 2937 #define EXTI_SWIER_SWIER16 ((uint32_t)0x00010000) /*!< Software Interrupt on line 16 */
emilmont 77:869cf507173a 2938 #define EXTI_SWIER_SWIER17 ((uint32_t)0x00020000) /*!< Software Interrupt on line 17 */
emilmont 77:869cf507173a 2939 #define EXTI_SWIER_SWIER19 ((uint32_t)0x00080000) /*!< Software Interrupt on line 19 */
emilmont 77:869cf507173a 2940 #define EXTI_SWIER_SWIER20 ((uint32_t)0x00100000) /*!< Software Interrupt on line 20 */
emilmont 77:869cf507173a 2941 #define EXTI_SWIER_SWIER21 ((uint32_t)0x00200000) /*!< Software Interrupt on line 21 */
emilmont 77:869cf507173a 2942 #define EXTI_SWIER_SWIER22 ((uint32_t)0x00400000) /*!< Software Interrupt on line 22 */
emilmont 77:869cf507173a 2943
emilmont 77:869cf507173a 2944 /****************** Bit definition for EXTI_PR register *********************/
emilmont 77:869cf507173a 2945 #define EXTI_PR_PR0 ((uint32_t)0x00000001) /*!< Pending bit 0 */
emilmont 77:869cf507173a 2946 #define EXTI_PR_PR1 ((uint32_t)0x00000002) /*!< Pending bit 1 */
emilmont 77:869cf507173a 2947 #define EXTI_PR_PR2 ((uint32_t)0x00000004) /*!< Pending bit 2 */
emilmont 77:869cf507173a 2948 #define EXTI_PR_PR3 ((uint32_t)0x00000008) /*!< Pending bit 3 */
emilmont 77:869cf507173a 2949 #define EXTI_PR_PR4 ((uint32_t)0x00000010) /*!< Pending bit 4 */
emilmont 77:869cf507173a 2950 #define EXTI_PR_PR5 ((uint32_t)0x00000020) /*!< Pending bit 5 */
emilmont 77:869cf507173a 2951 #define EXTI_PR_PR6 ((uint32_t)0x00000040) /*!< Pending bit 6 */
emilmont 77:869cf507173a 2952 #define EXTI_PR_PR7 ((uint32_t)0x00000080) /*!< Pending bit 7 */
emilmont 77:869cf507173a 2953 #define EXTI_PR_PR8 ((uint32_t)0x00000100) /*!< Pending bit 8 */
emilmont 77:869cf507173a 2954 #define EXTI_PR_PR9 ((uint32_t)0x00000200) /*!< Pending bit 9 */
emilmont 77:869cf507173a 2955 #define EXTI_PR_PR10 ((uint32_t)0x00000400) /*!< Pending bit 10 */
emilmont 77:869cf507173a 2956 #define EXTI_PR_PR11 ((uint32_t)0x00000800) /*!< Pending bit 11 */
emilmont 77:869cf507173a 2957 #define EXTI_PR_PR12 ((uint32_t)0x00001000) /*!< Pending bit 12 */
emilmont 77:869cf507173a 2958 #define EXTI_PR_PR13 ((uint32_t)0x00002000) /*!< Pending bit 13 */
emilmont 77:869cf507173a 2959 #define EXTI_PR_PR14 ((uint32_t)0x00004000) /*!< Pending bit 14 */
emilmont 77:869cf507173a 2960 #define EXTI_PR_PR15 ((uint32_t)0x00008000) /*!< Pending bit 15 */
emilmont 77:869cf507173a 2961 #define EXTI_PR_PR16 ((uint32_t)0x00010000) /*!< Pending bit 16 */
emilmont 77:869cf507173a 2962 #define EXTI_PR_PR17 ((uint32_t)0x00020000) /*!< Pending bit 17 */
emilmont 77:869cf507173a 2963 #define EXTI_PR_PR19 ((uint32_t)0x00080000) /*!< Pending bit 19 */
emilmont 77:869cf507173a 2964 #define EXTI_PR_PR20 ((uint32_t)0x00100000) /*!< Pending bit 20 */
emilmont 77:869cf507173a 2965 #define EXTI_PR_PR21 ((uint32_t)0x00200000) /*!< Pending bit 21 */
emilmont 77:869cf507173a 2966 #define EXTI_PR_PR22 ((uint32_t)0x00400000) /*!< Pending bit 22 */
emilmont 77:869cf507173a 2967
emilmont 77:869cf507173a 2968 /******************************************************************************/
emilmont 77:869cf507173a 2969 /* */
emilmont 77:869cf507173a 2970 /* FLASH and Option Bytes Registers */
emilmont 77:869cf507173a 2971 /* */
emilmont 77:869cf507173a 2972 /******************************************************************************/
emilmont 77:869cf507173a 2973
emilmont 77:869cf507173a 2974 /******************* Bit definition for FLASH_ACR register ******************/
emilmont 77:869cf507173a 2975 #define FLASH_ACR_LATENCY ((uint32_t)0x00000001) /*!< LATENCY bit (Latency) */
emilmont 77:869cf507173a 2976
emilmont 77:869cf507173a 2977 #define FLASH_ACR_PRFTBE ((uint32_t)0x00000010) /*!< Prefetch Buffer Enable */
emilmont 77:869cf507173a 2978 #define FLASH_ACR_PRFTBS ((uint32_t)0x00000020) /*!< Prefetch Buffer Status */
emilmont 77:869cf507173a 2979
emilmont 77:869cf507173a 2980 /****************** Bit definition for FLASH_KEYR register ******************/
emilmont 77:869cf507173a 2981 #define FLASH_KEYR_FKEYR ((uint32_t)0xFFFFFFFF) /*!< FPEC Key */
emilmont 77:869cf507173a 2982
emilmont 77:869cf507173a 2983 /***************** Bit definition for FLASH_OPTKEYR register ****************/
emilmont 77:869cf507173a 2984 #define FLASH_OPTKEYR_OPTKEYR ((uint32_t)0xFFFFFFFF) /*!< Option Byte Key */
emilmont 77:869cf507173a 2985
emilmont 77:869cf507173a 2986 /****************** FLASH Keys **********************************************/
emilmont 77:869cf507173a 2987 #define FLASH_FKEY1 ((uint32_t)0x45670123) /*!< Flash program erase key1 */
emilmont 77:869cf507173a 2988 #define FLASH_FKEY2 ((uint32_t)0xCDEF89AB) /*!< Flash program erase key2: used with FLASH_PEKEY1
emilmont 77:869cf507173a 2989 to unlock the write access to the FPEC. */
emilmont 77:869cf507173a 2990
emilmont 77:869cf507173a 2991 #define FLASH_OPTKEY1 ((uint32_t)0x45670123) /*!< Flash option key1 */
emilmont 77:869cf507173a 2992 #define FLASH_OPTKEY2 ((uint32_t)0xCDEF89AB) /*!< Flash option key2: used with FLASH_OPTKEY1 to
emilmont 77:869cf507173a 2993 unlock the write access to the option byte block */
emilmont 77:869cf507173a 2994
emilmont 77:869cf507173a 2995 /****************** Bit definition for FLASH_SR register *******************/
emilmont 77:869cf507173a 2996 #define FLASH_SR_BSY ((uint32_t)0x00000001) /*!< Busy */
emilmont 77:869cf507173a 2997 #define FLASH_SR_PGERR ((uint32_t)0x00000004) /*!< Programming Error */
emilmont 77:869cf507173a 2998 #define FLASH_SR_WRPRTERR ((uint32_t)0x00000010) /*!< Write Protection Error */
emilmont 77:869cf507173a 2999 #define FLASH_SR_EOP ((uint32_t)0x00000020) /*!< End of operation */
emilmont 77:869cf507173a 3000 #define FLASH_SR_WRPERR FLASH_SR_WRPRTERR /*!< Legacy of Write Protection Error */
emilmont 77:869cf507173a 3001
emilmont 77:869cf507173a 3002 /******************* Bit definition for FLASH_CR register *******************/
emilmont 77:869cf507173a 3003 #define FLASH_CR_PG ((uint32_t)0x00000001) /*!< Programming */
emilmont 77:869cf507173a 3004 #define FLASH_CR_PER ((uint32_t)0x00000002) /*!< Page Erase */
emilmont 77:869cf507173a 3005 #define FLASH_CR_MER ((uint32_t)0x00000004) /*!< Mass Erase */
emilmont 77:869cf507173a 3006 #define FLASH_CR_OPTPG ((uint32_t)0x00000010) /*!< Option Byte Programming */
emilmont 77:869cf507173a 3007 #define FLASH_CR_OPTER ((uint32_t)0x00000020) /*!< Option Byte Erase */
emilmont 77:869cf507173a 3008 #define FLASH_CR_STRT ((uint32_t)0x00000040) /*!< Start */
emilmont 77:869cf507173a 3009 #define FLASH_CR_LOCK ((uint32_t)0x00000080) /*!< Lock */
emilmont 77:869cf507173a 3010 #define FLASH_CR_OPTWRE ((uint32_t)0x00000200) /*!< Option Bytes Write Enable */
emilmont 77:869cf507173a 3011 #define FLASH_CR_ERRIE ((uint32_t)0x00000400) /*!< Error Interrupt Enable */
emilmont 77:869cf507173a 3012 #define FLASH_CR_EOPIE ((uint32_t)0x00001000) /*!< End of operation interrupt enable */
emilmont 77:869cf507173a 3013 #define FLASH_CR_OBL_LAUNCH ((uint32_t)0x00002000) /*!< Option Bytes Loader Launch */
emilmont 77:869cf507173a 3014
emilmont 77:869cf507173a 3015 /******************* Bit definition for FLASH_AR register *******************/
emilmont 77:869cf507173a 3016 #define FLASH_AR_FAR ((uint32_t)0xFFFFFFFF) /*!< Flash Address */
emilmont 77:869cf507173a 3017
emilmont 77:869cf507173a 3018 /****************** Bit definition for FLASH_OBR register *******************/
emilmont 77:869cf507173a 3019 #define FLASH_OBR_OPTERR ((uint32_t)0x00000001) /*!< Option Byte Error */
emilmont 77:869cf507173a 3020 #define FLASH_OBR_RDPRT1 ((uint32_t)0x00000002) /*!< Read protection Level bit 1 */
emilmont 77:869cf507173a 3021 #define FLASH_OBR_RDPRT2 ((uint32_t)0x00000004) /*!< Read protection Level bit 2 */
emilmont 77:869cf507173a 3022
emilmont 77:869cf507173a 3023 #define FLASH_OBR_USER ((uint32_t)0x00003700) /*!< User Option Bytes */
emilmont 77:869cf507173a 3024 #define FLASH_OBR_IWDG_SW ((uint32_t)0x00000100) /*!< IWDG SW */
emilmont 77:869cf507173a 3025 #define FLASH_OBR_nRST_STOP ((uint32_t)0x00000200) /*!< nRST_STOP */
emilmont 77:869cf507173a 3026 #define FLASH_OBR_nRST_STDBY ((uint32_t)0x00000400) /*!< nRST_STDBY */
emilmont 77:869cf507173a 3027 #define FLASH_OBR_nBOOT0 ((uint32_t)0x00000800) /*!< nBOOT0 */
emilmont 77:869cf507173a 3028 #define FLASH_OBR_nBOOT1 ((uint32_t)0x00001000) /*!< nBOOT1 */
emilmont 77:869cf507173a 3029 #define FLASH_OBR_VDDA_MONITOR ((uint32_t)0x00002000) /*!< VDDA power supply supervisor */
emilmont 77:869cf507173a 3030 #define FLASH_OBR_RAM_PARITY_CHECK ((uint32_t)0x00004000) /*!< RAM Parity Check */
emilmont 77:869cf507173a 3031 #define FLASH_OBR_nBOOT0_SW ((uint32_t)0x00008000) /*!< nBOOT0 SW (available only in the STM32F042 devices)*/
emilmont 77:869cf507173a 3032 #define FLASH_OBR_DATA0 ((uint32_t)0x00FF0000) /*!< DATA0 */
emilmont 77:869cf507173a 3033 #define FLASH_OBR_DATA1 ((uint32_t)0xFF000000) /*!< DATA0 */
emilmont 77:869cf507173a 3034
emilmont 77:869cf507173a 3035 /* Old BOOT1 bit definition, maintained for legacy purpose */
emilmont 77:869cf507173a 3036 #define FLASH_OBR_BOOT1 FLASH_OBR_nBOOT1
emilmont 77:869cf507173a 3037
emilmont 77:869cf507173a 3038 /* Old OBR_VDDA bit definition, maintained for legacy purpose */
emilmont 77:869cf507173a 3039 #define FLASH_OBR_VDDA_ANALOG FLASH_OBR_VDDA_MONITOR
emilmont 77:869cf507173a 3040
emilmont 77:869cf507173a 3041 /****************** Bit definition for FLASH_WRPR register ******************/
emilmont 77:869cf507173a 3042 #define FLASH_WRPR_WRP ((uint32_t)0xFFFFFFFF) /*!< Write Protect */
emilmont 77:869cf507173a 3043
emilmont 77:869cf507173a 3044 /*----------------------------------------------------------------------------*/
emilmont 77:869cf507173a 3045
emilmont 77:869cf507173a 3046 /****************** Bit definition for OB_RDP register **********************/
emilmont 77:869cf507173a 3047 #define OB_RDP_RDP ((uint32_t)0x000000FF) /*!< Read protection option byte */
emilmont 77:869cf507173a 3048 #define OB_RDP_nRDP ((uint32_t)0x0000FF00) /*!< Read protection complemented option byte */
emilmont 77:869cf507173a 3049
emilmont 77:869cf507173a 3050 /****************** Bit definition for OB_USER register *********************/
emilmont 77:869cf507173a 3051 #define OB_USER_USER ((uint32_t)0x00FF0000) /*!< User option byte */
emilmont 77:869cf507173a 3052 #define OB_USER_nUSER ((uint32_t)0xFF000000) /*!< User complemented option byte */
emilmont 77:869cf507173a 3053
emilmont 77:869cf507173a 3054 /****************** Bit definition for OB_WRP0 register *********************/
emilmont 77:869cf507173a 3055 #define OB_WRP0_WRP0 ((uint32_t)0x000000FF) /*!< Flash memory write protection option bytes */
emilmont 77:869cf507173a 3056 #define OB_WRP0_nWRP0 ((uint32_t)0x0000FF00) /*!< Flash memory write protection complemented option bytes */
emilmont 77:869cf507173a 3057
emilmont 77:869cf507173a 3058 /****************** Bit definition for OB_WRP1 register *********************/
emilmont 77:869cf507173a 3059 #define OB_WRP1_WRP1 ((uint32_t)0x00FF0000) /*!< Flash memory write protection option bytes */
emilmont 77:869cf507173a 3060 #define OB_WRP1_nWRP1 ((uint32_t)0xFF000000) /*!< Flash memory write protection complemented option bytes */
emilmont 77:869cf507173a 3061
emilmont 77:869cf507173a 3062 /****************** Bit definition for OB_WRP2 register *********************/
emilmont 77:869cf507173a 3063 #define OB_WRP2_WRP2 ((uint32_t)0x000000FF) /*!< Flash memory write protection option bytes (only for STM32F072 devices) */
emilmont 77:869cf507173a 3064 #define OB_WRP2_nWRP2 ((uint32_t)0x0000FF00) /*!< Flash memory write protection complemented option bytes (only for STM32F072 devices) */
emilmont 77:869cf507173a 3065
emilmont 77:869cf507173a 3066 /****************** Bit definition for OB_WRP3 register *********************/
emilmont 77:869cf507173a 3067 #define OB_WRP3_WRP3 ((uint32_t)0x00FF0000) /*!< Flash memory write protection option bytes (only for STM32F072 devices) */
emilmont 77:869cf507173a 3068 #define OB_WRP3_nWRP3 ((uint32_t)0xFF000000) /*!< Flash memory write protection complemented option bytes (only for STM32F072 devices) */
emilmont 77:869cf507173a 3069
emilmont 77:869cf507173a 3070 /******************************************************************************/
emilmont 77:869cf507173a 3071 /* */
emilmont 77:869cf507173a 3072 /* General Purpose IOs (GPIO) */
emilmont 77:869cf507173a 3073 /* */
emilmont 77:869cf507173a 3074 /******************************************************************************/
emilmont 77:869cf507173a 3075 /******************* Bit definition for GPIO_MODER register *****************/
emilmont 77:869cf507173a 3076 #define GPIO_MODER_MODER0 ((uint32_t)0x00000003)
emilmont 77:869cf507173a 3077 #define GPIO_MODER_MODER0_0 ((uint32_t)0x00000001)
emilmont 77:869cf507173a 3078 #define GPIO_MODER_MODER0_1 ((uint32_t)0x00000002)
emilmont 77:869cf507173a 3079 #define GPIO_MODER_MODER1 ((uint32_t)0x0000000C)
emilmont 77:869cf507173a 3080 #define GPIO_MODER_MODER1_0 ((uint32_t)0x00000004)
emilmont 77:869cf507173a 3081 #define GPIO_MODER_MODER1_1 ((uint32_t)0x00000008)
emilmont 77:869cf507173a 3082 #define GPIO_MODER_MODER2 ((uint32_t)0x00000030)
emilmont 77:869cf507173a 3083 #define GPIO_MODER_MODER2_0 ((uint32_t)0x00000010)
emilmont 77:869cf507173a 3084 #define GPIO_MODER_MODER2_1 ((uint32_t)0x00000020)
emilmont 77:869cf507173a 3085 #define GPIO_MODER_MODER3 ((uint32_t)0x000000C0)
emilmont 77:869cf507173a 3086 #define GPIO_MODER_MODER3_0 ((uint32_t)0x00000040)
emilmont 77:869cf507173a 3087 #define GPIO_MODER_MODER3_1 ((uint32_t)0x00000080)
emilmont 77:869cf507173a 3088 #define GPIO_MODER_MODER4 ((uint32_t)0x00000300)
emilmont 77:869cf507173a 3089 #define GPIO_MODER_MODER4_0 ((uint32_t)0x00000100)
emilmont 77:869cf507173a 3090 #define GPIO_MODER_MODER4_1 ((uint32_t)0x00000200)
emilmont 77:869cf507173a 3091 #define GPIO_MODER_MODER5 ((uint32_t)0x00000C00)
emilmont 77:869cf507173a 3092 #define GPIO_MODER_MODER5_0 ((uint32_t)0x00000400)
emilmont 77:869cf507173a 3093 #define GPIO_MODER_MODER5_1 ((uint32_t)0x00000800)
emilmont 77:869cf507173a 3094 #define GPIO_MODER_MODER6 ((uint32_t)0x00003000)
emilmont 77:869cf507173a 3095 #define GPIO_MODER_MODER6_0 ((uint32_t)0x00001000)
emilmont 77:869cf507173a 3096 #define GPIO_MODER_MODER6_1 ((uint32_t)0x00002000)
emilmont 77:869cf507173a 3097 #define GPIO_MODER_MODER7 ((uint32_t)0x0000C000)
emilmont 77:869cf507173a 3098 #define GPIO_MODER_MODER7_0 ((uint32_t)0x00004000)
emilmont 77:869cf507173a 3099 #define GPIO_MODER_MODER7_1 ((uint32_t)0x00008000)
emilmont 77:869cf507173a 3100 #define GPIO_MODER_MODER8 ((uint32_t)0x00030000)
emilmont 77:869cf507173a 3101 #define GPIO_MODER_MODER8_0 ((uint32_t)0x00010000)
emilmont 77:869cf507173a 3102 #define GPIO_MODER_MODER8_1 ((uint32_t)0x00020000)
emilmont 77:869cf507173a 3103 #define GPIO_MODER_MODER9 ((uint32_t)0x000C0000)
emilmont 77:869cf507173a 3104 #define GPIO_MODER_MODER9_0 ((uint32_t)0x00040000)
emilmont 77:869cf507173a 3105 #define GPIO_MODER_MODER9_1 ((uint32_t)0x00080000)
emilmont 77:869cf507173a 3106 #define GPIO_MODER_MODER10 ((uint32_t)0x00300000)
emilmont 77:869cf507173a 3107 #define GPIO_MODER_MODER10_0 ((uint32_t)0x00100000)
emilmont 77:869cf507173a 3108 #define GPIO_MODER_MODER10_1 ((uint32_t)0x00200000)
emilmont 77:869cf507173a 3109 #define GPIO_MODER_MODER11 ((uint32_t)0x00C00000)
emilmont 77:869cf507173a 3110 #define GPIO_MODER_MODER11_0 ((uint32_t)0x00400000)
emilmont 77:869cf507173a 3111 #define GPIO_MODER_MODER11_1 ((uint32_t)0x00800000)
emilmont 77:869cf507173a 3112 #define GPIO_MODER_MODER12 ((uint32_t)0x03000000)
emilmont 77:869cf507173a 3113 #define GPIO_MODER_MODER12_0 ((uint32_t)0x01000000)
emilmont 77:869cf507173a 3114 #define GPIO_MODER_MODER12_1 ((uint32_t)0x02000000)
emilmont 77:869cf507173a 3115 #define GPIO_MODER_MODER13 ((uint32_t)0x0C000000)
emilmont 77:869cf507173a 3116 #define GPIO_MODER_MODER13_0 ((uint32_t)0x04000000)
emilmont 77:869cf507173a 3117 #define GPIO_MODER_MODER13_1 ((uint32_t)0x08000000)
emilmont 77:869cf507173a 3118 #define GPIO_MODER_MODER14 ((uint32_t)0x30000000)
emilmont 77:869cf507173a 3119 #define GPIO_MODER_MODER14_0 ((uint32_t)0x10000000)
emilmont 77:869cf507173a 3120 #define GPIO_MODER_MODER14_1 ((uint32_t)0x20000000)
emilmont 77:869cf507173a 3121 #define GPIO_MODER_MODER15 ((uint32_t)0xC0000000)
emilmont 77:869cf507173a 3122 #define GPIO_MODER_MODER15_0 ((uint32_t)0x40000000)
emilmont 77:869cf507173a 3123 #define GPIO_MODER_MODER15_1 ((uint32_t)0x80000000)
emilmont 77:869cf507173a 3124
emilmont 77:869cf507173a 3125 /****************** Bit definition for GPIO_OTYPER register *****************/
emilmont 77:869cf507173a 3126 #define GPIO_OTYPER_OT_0 ((uint32_t)0x00000001)
emilmont 77:869cf507173a 3127 #define GPIO_OTYPER_OT_1 ((uint32_t)0x00000002)
emilmont 77:869cf507173a 3128 #define GPIO_OTYPER_OT_2 ((uint32_t)0x00000004)
emilmont 77:869cf507173a 3129 #define GPIO_OTYPER_OT_3 ((uint32_t)0x00000008)
emilmont 77:869cf507173a 3130 #define GPIO_OTYPER_OT_4 ((uint32_t)0x00000010)
emilmont 77:869cf507173a 3131 #define GPIO_OTYPER_OT_5 ((uint32_t)0x00000020)
emilmont 77:869cf507173a 3132 #define GPIO_OTYPER_OT_6 ((uint32_t)0x00000040)
emilmont 77:869cf507173a 3133 #define GPIO_OTYPER_OT_7 ((uint32_t)0x00000080)
emilmont 77:869cf507173a 3134 #define GPIO_OTYPER_OT_8 ((uint32_t)0x00000100)
emilmont 77:869cf507173a 3135 #define GPIO_OTYPER_OT_9 ((uint32_t)0x00000200)
emilmont 77:869cf507173a 3136 #define GPIO_OTYPER_OT_10 ((uint32_t)0x00000400)
emilmont 77:869cf507173a 3137 #define GPIO_OTYPER_OT_11 ((uint32_t)0x00000800)
emilmont 77:869cf507173a 3138 #define GPIO_OTYPER_OT_12 ((uint32_t)0x00001000)
emilmont 77:869cf507173a 3139 #define GPIO_OTYPER_OT_13 ((uint32_t)0x00002000)
emilmont 77:869cf507173a 3140 #define GPIO_OTYPER_OT_14 ((uint32_t)0x00004000)
emilmont 77:869cf507173a 3141 #define GPIO_OTYPER_OT_15 ((uint32_t)0x00008000)
emilmont 77:869cf507173a 3142
emilmont 77:869cf507173a 3143 /**************** Bit definition for GPIO_OSPEEDR register ******************/
emilmont 77:869cf507173a 3144 #define GPIO_OSPEEDR_OSPEEDR0 ((uint32_t)0x00000003)
emilmont 77:869cf507173a 3145 #define GPIO_OSPEEDR_OSPEEDR0_0 ((uint32_t)0x00000001)
emilmont 77:869cf507173a 3146 #define GPIO_OSPEEDR_OSPEEDR0_1 ((uint32_t)0x00000002)
emilmont 77:869cf507173a 3147 #define GPIO_OSPEEDR_OSPEEDR1 ((uint32_t)0x0000000C)
emilmont 77:869cf507173a 3148 #define GPIO_OSPEEDR_OSPEEDR1_0 ((uint32_t)0x00000004)
emilmont 77:869cf507173a 3149 #define GPIO_OSPEEDR_OSPEEDR1_1 ((uint32_t)0x00000008)
emilmont 77:869cf507173a 3150 #define GPIO_OSPEEDR_OSPEEDR2 ((uint32_t)0x00000030)
emilmont 77:869cf507173a 3151 #define GPIO_OSPEEDR_OSPEEDR2_0 ((uint32_t)0x00000010)
emilmont 77:869cf507173a 3152 #define GPIO_OSPEEDR_OSPEEDR2_1 ((uint32_t)0x00000020)
emilmont 77:869cf507173a 3153 #define GPIO_OSPEEDR_OSPEEDR3 ((uint32_t)0x000000C0)
emilmont 77:869cf507173a 3154 #define GPIO_OSPEEDR_OSPEEDR3_0 ((uint32_t)0x00000040)
emilmont 77:869cf507173a 3155 #define GPIO_OSPEEDR_OSPEEDR3_1 ((uint32_t)0x00000080)
emilmont 77:869cf507173a 3156 #define GPIO_OSPEEDR_OSPEEDR4 ((uint32_t)0x00000300)
emilmont 77:869cf507173a 3157 #define GPIO_OSPEEDR_OSPEEDR4_0 ((uint32_t)0x00000100)
emilmont 77:869cf507173a 3158 #define GPIO_OSPEEDR_OSPEEDR4_1 ((uint32_t)0x00000200)
emilmont 77:869cf507173a 3159 #define GPIO_OSPEEDR_OSPEEDR5 ((uint32_t)0x00000C00)
emilmont 77:869cf507173a 3160 #define GPIO_OSPEEDR_OSPEEDR5_0 ((uint32_t)0x00000400)
emilmont 77:869cf507173a 3161 #define GPIO_OSPEEDR_OSPEEDR5_1 ((uint32_t)0x00000800)
emilmont 77:869cf507173a 3162 #define GPIO_OSPEEDR_OSPEEDR6 ((uint32_t)0x00003000)
emilmont 77:869cf507173a 3163 #define GPIO_OSPEEDR_OSPEEDR6_0 ((uint32_t)0x00001000)
emilmont 77:869cf507173a 3164 #define GPIO_OSPEEDR_OSPEEDR6_1 ((uint32_t)0x00002000)
emilmont 77:869cf507173a 3165 #define GPIO_OSPEEDR_OSPEEDR7 ((uint32_t)0x0000C000)
emilmont 77:869cf507173a 3166 #define GPIO_OSPEEDR_OSPEEDR7_0 ((uint32_t)0x00004000)
emilmont 77:869cf507173a 3167 #define GPIO_OSPEEDR_OSPEEDR7_1 ((uint32_t)0x00008000)
emilmont 77:869cf507173a 3168 #define GPIO_OSPEEDR_OSPEEDR8 ((uint32_t)0x00030000)
emilmont 77:869cf507173a 3169 #define GPIO_OSPEEDR_OSPEEDR8_0 ((uint32_t)0x00010000)
emilmont 77:869cf507173a 3170 #define GPIO_OSPEEDR_OSPEEDR8_1 ((uint32_t)0x00020000)
emilmont 77:869cf507173a 3171 #define GPIO_OSPEEDR_OSPEEDR9 ((uint32_t)0x000C0000)
emilmont 77:869cf507173a 3172 #define GPIO_OSPEEDR_OSPEEDR9_0 ((uint32_t)0x00040000)
emilmont 77:869cf507173a 3173 #define GPIO_OSPEEDR_OSPEEDR9_1 ((uint32_t)0x00080000)
emilmont 77:869cf507173a 3174 #define GPIO_OSPEEDR_OSPEEDR10 ((uint32_t)0x00300000)
emilmont 77:869cf507173a 3175 #define GPIO_OSPEEDR_OSPEEDR10_0 ((uint32_t)0x00100000)
emilmont 77:869cf507173a 3176 #define GPIO_OSPEEDR_OSPEEDR10_1 ((uint32_t)0x00200000)
emilmont 77:869cf507173a 3177 #define GPIO_OSPEEDR_OSPEEDR11 ((uint32_t)0x00C00000)
emilmont 77:869cf507173a 3178 #define GPIO_OSPEEDR_OSPEEDR11_0 ((uint32_t)0x00400000)
emilmont 77:869cf507173a 3179 #define GPIO_OSPEEDR_OSPEEDR11_1 ((uint32_t)0x00800000)
emilmont 77:869cf507173a 3180 #define GPIO_OSPEEDR_OSPEEDR12 ((uint32_t)0x03000000)
emilmont 77:869cf507173a 3181 #define GPIO_OSPEEDR_OSPEEDR12_0 ((uint32_t)0x01000000)
emilmont 77:869cf507173a 3182 #define GPIO_OSPEEDR_OSPEEDR12_1 ((uint32_t)0x02000000)
emilmont 77:869cf507173a 3183 #define GPIO_OSPEEDR_OSPEEDR13 ((uint32_t)0x0C000000)
emilmont 77:869cf507173a 3184 #define GPIO_OSPEEDR_OSPEEDR13_0 ((uint32_t)0x04000000)
emilmont 77:869cf507173a 3185 #define GPIO_OSPEEDR_OSPEEDR13_1 ((uint32_t)0x08000000)
emilmont 77:869cf507173a 3186 #define GPIO_OSPEEDR_OSPEEDR14 ((uint32_t)0x30000000)
emilmont 77:869cf507173a 3187 #define GPIO_OSPEEDR_OSPEEDR14_0 ((uint32_t)0x10000000)
emilmont 77:869cf507173a 3188 #define GPIO_OSPEEDR_OSPEEDR14_1 ((uint32_t)0x20000000)
emilmont 77:869cf507173a 3189 #define GPIO_OSPEEDR_OSPEEDR15 ((uint32_t)0xC0000000)
emilmont 77:869cf507173a 3190 #define GPIO_OSPEEDR_OSPEEDR15_0 ((uint32_t)0x40000000)
emilmont 77:869cf507173a 3191 #define GPIO_OSPEEDR_OSPEEDR15_1 ((uint32_t)0x80000000)
emilmont 77:869cf507173a 3192
emilmont 77:869cf507173a 3193 /* Old Bit definition for GPIO_OSPEEDR register maintained for legacy purpose */
emilmont 77:869cf507173a 3194 #define GPIO_OSPEEDER_OSPEEDR0 GPIO_OSPEEDR_OSPEEDR0
emilmont 77:869cf507173a 3195 #define GPIO_OSPEEDER_OSPEEDR0_0 GPIO_OSPEEDR_OSPEEDR0_0
emilmont 77:869cf507173a 3196 #define GPIO_OSPEEDER_OSPEEDR0_1 GPIO_OSPEEDR_OSPEEDR0_1
emilmont 77:869cf507173a 3197 #define GPIO_OSPEEDER_OSPEEDR1 GPIO_OSPEEDR_OSPEEDR1
emilmont 77:869cf507173a 3198 #define GPIO_OSPEEDER_OSPEEDR1_0 GPIO_OSPEEDR_OSPEEDR1_0
emilmont 77:869cf507173a 3199 #define GPIO_OSPEEDER_OSPEEDR1_1 GPIO_OSPEEDR_OSPEEDR1_1
emilmont 77:869cf507173a 3200 #define GPIO_OSPEEDER_OSPEEDR2 GPIO_OSPEEDR_OSPEEDR2
emilmont 77:869cf507173a 3201 #define GPIO_OSPEEDER_OSPEEDR2_0 GPIO_OSPEEDR_OSPEEDR2_0
emilmont 77:869cf507173a 3202 #define GPIO_OSPEEDER_OSPEEDR2_1 GPIO_OSPEEDR_OSPEEDR2_1
emilmont 77:869cf507173a 3203 #define GPIO_OSPEEDER_OSPEEDR3 GPIO_OSPEEDR_OSPEEDR3
emilmont 77:869cf507173a 3204 #define GPIO_OSPEEDER_OSPEEDR3_0 GPIO_OSPEEDR_OSPEEDR3_0
emilmont 77:869cf507173a 3205 #define GPIO_OSPEEDER_OSPEEDR3_1 GPIO_OSPEEDR_OSPEEDR3_1
emilmont 77:869cf507173a 3206 #define GPIO_OSPEEDER_OSPEEDR4 GPIO_OSPEEDR_OSPEEDR4
emilmont 77:869cf507173a 3207 #define GPIO_OSPEEDER_OSPEEDR4_0 GPIO_OSPEEDR_OSPEEDR4_0
emilmont 77:869cf507173a 3208 #define GPIO_OSPEEDER_OSPEEDR4_1 GPIO_OSPEEDR_OSPEEDR4_1
emilmont 77:869cf507173a 3209 #define GPIO_OSPEEDER_OSPEEDR5 GPIO_OSPEEDR_OSPEEDR5
emilmont 77:869cf507173a 3210 #define GPIO_OSPEEDER_OSPEEDR5_0 GPIO_OSPEEDR_OSPEEDR5_0
emilmont 77:869cf507173a 3211 #define GPIO_OSPEEDER_OSPEEDR5_1 GPIO_OSPEEDR_OSPEEDR5_1
emilmont 77:869cf507173a 3212 #define GPIO_OSPEEDER_OSPEEDR6 GPIO_OSPEEDR_OSPEEDR6
emilmont 77:869cf507173a 3213 #define GPIO_OSPEEDER_OSPEEDR6_0 GPIO_OSPEEDR_OSPEEDR6_0
emilmont 77:869cf507173a 3214 #define GPIO_OSPEEDER_OSPEEDR6_1 GPIO_OSPEEDR_OSPEEDR6_1
emilmont 77:869cf507173a 3215 #define GPIO_OSPEEDER_OSPEEDR7 GPIO_OSPEEDR_OSPEEDR7
emilmont 77:869cf507173a 3216 #define GPIO_OSPEEDER_OSPEEDR7_0 GPIO_OSPEEDR_OSPEEDR7_0
emilmont 77:869cf507173a 3217 #define GPIO_OSPEEDER_OSPEEDR7_1 GPIO_OSPEEDR_OSPEEDR7_1
emilmont 77:869cf507173a 3218 #define GPIO_OSPEEDER_OSPEEDR8 GPIO_OSPEEDR_OSPEEDR8
emilmont 77:869cf507173a 3219 #define GPIO_OSPEEDER_OSPEEDR8_0 GPIO_OSPEEDR_OSPEEDR8_0
emilmont 77:869cf507173a 3220 #define GPIO_OSPEEDER_OSPEEDR8_1 GPIO_OSPEEDR_OSPEEDR8_1
emilmont 77:869cf507173a 3221 #define GPIO_OSPEEDER_OSPEEDR9 GPIO_OSPEEDR_OSPEEDR9
emilmont 77:869cf507173a 3222 #define GPIO_OSPEEDER_OSPEEDR9_0 GPIO_OSPEEDR_OSPEEDR9_0
emilmont 77:869cf507173a 3223 #define GPIO_OSPEEDER_OSPEEDR9_1 GPIO_OSPEEDR_OSPEEDR9_1
emilmont 77:869cf507173a 3224 #define GPIO_OSPEEDER_OSPEEDR10 GPIO_OSPEEDR_OSPEEDR10
emilmont 77:869cf507173a 3225 #define GPIO_OSPEEDER_OSPEEDR10_0 GPIO_OSPEEDR_OSPEEDR10_0
emilmont 77:869cf507173a 3226 #define GPIO_OSPEEDER_OSPEEDR10_1 GPIO_OSPEEDR_OSPEEDR10_1
emilmont 77:869cf507173a 3227 #define GPIO_OSPEEDER_OSPEEDR11 GPIO_OSPEEDR_OSPEEDR11
emilmont 77:869cf507173a 3228 #define GPIO_OSPEEDER_OSPEEDR11_0 GPIO_OSPEEDR_OSPEEDR11_0
emilmont 77:869cf507173a 3229 #define GPIO_OSPEEDER_OSPEEDR11_1 GPIO_OSPEEDR_OSPEEDR11_1
emilmont 77:869cf507173a 3230 #define GPIO_OSPEEDER_OSPEEDR12 GPIO_OSPEEDR_OSPEEDR12
emilmont 77:869cf507173a 3231 #define GPIO_OSPEEDER_OSPEEDR12_0 GPIO_OSPEEDR_OSPEEDR12_0
emilmont 77:869cf507173a 3232 #define GPIO_OSPEEDER_OSPEEDR12_1 GPIO_OSPEEDR_OSPEEDR12_1
emilmont 77:869cf507173a 3233 #define GPIO_OSPEEDER_OSPEEDR13 GPIO_OSPEEDR_OSPEEDR13
emilmont 77:869cf507173a 3234 #define GPIO_OSPEEDER_OSPEEDR13_0 GPIO_OSPEEDR_OSPEEDR13_0
emilmont 77:869cf507173a 3235 #define GPIO_OSPEEDER_OSPEEDR13_1 GPIO_OSPEEDR_OSPEEDR13_1
emilmont 77:869cf507173a 3236 #define GPIO_OSPEEDER_OSPEEDR14 GPIO_OSPEEDR_OSPEEDR14
emilmont 77:869cf507173a 3237 #define GPIO_OSPEEDER_OSPEEDR14_0 GPIO_OSPEEDR_OSPEEDR14_0
emilmont 77:869cf507173a 3238 #define GPIO_OSPEEDER_OSPEEDR14_1 GPIO_OSPEEDR_OSPEEDR14_1
emilmont 77:869cf507173a 3239 #define GPIO_OSPEEDER_OSPEEDR15 GPIO_OSPEEDR_OSPEEDR15
emilmont 77:869cf507173a 3240 #define GPIO_OSPEEDER_OSPEEDR15_0 GPIO_OSPEEDR_OSPEEDR15_0
emilmont 77:869cf507173a 3241 #define GPIO_OSPEEDER_OSPEEDR15_1 GPIO_OSPEEDR_OSPEEDR15_1
emilmont 77:869cf507173a 3242
emilmont 77:869cf507173a 3243 /******************* Bit definition for GPIO_PUPDR register ******************/
emilmont 77:869cf507173a 3244 #define GPIO_PUPDR_PUPDR0 ((uint32_t)0x00000003)
emilmont 77:869cf507173a 3245 #define GPIO_PUPDR_PUPDR0_0 ((uint32_t)0x00000001)
emilmont 77:869cf507173a 3246 #define GPIO_PUPDR_PUPDR0_1 ((uint32_t)0x00000002)
emilmont 77:869cf507173a 3247 #define GPIO_PUPDR_PUPDR1 ((uint32_t)0x0000000C)
emilmont 77:869cf507173a 3248 #define GPIO_PUPDR_PUPDR1_0 ((uint32_t)0x00000004)
emilmont 77:869cf507173a 3249 #define GPIO_PUPDR_PUPDR1_1 ((uint32_t)0x00000008)
emilmont 77:869cf507173a 3250 #define GPIO_PUPDR_PUPDR2 ((uint32_t)0x00000030)
emilmont 77:869cf507173a 3251 #define GPIO_PUPDR_PUPDR2_0 ((uint32_t)0x00000010)
emilmont 77:869cf507173a 3252 #define GPIO_PUPDR_PUPDR2_1 ((uint32_t)0x00000020)
emilmont 77:869cf507173a 3253 #define GPIO_PUPDR_PUPDR3 ((uint32_t)0x000000C0)
emilmont 77:869cf507173a 3254 #define GPIO_PUPDR_PUPDR3_0 ((uint32_t)0x00000040)
emilmont 77:869cf507173a 3255 #define GPIO_PUPDR_PUPDR3_1 ((uint32_t)0x00000080)
emilmont 77:869cf507173a 3256 #define GPIO_PUPDR_PUPDR4 ((uint32_t)0x00000300)
emilmont 77:869cf507173a 3257 #define GPIO_PUPDR_PUPDR4_0 ((uint32_t)0x00000100)
emilmont 77:869cf507173a 3258 #define GPIO_PUPDR_PUPDR4_1 ((uint32_t)0x00000200)
emilmont 77:869cf507173a 3259 #define GPIO_PUPDR_PUPDR5 ((uint32_t)0x00000C00)
emilmont 77:869cf507173a 3260 #define GPIO_PUPDR_PUPDR5_0 ((uint32_t)0x00000400)
emilmont 77:869cf507173a 3261 #define GPIO_PUPDR_PUPDR5_1 ((uint32_t)0x00000800)
emilmont 77:869cf507173a 3262 #define GPIO_PUPDR_PUPDR6 ((uint32_t)0x00003000)
emilmont 77:869cf507173a 3263 #define GPIO_PUPDR_PUPDR6_0 ((uint32_t)0x00001000)
emilmont 77:869cf507173a 3264 #define GPIO_PUPDR_PUPDR6_1 ((uint32_t)0x00002000)
emilmont 77:869cf507173a 3265 #define GPIO_PUPDR_PUPDR7 ((uint32_t)0x0000C000)
emilmont 77:869cf507173a 3266 #define GPIO_PUPDR_PUPDR7_0 ((uint32_t)0x00004000)
emilmont 77:869cf507173a 3267 #define GPIO_PUPDR_PUPDR7_1 ((uint32_t)0x00008000)
emilmont 77:869cf507173a 3268 #define GPIO_PUPDR_PUPDR8 ((uint32_t)0x00030000)
emilmont 77:869cf507173a 3269 #define GPIO_PUPDR_PUPDR8_0 ((uint32_t)0x00010000)
emilmont 77:869cf507173a 3270 #define GPIO_PUPDR_PUPDR8_1 ((uint32_t)0x00020000)
emilmont 77:869cf507173a 3271 #define GPIO_PUPDR_PUPDR9 ((uint32_t)0x000C0000)
emilmont 77:869cf507173a 3272 #define GPIO_PUPDR_PUPDR9_0 ((uint32_t)0x00040000)
emilmont 77:869cf507173a 3273 #define GPIO_PUPDR_PUPDR9_1 ((uint32_t)0x00080000)
emilmont 77:869cf507173a 3274 #define GPIO_PUPDR_PUPDR10 ((uint32_t)0x00300000)
emilmont 77:869cf507173a 3275 #define GPIO_PUPDR_PUPDR10_0 ((uint32_t)0x00100000)
emilmont 77:869cf507173a 3276 #define GPIO_PUPDR_PUPDR10_1 ((uint32_t)0x00200000)
emilmont 77:869cf507173a 3277 #define GPIO_PUPDR_PUPDR11 ((uint32_t)0x00C00000)
emilmont 77:869cf507173a 3278 #define GPIO_PUPDR_PUPDR11_0 ((uint32_t)0x00400000)
emilmont 77:869cf507173a 3279 #define GPIO_PUPDR_PUPDR11_1 ((uint32_t)0x00800000)
emilmont 77:869cf507173a 3280 #define GPIO_PUPDR_PUPDR12 ((uint32_t)0x03000000)
emilmont 77:869cf507173a 3281 #define GPIO_PUPDR_PUPDR12_0 ((uint32_t)0x01000000)
emilmont 77:869cf507173a 3282 #define GPIO_PUPDR_PUPDR12_1 ((uint32_t)0x02000000)
emilmont 77:869cf507173a 3283 #define GPIO_PUPDR_PUPDR13 ((uint32_t)0x0C000000)
emilmont 77:869cf507173a 3284 #define GPIO_PUPDR_PUPDR13_0 ((uint32_t)0x04000000)
emilmont 77:869cf507173a 3285 #define GPIO_PUPDR_PUPDR13_1 ((uint32_t)0x08000000)
emilmont 77:869cf507173a 3286 #define GPIO_PUPDR_PUPDR14 ((uint32_t)0x30000000)
emilmont 77:869cf507173a 3287 #define GPIO_PUPDR_PUPDR14_0 ((uint32_t)0x10000000)
emilmont 77:869cf507173a 3288 #define GPIO_PUPDR_PUPDR14_1 ((uint32_t)0x20000000)
emilmont 77:869cf507173a 3289 #define GPIO_PUPDR_PUPDR15 ((uint32_t)0xC0000000)
emilmont 77:869cf507173a 3290 #define GPIO_PUPDR_PUPDR15_0 ((uint32_t)0x40000000)
emilmont 77:869cf507173a 3291 #define GPIO_PUPDR_PUPDR15_1 ((uint32_t)0x80000000)
emilmont 77:869cf507173a 3292
emilmont 77:869cf507173a 3293 /******************* Bit definition for GPIO_IDR register *******************/
emilmont 77:869cf507173a 3294 #define GPIO_IDR_0 ((uint32_t)0x00000001)
emilmont 77:869cf507173a 3295 #define GPIO_IDR_1 ((uint32_t)0x00000002)
emilmont 77:869cf507173a 3296 #define GPIO_IDR_2 ((uint32_t)0x00000004)
emilmont 77:869cf507173a 3297 #define GPIO_IDR_3 ((uint32_t)0x00000008)
emilmont 77:869cf507173a 3298 #define GPIO_IDR_4 ((uint32_t)0x00000010)
emilmont 77:869cf507173a 3299 #define GPIO_IDR_5 ((uint32_t)0x00000020)
emilmont 77:869cf507173a 3300 #define GPIO_IDR_6 ((uint32_t)0x00000040)
emilmont 77:869cf507173a 3301 #define GPIO_IDR_7 ((uint32_t)0x00000080)
emilmont 77:869cf507173a 3302 #define GPIO_IDR_8 ((uint32_t)0x00000100)
emilmont 77:869cf507173a 3303 #define GPIO_IDR_9 ((uint32_t)0x00000200)
emilmont 77:869cf507173a 3304 #define GPIO_IDR_10 ((uint32_t)0x00000400)
emilmont 77:869cf507173a 3305 #define GPIO_IDR_11 ((uint32_t)0x00000800)
emilmont 77:869cf507173a 3306 #define GPIO_IDR_12 ((uint32_t)0x00001000)
emilmont 77:869cf507173a 3307 #define GPIO_IDR_13 ((uint32_t)0x00002000)
emilmont 77:869cf507173a 3308 #define GPIO_IDR_14 ((uint32_t)0x00004000)
emilmont 77:869cf507173a 3309 #define GPIO_IDR_15 ((uint32_t)0x00008000)
emilmont 77:869cf507173a 3310
emilmont 77:869cf507173a 3311 /****************** Bit definition for GPIO_ODR register ********************/
emilmont 77:869cf507173a 3312 #define GPIO_ODR_0 ((uint32_t)0x00000001)
emilmont 77:869cf507173a 3313 #define GPIO_ODR_1 ((uint32_t)0x00000002)
emilmont 77:869cf507173a 3314 #define GPIO_ODR_2 ((uint32_t)0x00000004)
emilmont 77:869cf507173a 3315 #define GPIO_ODR_3 ((uint32_t)0x00000008)
emilmont 77:869cf507173a 3316 #define GPIO_ODR_4 ((uint32_t)0x00000010)
emilmont 77:869cf507173a 3317 #define GPIO_ODR_5 ((uint32_t)0x00000020)
emilmont 77:869cf507173a 3318 #define GPIO_ODR_6 ((uint32_t)0x00000040)
emilmont 77:869cf507173a 3319 #define GPIO_ODR_7 ((uint32_t)0x00000080)
emilmont 77:869cf507173a 3320 #define GPIO_ODR_8 ((uint32_t)0x00000100)
emilmont 77:869cf507173a 3321 #define GPIO_ODR_9 ((uint32_t)0x00000200)
emilmont 77:869cf507173a 3322 #define GPIO_ODR_10 ((uint32_t)0x00000400)
emilmont 77:869cf507173a 3323 #define GPIO_ODR_11 ((uint32_t)0x00000800)
emilmont 77:869cf507173a 3324 #define GPIO_ODR_12 ((uint32_t)0x00001000)
emilmont 77:869cf507173a 3325 #define GPIO_ODR_13 ((uint32_t)0x00002000)
emilmont 77:869cf507173a 3326 #define GPIO_ODR_14 ((uint32_t)0x00004000)
emilmont 77:869cf507173a 3327 #define GPIO_ODR_15 ((uint32_t)0x00008000)
emilmont 77:869cf507173a 3328
emilmont 77:869cf507173a 3329 /****************** Bit definition for GPIO_BSRR register ********************/
emilmont 77:869cf507173a 3330 #define GPIO_BSRR_BS_0 ((uint32_t)0x00000001)
emilmont 77:869cf507173a 3331 #define GPIO_BSRR_BS_1 ((uint32_t)0x00000002)
emilmont 77:869cf507173a 3332 #define GPIO_BSRR_BS_2 ((uint32_t)0x00000004)
emilmont 77:869cf507173a 3333 #define GPIO_BSRR_BS_3 ((uint32_t)0x00000008)
emilmont 77:869cf507173a 3334 #define GPIO_BSRR_BS_4 ((uint32_t)0x00000010)
emilmont 77:869cf507173a 3335 #define GPIO_BSRR_BS_5 ((uint32_t)0x00000020)
emilmont 77:869cf507173a 3336 #define GPIO_BSRR_BS_6 ((uint32_t)0x00000040)
emilmont 77:869cf507173a 3337 #define GPIO_BSRR_BS_7 ((uint32_t)0x00000080)
emilmont 77:869cf507173a 3338 #define GPIO_BSRR_BS_8 ((uint32_t)0x00000100)
emilmont 77:869cf507173a 3339 #define GPIO_BSRR_BS_9 ((uint32_t)0x00000200)
emilmont 77:869cf507173a 3340 #define GPIO_BSRR_BS_10 ((uint32_t)0x00000400)
emilmont 77:869cf507173a 3341 #define GPIO_BSRR_BS_11 ((uint32_t)0x00000800)
emilmont 77:869cf507173a 3342 #define GPIO_BSRR_BS_12 ((uint32_t)0x00001000)
emilmont 77:869cf507173a 3343 #define GPIO_BSRR_BS_13 ((uint32_t)0x00002000)
emilmont 77:869cf507173a 3344 #define GPIO_BSRR_BS_14 ((uint32_t)0x00004000)
emilmont 77:869cf507173a 3345 #define GPIO_BSRR_BS_15 ((uint32_t)0x00008000)
emilmont 77:869cf507173a 3346 #define GPIO_BSRR_BR_0 ((uint32_t)0x00010000)
emilmont 77:869cf507173a 3347 #define GPIO_BSRR_BR_1 ((uint32_t)0x00020000)
emilmont 77:869cf507173a 3348 #define GPIO_BSRR_BR_2 ((uint32_t)0x00040000)
emilmont 77:869cf507173a 3349 #define GPIO_BSRR_BR_3 ((uint32_t)0x00080000)
emilmont 77:869cf507173a 3350 #define GPIO_BSRR_BR_4 ((uint32_t)0x00100000)
emilmont 77:869cf507173a 3351 #define GPIO_BSRR_BR_5 ((uint32_t)0x00200000)
emilmont 77:869cf507173a 3352 #define GPIO_BSRR_BR_6 ((uint32_t)0x00400000)
emilmont 77:869cf507173a 3353 #define GPIO_BSRR_BR_7 ((uint32_t)0x00800000)
emilmont 77:869cf507173a 3354 #define GPIO_BSRR_BR_8 ((uint32_t)0x01000000)
emilmont 77:869cf507173a 3355 #define GPIO_BSRR_BR_9 ((uint32_t)0x02000000)
emilmont 77:869cf507173a 3356 #define GPIO_BSRR_BR_10 ((uint32_t)0x04000000)
emilmont 77:869cf507173a 3357 #define GPIO_BSRR_BR_11 ((uint32_t)0x08000000)
emilmont 77:869cf507173a 3358 #define GPIO_BSRR_BR_12 ((uint32_t)0x10000000)
emilmont 77:869cf507173a 3359 #define GPIO_BSRR_BR_13 ((uint32_t)0x20000000)
emilmont 77:869cf507173a 3360 #define GPIO_BSRR_BR_14 ((uint32_t)0x40000000)
emilmont 77:869cf507173a 3361 #define GPIO_BSRR_BR_15 ((uint32_t)0x80000000)
emilmont 77:869cf507173a 3362
emilmont 77:869cf507173a 3363 /****************** Bit definition for GPIO_LCKR register ********************/
emilmont 77:869cf507173a 3364 #define GPIO_LCKR_LCK0 ((uint32_t)0x00000001)
emilmont 77:869cf507173a 3365 #define GPIO_LCKR_LCK1 ((uint32_t)0x00000002)
emilmont 77:869cf507173a 3366 #define GPIO_LCKR_LCK2 ((uint32_t)0x00000004)
emilmont 77:869cf507173a 3367 #define GPIO_LCKR_LCK3 ((uint32_t)0x00000008)
emilmont 77:869cf507173a 3368 #define GPIO_LCKR_LCK4 ((uint32_t)0x00000010)
emilmont 77:869cf507173a 3369 #define GPIO_LCKR_LCK5 ((uint32_t)0x00000020)
emilmont 77:869cf507173a 3370 #define GPIO_LCKR_LCK6 ((uint32_t)0x00000040)
emilmont 77:869cf507173a 3371 #define GPIO_LCKR_LCK7 ((uint32_t)0x00000080)
emilmont 77:869cf507173a 3372 #define GPIO_LCKR_LCK8 ((uint32_t)0x00000100)
emilmont 77:869cf507173a 3373 #define GPIO_LCKR_LCK9 ((uint32_t)0x00000200)
emilmont 77:869cf507173a 3374 #define GPIO_LCKR_LCK10 ((uint32_t)0x00000400)
emilmont 77:869cf507173a 3375 #define GPIO_LCKR_LCK11 ((uint32_t)0x00000800)
emilmont 77:869cf507173a 3376 #define GPIO_LCKR_LCK12 ((uint32_t)0x00001000)
emilmont 77:869cf507173a 3377 #define GPIO_LCKR_LCK13 ((uint32_t)0x00002000)
emilmont 77:869cf507173a 3378 #define GPIO_LCKR_LCK14 ((uint32_t)0x00004000)
emilmont 77:869cf507173a 3379 #define GPIO_LCKR_LCK15 ((uint32_t)0x00008000)
emilmont 77:869cf507173a 3380 #define GPIO_LCKR_LCKK ((uint32_t)0x00010000)
emilmont 77:869cf507173a 3381
emilmont 77:869cf507173a 3382 /****************** Bit definition for GPIO_AFRL register ********************/
emilmont 77:869cf507173a 3383 #define GPIO_AFRL_AFR0 ((uint32_t)0x0000000F)
emilmont 77:869cf507173a 3384 #define GPIO_AFRL_AFR1 ((uint32_t)0x000000F0)
emilmont 77:869cf507173a 3385 #define GPIO_AFRL_AFR2 ((uint32_t)0x00000F00)
emilmont 77:869cf507173a 3386 #define GPIO_AFRL_AFR3 ((uint32_t)0x0000F000)
emilmont 77:869cf507173a 3387 #define GPIO_AFRL_AFR4 ((uint32_t)0x000F0000)
emilmont 77:869cf507173a 3388 #define GPIO_AFRL_AFR5 ((uint32_t)0x00F00000)
emilmont 77:869cf507173a 3389 #define GPIO_AFRL_AFR6 ((uint32_t)0x0F000000)
emilmont 77:869cf507173a 3390 #define GPIO_AFRL_AFR7 ((uint32_t)0xF0000000)
emilmont 77:869cf507173a 3391
emilmont 77:869cf507173a 3392 /****************** Bit definition for GPIO_AFRH register ********************/
emilmont 77:869cf507173a 3393 #define GPIO_AFRH_AFR8 ((uint32_t)0x0000000F)
emilmont 77:869cf507173a 3394 #define GPIO_AFRH_AFR9 ((uint32_t)0x000000F0)
emilmont 77:869cf507173a 3395 #define GPIO_AFRH_AFR10 ((uint32_t)0x00000F00)
emilmont 77:869cf507173a 3396 #define GPIO_AFRH_AFR11 ((uint32_t)0x0000F000)
emilmont 77:869cf507173a 3397 #define GPIO_AFRH_AFR12 ((uint32_t)0x000F0000)
emilmont 77:869cf507173a 3398 #define GPIO_AFRH_AFR13 ((uint32_t)0x00F00000)
emilmont 77:869cf507173a 3399 #define GPIO_AFRH_AFR14 ((uint32_t)0x0F000000)
emilmont 77:869cf507173a 3400 #define GPIO_AFRH_AFR15 ((uint32_t)0xF0000000)
emilmont 77:869cf507173a 3401
emilmont 77:869cf507173a 3402 /* Old Bit definition for GPIO_AFRL register maintained for legacy purpose ****/
emilmont 77:869cf507173a 3403 #define GPIO_AFRL_AFRL0 GPIO_AFRL_AFR0
emilmont 77:869cf507173a 3404 #define GPIO_AFRL_AFRL1 GPIO_AFRL_AFR1
emilmont 77:869cf507173a 3405 #define GPIO_AFRL_AFRL2 GPIO_AFRL_AFR2
emilmont 77:869cf507173a 3406 #define GPIO_AFRL_AFRL3 GPIO_AFRL_AFR3
emilmont 77:869cf507173a 3407 #define GPIO_AFRL_AFRL4 GPIO_AFRL_AFR4
emilmont 77:869cf507173a 3408 #define GPIO_AFRL_AFRL5 GPIO_AFRL_AFR5
emilmont 77:869cf507173a 3409 #define GPIO_AFRL_AFRL6 GPIO_AFRL_AFR6
emilmont 77:869cf507173a 3410 #define GPIO_AFRL_AFRL7 GPIO_AFRL_AFR7
emilmont 77:869cf507173a 3411
emilmont 77:869cf507173a 3412 /* Old Bit definition for GPIO_AFRH register maintained for legacy purpose ****/
emilmont 77:869cf507173a 3413 #define GPIO_AFRH_AFRH0 GPIO_AFRH_AFR8
emilmont 77:869cf507173a 3414 #define GPIO_AFRH_AFRH1 GPIO_AFRH_AFR9
emilmont 77:869cf507173a 3415 #define GPIO_AFRH_AFRH2 GPIO_AFRH_AFR10
emilmont 77:869cf507173a 3416 #define GPIO_AFRH_AFRH3 GPIO_AFRH_AFR11
emilmont 77:869cf507173a 3417 #define GPIO_AFRH_AFRH4 GPIO_AFRH_AFR12
emilmont 77:869cf507173a 3418 #define GPIO_AFRH_AFRH5 GPIO_AFRH_AFR13
emilmont 77:869cf507173a 3419 #define GPIO_AFRH_AFRH6 GPIO_AFRH_AFR14
emilmont 77:869cf507173a 3420 #define GPIO_AFRH_AFRH7 GPIO_AFRH_AFR15
emilmont 77:869cf507173a 3421
emilmont 77:869cf507173a 3422 /****************** Bit definition for GPIO_BRR register *********************/
emilmont 77:869cf507173a 3423 #define GPIO_BRR_BR_0 ((uint32_t)0x00000001)
emilmont 77:869cf507173a 3424 #define GPIO_BRR_BR_1 ((uint32_t)0x00000002)
emilmont 77:869cf507173a 3425 #define GPIO_BRR_BR_2 ((uint32_t)0x00000004)
emilmont 77:869cf507173a 3426 #define GPIO_BRR_BR_3 ((uint32_t)0x00000008)
emilmont 77:869cf507173a 3427 #define GPIO_BRR_BR_4 ((uint32_t)0x00000010)
emilmont 77:869cf507173a 3428 #define GPIO_BRR_BR_5 ((uint32_t)0x00000020)
emilmont 77:869cf507173a 3429 #define GPIO_BRR_BR_6 ((uint32_t)0x00000040)
emilmont 77:869cf507173a 3430 #define GPIO_BRR_BR_7 ((uint32_t)0x00000080)
emilmont 77:869cf507173a 3431 #define GPIO_BRR_BR_8 ((uint32_t)0x00000100)
emilmont 77:869cf507173a 3432 #define GPIO_BRR_BR_9 ((uint32_t)0x00000200)
emilmont 77:869cf507173a 3433 #define GPIO_BRR_BR_10 ((uint32_t)0x00000400)
emilmont 77:869cf507173a 3434 #define GPIO_BRR_BR_11 ((uint32_t)0x00000800)
emilmont 77:869cf507173a 3435 #define GPIO_BRR_BR_12 ((uint32_t)0x00001000)
emilmont 77:869cf507173a 3436 #define GPIO_BRR_BR_13 ((uint32_t)0x00002000)
emilmont 77:869cf507173a 3437 #define GPIO_BRR_BR_14 ((uint32_t)0x00004000)
emilmont 77:869cf507173a 3438 #define GPIO_BRR_BR_15 ((uint32_t)0x00008000)
emilmont 77:869cf507173a 3439
emilmont 77:869cf507173a 3440 /******************************************************************************/
emilmont 77:869cf507173a 3441 /* */
emilmont 77:869cf507173a 3442 /* Inter-integrated Circuit Interface (I2C) */
emilmont 77:869cf507173a 3443 /* */
emilmont 77:869cf507173a 3444 /******************************************************************************/
emilmont 77:869cf507173a 3445
emilmont 77:869cf507173a 3446 /******************* Bit definition for I2C_CR1 register *******************/
emilmont 77:869cf507173a 3447 #define I2C_CR1_PE ((uint32_t)0x00000001) /*!< Peripheral enable */
emilmont 77:869cf507173a 3448 #define I2C_CR1_TXIE ((uint32_t)0x00000002) /*!< TX interrupt enable */
emilmont 77:869cf507173a 3449 #define I2C_CR1_RXIE ((uint32_t)0x00000004) /*!< RX interrupt enable */
emilmont 77:869cf507173a 3450 #define I2C_CR1_ADDRIE ((uint32_t)0x00000008) /*!< Address match interrupt enable */
emilmont 77:869cf507173a 3451 #define I2C_CR1_NACKIE ((uint32_t)0x00000010) /*!< NACK received interrupt enable */
emilmont 77:869cf507173a 3452 #define I2C_CR1_STOPIE ((uint32_t)0x00000020) /*!< STOP detection interrupt enable */
emilmont 77:869cf507173a 3453 #define I2C_CR1_TCIE ((uint32_t)0x00000040) /*!< Transfer complete interrupt enable */
emilmont 77:869cf507173a 3454 #define I2C_CR1_ERRIE ((uint32_t)0x00000080) /*!< Errors interrupt enable */
emilmont 77:869cf507173a 3455 #define I2C_CR1_DFN ((uint32_t)0x00000F00) /*!< Digital noise filter */
emilmont 77:869cf507173a 3456 #define I2C_CR1_ANFOFF ((uint32_t)0x00001000) /*!< Analog noise filter OFF */
emilmont 77:869cf507173a 3457 #define I2C_CR1_SWRST ((uint32_t)0x00002000) /*!< Software reset */
emilmont 77:869cf507173a 3458 #define I2C_CR1_TXDMAEN ((uint32_t)0x00004000) /*!< DMA transmission requests enable */
emilmont 77:869cf507173a 3459 #define I2C_CR1_RXDMAEN ((uint32_t)0x00008000) /*!< DMA reception requests enable */
emilmont 77:869cf507173a 3460 #define I2C_CR1_SBC ((uint32_t)0x00010000) /*!< Slave byte control */
emilmont 77:869cf507173a 3461 #define I2C_CR1_NOSTRETCH ((uint32_t)0x00020000) /*!< Clock stretching disable */
emilmont 77:869cf507173a 3462 #define I2C_CR1_WUPEN ((uint32_t)0x00040000) /*!< Wakeup from STOP enable */
emilmont 77:869cf507173a 3463 #define I2C_CR1_GCEN ((uint32_t)0x00080000) /*!< General call enable */
emilmont 77:869cf507173a 3464 #define I2C_CR1_SMBHEN ((uint32_t)0x00100000) /*!< SMBus host address enable */
emilmont 77:869cf507173a 3465 #define I2C_CR1_SMBDEN ((uint32_t)0x00200000) /*!< SMBus device default address enable */
emilmont 77:869cf507173a 3466 #define I2C_CR1_ALERTEN ((uint32_t)0x00400000) /*!< SMBus alert enable */
emilmont 77:869cf507173a 3467 #define I2C_CR1_PECEN ((uint32_t)0x00800000) /*!< PEC enable */
emilmont 77:869cf507173a 3468
emilmont 77:869cf507173a 3469 /****************** Bit definition for I2C_CR2 register ********************/
emilmont 77:869cf507173a 3470 #define I2C_CR2_SADD ((uint32_t)0x000003FF) /*!< Slave address (master mode) */
emilmont 77:869cf507173a 3471 #define I2C_CR2_RD_WRN ((uint32_t)0x00000400) /*!< Transfer direction (master mode) */
emilmont 77:869cf507173a 3472 #define I2C_CR2_ADD10 ((uint32_t)0x00000800) /*!< 10-bit addressing mode (master mode) */
emilmont 77:869cf507173a 3473 #define I2C_CR2_HEAD10R ((uint32_t)0x00001000) /*!< 10-bit address header only read direction (master mode) */
emilmont 77:869cf507173a 3474 #define I2C_CR2_START ((uint32_t)0x00002000) /*!< START generation */
emilmont 77:869cf507173a 3475 #define I2C_CR2_STOP ((uint32_t)0x00004000) /*!< STOP generation (master mode) */
emilmont 77:869cf507173a 3476 #define I2C_CR2_NACK ((uint32_t)0x00008000) /*!< NACK generation (slave mode) */
emilmont 77:869cf507173a 3477 #define I2C_CR2_NBYTES ((uint32_t)0x00FF0000) /*!< Number of bytes */
emilmont 77:869cf507173a 3478 #define I2C_CR2_RELOAD ((uint32_t)0x01000000) /*!< NBYTES reload mode */
emilmont 77:869cf507173a 3479 #define I2C_CR2_AUTOEND ((uint32_t)0x02000000) /*!< Automatic end mode (master mode) */
emilmont 77:869cf507173a 3480 #define I2C_CR2_PECBYTE ((uint32_t)0x04000000) /*!< Packet error checking byte */
emilmont 77:869cf507173a 3481
emilmont 77:869cf507173a 3482 /******************* Bit definition for I2C_OAR1 register ******************/
emilmont 77:869cf507173a 3483 #define I2C_OAR1_OA1 ((uint32_t)0x000003FF) /*!< Interface own address 1 */
emilmont 77:869cf507173a 3484 #define I2C_OAR1_OA1MODE ((uint32_t)0x00000400) /*!< Own address 1 10-bit mode */
emilmont 77:869cf507173a 3485 #define I2C_OAR1_OA1EN ((uint32_t)0x00008000) /*!< Own address 1 enable */
emilmont 77:869cf507173a 3486
emilmont 77:869cf507173a 3487 /******************* Bit definition for I2C_OAR2 register ******************/
emilmont 77:869cf507173a 3488 #define I2C_OAR2_OA2 ((uint32_t)0x000000FE) /*!< Interface own address 2 */
emilmont 77:869cf507173a 3489 #define I2C_OAR2_OA2MSK ((uint32_t)0x00000700) /*!< Own address 2 masks */
emilmont 77:869cf507173a 3490 #define I2C_OAR2_OA2EN ((uint32_t)0x00008000) /*!< Own address 2 enable */
emilmont 77:869cf507173a 3491
emilmont 77:869cf507173a 3492 /******************* Bit definition for I2C_TIMINGR register *******************/
emilmont 77:869cf507173a 3493 #define I2C_TIMINGR_SCLL ((uint32_t)0x000000FF) /*!< SCL low period (master mode) */
emilmont 77:869cf507173a 3494 #define I2C_TIMINGR_SCLH ((uint32_t)0x0000FF00) /*!< SCL high period (master mode) */
emilmont 77:869cf507173a 3495 #define I2C_TIMINGR_SDADEL ((uint32_t)0x000F0000) /*!< Data hold time */
emilmont 77:869cf507173a 3496 #define I2C_TIMINGR_SCLDEL ((uint32_t)0x00F00000) /*!< Data setup time */
emilmont 77:869cf507173a 3497 #define I2C_TIMINGR_PRESC ((uint32_t)0xF0000000) /*!< Timings prescaler */
emilmont 77:869cf507173a 3498
emilmont 77:869cf507173a 3499 /******************* Bit definition for I2C_TIMEOUTR register *******************/
emilmont 77:869cf507173a 3500 #define I2C_TIMEOUTR_TIMEOUTA ((uint32_t)0x00000FFF) /*!< Bus timeout A */
emilmont 77:869cf507173a 3501 #define I2C_TIMEOUTR_TIDLE ((uint32_t)0x00001000) /*!< Idle clock timeout detection */
emilmont 77:869cf507173a 3502 #define I2C_TIMEOUTR_TIMOUTEN ((uint32_t)0x00008000) /*!< Clock timeout enable */
emilmont 77:869cf507173a 3503 #define I2C_TIMEOUTR_TIMEOUTB ((uint32_t)0x0FFF0000) /*!< Bus timeout B*/
emilmont 77:869cf507173a 3504 #define I2C_TIMEOUTR_TEXTEN ((uint32_t)0x80000000) /*!< Extended clock timeout enable */
emilmont 77:869cf507173a 3505
emilmont 77:869cf507173a 3506 /****************** Bit definition for I2C_ISR register *********************/
emilmont 77:869cf507173a 3507 #define I2C_ISR_TXE ((uint32_t)0x00000001) /*!< Transmit data register empty */
emilmont 77:869cf507173a 3508 #define I2C_ISR_TXIS ((uint32_t)0x00000002) /*!< Transmit interrupt status */
emilmont 77:869cf507173a 3509 #define I2C_ISR_RXNE ((uint32_t)0x00000004) /*!< Receive data register not empty */
emilmont 77:869cf507173a 3510 #define I2C_ISR_ADDR ((uint32_t)0x00000008) /*!< Address matched (slave mode)*/
emilmont 77:869cf507173a 3511 #define I2C_ISR_NACKF ((uint32_t)0x00000010) /*!< NACK received flag */
emilmont 77:869cf507173a 3512 #define I2C_ISR_STOPF ((uint32_t)0x00000020) /*!< STOP detection flag */
emilmont 77:869cf507173a 3513 #define I2C_ISR_TC ((uint32_t)0x00000040) /*!< Transfer complete (master mode) */
emilmont 77:869cf507173a 3514 #define I2C_ISR_TCR ((uint32_t)0x00000080) /*!< Transfer complete reload */
emilmont 77:869cf507173a 3515 #define I2C_ISR_BERR ((uint32_t)0x00000100) /*!< Bus error */
emilmont 77:869cf507173a 3516 #define I2C_ISR_ARLO ((uint32_t)0x00000200) /*!< Arbitration lost */
emilmont 77:869cf507173a 3517 #define I2C_ISR_OVR ((uint32_t)0x00000400) /*!< Overrun/Underrun */
emilmont 77:869cf507173a 3518 #define I2C_ISR_PECERR ((uint32_t)0x00000800) /*!< PEC error in reception */
emilmont 77:869cf507173a 3519 #define I2C_ISR_TIMEOUT ((uint32_t)0x00001000) /*!< Timeout or Tlow detection flag */
emilmont 77:869cf507173a 3520 #define I2C_ISR_ALERT ((uint32_t)0x00002000) /*!< SMBus alert */
emilmont 77:869cf507173a 3521 #define I2C_ISR_BUSY ((uint32_t)0x00008000) /*!< Bus busy */
emilmont 77:869cf507173a 3522 #define I2C_ISR_DIR ((uint32_t)0x00010000) /*!< Transfer direction (slave mode) */
emilmont 77:869cf507173a 3523 #define I2C_ISR_ADDCODE ((uint32_t)0x00FE0000) /*!< Address match code (slave mode) */
emilmont 77:869cf507173a 3524
emilmont 77:869cf507173a 3525 /****************** Bit definition for I2C_ICR register *********************/
emilmont 77:869cf507173a 3526 #define I2C_ICR_ADDRCF ((uint32_t)0x00000008) /*!< Address matched clear flag */
emilmont 77:869cf507173a 3527 #define I2C_ICR_NACKCF ((uint32_t)0x00000010) /*!< NACK clear flag */
emilmont 77:869cf507173a 3528 #define I2C_ICR_STOPCF ((uint32_t)0x00000020) /*!< STOP detection clear flag */
emilmont 77:869cf507173a 3529 #define I2C_ICR_BERRCF ((uint32_t)0x00000100) /*!< Bus error clear flag */
emilmont 77:869cf507173a 3530 #define I2C_ICR_ARLOCF ((uint32_t)0x00000200) /*!< Arbitration lost clear flag */
emilmont 77:869cf507173a 3531 #define I2C_ICR_OVRCF ((uint32_t)0x00000400) /*!< Overrun/Underrun clear flag */
emilmont 77:869cf507173a 3532 #define I2C_ICR_PECCF ((uint32_t)0x00000800) /*!< PAC error clear flag */
emilmont 77:869cf507173a 3533 #define I2C_ICR_TIMOUTCF ((uint32_t)0x00001000) /*!< Timeout clear flag */
emilmont 77:869cf507173a 3534 #define I2C_ICR_ALERTCF ((uint32_t)0x00002000) /*!< Alert clear flag */
emilmont 77:869cf507173a 3535
emilmont 77:869cf507173a 3536 /****************** Bit definition for I2C_PECR register *********************/
emilmont 77:869cf507173a 3537 #define I2C_PECR_PEC ((uint32_t)0x000000FF) /*!< PEC register */
emilmont 77:869cf507173a 3538
emilmont 77:869cf507173a 3539 /****************** Bit definition for I2C_RXDR register *********************/
emilmont 77:869cf507173a 3540 #define I2C_RXDR_RXDATA ((uint32_t)0x000000FF) /*!< 8-bit receive data */
emilmont 77:869cf507173a 3541
emilmont 77:869cf507173a 3542 /****************** Bit definition for I2C_TXDR register *********************/
emilmont 77:869cf507173a 3543 #define I2C_TXDR_TXDATA ((uint32_t)0x000000FF) /*!< 8-bit transmit data */
emilmont 77:869cf507173a 3544
emilmont 77:869cf507173a 3545 /******************************************************************************/
emilmont 77:869cf507173a 3546 /* */
emilmont 77:869cf507173a 3547 /* Independent WATCHDOG (IWDG) */
emilmont 77:869cf507173a 3548 /* */
emilmont 77:869cf507173a 3549 /******************************************************************************/
emilmont 77:869cf507173a 3550 /******************* Bit definition for IWDG_KR register ********************/
emilmont 77:869cf507173a 3551 #define IWDG_KR_KEY ((uint16_t)0xFFFF) /*!< Key value (write only, read 0000h) */
emilmont 77:869cf507173a 3552
emilmont 77:869cf507173a 3553 /******************* Bit definition for IWDG_PR register ********************/
emilmont 77:869cf507173a 3554 #define IWDG_PR_PR ((uint8_t)0x07) /*!< PR[2:0] (Prescaler divider) */
emilmont 77:869cf507173a 3555 #define IWDG_PR_PR_0 ((uint8_t)0x01) /*!< Bit 0 */
emilmont 77:869cf507173a 3556 #define IWDG_PR_PR_1 ((uint8_t)0x02) /*!< Bit 1 */
emilmont 77:869cf507173a 3557 #define IWDG_PR_PR_2 ((uint8_t)0x04) /*!< Bit 2 */
emilmont 77:869cf507173a 3558
emilmont 77:869cf507173a 3559 /******************* Bit definition for IWDG_RLR register *******************/
emilmont 77:869cf507173a 3560 #define IWDG_RLR_RL ((uint16_t)0x0FFF) /*!< Watchdog counter reload value */
emilmont 77:869cf507173a 3561
emilmont 77:869cf507173a 3562 /******************* Bit definition for IWDG_SR register ********************/
emilmont 77:869cf507173a 3563 #define IWDG_SR_PVU ((uint8_t)0x01) /*!< Watchdog prescaler value update */
emilmont 77:869cf507173a 3564 #define IWDG_SR_RVU ((uint8_t)0x02) /*!< Watchdog counter reload value update */
emilmont 77:869cf507173a 3565 #define IWDG_SR_WVU ((uint8_t)0x04) /*!< Watchdog counter window value update */
emilmont 77:869cf507173a 3566
emilmont 77:869cf507173a 3567 /******************* Bit definition for IWDG_KR register ********************/
emilmont 77:869cf507173a 3568 #define IWDG_WINR_WIN ((uint16_t)0x0FFF) /*!< Watchdog counter window value */
emilmont 77:869cf507173a 3569
emilmont 77:869cf507173a 3570 /******************************************************************************/
emilmont 77:869cf507173a 3571 /* */
emilmont 77:869cf507173a 3572 /* Power Control (PWR) */
emilmont 77:869cf507173a 3573 /* */
emilmont 77:869cf507173a 3574 /******************************************************************************/
emilmont 77:869cf507173a 3575
emilmont 77:869cf507173a 3576 /******************** Bit definition for PWR_CR register ********************/
emilmont 77:869cf507173a 3577 #define PWR_CR_LPDS ((uint16_t)0x0001) /*!< Low-power deepsleep/sleep */
emilmont 77:869cf507173a 3578 #define PWR_CR_PDDS ((uint16_t)0x0002) /*!< Power Down Deepsleep */
emilmont 77:869cf507173a 3579 #define PWR_CR_CWUF ((uint16_t)0x0004) /*!< Clear Wakeup Flag */
emilmont 77:869cf507173a 3580 #define PWR_CR_CSBF ((uint16_t)0x0008) /*!< Clear Standby Flag */
emilmont 77:869cf507173a 3581 #define PWR_CR_PVDE ((uint16_t)0x0010) /*!< Power Voltage Detector Enable */
emilmont 77:869cf507173a 3582
emilmont 77:869cf507173a 3583 #define PWR_CR_PLS ((uint16_t)0x00E0) /*!< PLS[2:0] bits (PVD Level Selection) */
emilmont 77:869cf507173a 3584 #define PWR_CR_PLS_0 ((uint16_t)0x0020) /*!< Bit 0 */
emilmont 77:869cf507173a 3585 #define PWR_CR_PLS_1 ((uint16_t)0x0040) /*!< Bit 1 */
emilmont 77:869cf507173a 3586 #define PWR_CR_PLS_2 ((uint16_t)0x0080) /*!< Bit 2 */
emilmont 77:869cf507173a 3587 /* PVD level configuration */
emilmont 77:869cf507173a 3588 #define PWR_CR_PLS_LEV0 ((uint16_t)0x0000) /*!< PVD level 0 */
emilmont 77:869cf507173a 3589 #define PWR_CR_PLS_LEV1 ((uint16_t)0x0020) /*!< PVD level 1 */
emilmont 77:869cf507173a 3590 #define PWR_CR_PLS_LEV2 ((uint16_t)0x0040) /*!< PVD level 2 */
emilmont 77:869cf507173a 3591 #define PWR_CR_PLS_LEV3 ((uint16_t)0x0060) /*!< PVD level 3 */
emilmont 77:869cf507173a 3592 #define PWR_CR_PLS_LEV4 ((uint16_t)0x0080) /*!< PVD level 4 */
emilmont 77:869cf507173a 3593 #define PWR_CR_PLS_LEV5 ((uint16_t)0x00A0) /*!< PVD level 5 */
emilmont 77:869cf507173a 3594 #define PWR_CR_PLS_LEV6 ((uint16_t)0x00C0) /*!< PVD level 6 */
emilmont 77:869cf507173a 3595 #define PWR_CR_PLS_LEV7 ((uint16_t)0x00E0) /*!< PVD level 7 */
emilmont 77:869cf507173a 3596
emilmont 77:869cf507173a 3597 #define PWR_CR_DBP ((uint16_t)0x0100) /*!< Disable Backup Domain write protection */
emilmont 77:869cf507173a 3598
emilmont 77:869cf507173a 3599 /* Old Bit definition maintained for legacy purpose ****/
emilmont 77:869cf507173a 3600 #define PWR_CR_LPSDSR PWR_CR_LPDS /*!< Low-power deepsleep */
emilmont 77:869cf507173a 3601
emilmont 77:869cf507173a 3602 /******************* Bit definition for PWR_CSR register ********************/
emilmont 77:869cf507173a 3603 #define PWR_CSR_WUF ((uint16_t)0x0001) /*!< Wakeup Flag */
emilmont 77:869cf507173a 3604 #define PWR_CSR_SBF ((uint16_t)0x0002) /*!< Standby Flag */
emilmont 77:869cf507173a 3605 #define PWR_CSR_PVDO ((uint16_t)0x0004) /*!< PVD Output */
emilmont 77:869cf507173a 3606 #define PWR_CSR_VREFINTRDY ((uint16_t)0x0008) /*!< Internal voltage reference (VREFINT) ready */
emilmont 77:869cf507173a 3607
emilmont 77:869cf507173a 3608 #define PWR_CSR_EWUP1 ((uint16_t)0x0100) /*!< Enable WKUP pin 1 */
emilmont 77:869cf507173a 3609 #define PWR_CSR_EWUP2 ((uint16_t)0x0200) /*!< Enable WKUP pin 2 */
emilmont 77:869cf507173a 3610 #define PWR_CSR_EWUP3 ((uint16_t)0x0400) /*!< Enable WKUP pin 3 */
emilmont 77:869cf507173a 3611 #define PWR_CSR_EWUP4 ((uint16_t)0x0800) /*!< Enable WKUP pin 4 */
emilmont 77:869cf507173a 3612 #define PWR_CSR_EWUP5 ((uint16_t)0x1000) /*!< Enable WKUP pin 5 */
emilmont 77:869cf507173a 3613 #define PWR_CSR_EWUP6 ((uint16_t)0x2000) /*!< Enable WKUP pin 6 */
emilmont 77:869cf507173a 3614 #define PWR_CSR_EWUP7 ((uint16_t)0x4000) /*!< Enable WKUP pin 7 */
emilmont 77:869cf507173a 3615 #define PWR_CSR_EWUP8 ((uint16_t)0x8000) /*!< Enable WKUP pin 8 */
emilmont 77:869cf507173a 3616
emilmont 77:869cf507173a 3617 /* Old Bit definition maintained for legacy purpose ****/
emilmont 77:869cf507173a 3618 #define PWR_CSR_VREFINTRDYF PWR_CSR_VREFINTRDY /*!< Internal voltage reference (VREFINT) ready flag */
emilmont 77:869cf507173a 3619 /******************************************************************************/
emilmont 77:869cf507173a 3620 /* */
emilmont 77:869cf507173a 3621 /* Reset and Clock Control */
emilmont 77:869cf507173a 3622 /* */
emilmont 77:869cf507173a 3623 /******************************************************************************/
emilmont 77:869cf507173a 3624
emilmont 77:869cf507173a 3625 /******************** Bit definition for RCC_CR register ********************/
emilmont 77:869cf507173a 3626 #define RCC_CR_HSION ((uint32_t)0x00000001) /*!< Internal High Speed clock enable */
emilmont 77:869cf507173a 3627 #define RCC_CR_HSIRDY ((uint32_t)0x00000002) /*!< Internal High Speed clock ready flag */
emilmont 77:869cf507173a 3628 #define RCC_CR_HSITRIM ((uint32_t)0x000000F8) /*!< Internal High Speed clock trimming */
emilmont 77:869cf507173a 3629 #define RCC_CR_HSICAL ((uint32_t)0x0000FF00) /*!< Internal High Speed clock Calibration */
emilmont 77:869cf507173a 3630 #define RCC_CR_HSEON ((uint32_t)0x00010000) /*!< External High Speed clock enable */
emilmont 77:869cf507173a 3631 #define RCC_CR_HSERDY ((uint32_t)0x00020000) /*!< External High Speed clock ready flag */
emilmont 77:869cf507173a 3632 #define RCC_CR_HSEBYP ((uint32_t)0x00040000) /*!< External High Speed clock Bypass */
emilmont 77:869cf507173a 3633 #define RCC_CR_CSSON ((uint32_t)0x00080000) /*!< Clock Security System enable */
emilmont 77:869cf507173a 3634 #define RCC_CR_PLLON ((uint32_t)0x01000000) /*!< PLL enable */
emilmont 77:869cf507173a 3635 #define RCC_CR_PLLRDY ((uint32_t)0x02000000) /*!< PLL clock ready flag */
emilmont 77:869cf507173a 3636
emilmont 77:869cf507173a 3637 /******************* Bit definition for RCC_CFGR register *******************/
emilmont 77:869cf507173a 3638 #define RCC_CFGR_SW ((uint32_t)0x00000003) /*!< SW[1:0] bits (System clock Switch) */
emilmont 77:869cf507173a 3639 #define RCC_CFGR_SW_0 ((uint32_t)0x00000001) /*!< Bit 0 */
emilmont 77:869cf507173a 3640 #define RCC_CFGR_SW_1 ((uint32_t)0x00000002) /*!< Bit 1 */
emilmont 77:869cf507173a 3641 /* SW configuration */
emilmont 77:869cf507173a 3642 #define RCC_CFGR_SW_HSI ((uint32_t)0x00000000) /*!< HSI selected as system clock */
emilmont 77:869cf507173a 3643 #define RCC_CFGR_SW_HSE ((uint32_t)0x00000001) /*!< HSE selected as system clock */
emilmont 77:869cf507173a 3644 #define RCC_CFGR_SW_PLL ((uint32_t)0x00000002) /*!< PLL selected as system clock */
emilmont 77:869cf507173a 3645 #define RCC_CFGR_SW_HSI48 ((uint32_t)0x00000003) /*!< HSI48 selected as system clock */
emilmont 77:869cf507173a 3646
emilmont 77:869cf507173a 3647 #define RCC_CFGR_SWS ((uint32_t)0x0000000C) /*!< SWS[1:0] bits (System Clock Switch Status) */
emilmont 77:869cf507173a 3648 #define RCC_CFGR_SWS_0 ((uint32_t)0x00000004) /*!< Bit 0 */
emilmont 77:869cf507173a 3649 #define RCC_CFGR_SWS_1 ((uint32_t)0x00000008) /*!< Bit 1 */
emilmont 77:869cf507173a 3650 /* SWS configuration */
emilmont 77:869cf507173a 3651 #define RCC_CFGR_SWS_HSI ((uint32_t)0x00000000) /*!< HSI oscillator used as system clock */
emilmont 77:869cf507173a 3652 #define RCC_CFGR_SWS_HSE ((uint32_t)0x00000004) /*!< HSE oscillator used as system clock */
emilmont 77:869cf507173a 3653 #define RCC_CFGR_SWS_PLL ((uint32_t)0x00000008) /*!< PLL used as system clock */
emilmont 77:869cf507173a 3654 #define RCC_CFGR_SWS_HSI48 ((uint32_t)0x0000000C) /*!< HSI48 used as system clock */
emilmont 77:869cf507173a 3655
emilmont 77:869cf507173a 3656 #define RCC_CFGR_HPRE ((uint32_t)0x000000F0) /*!< HPRE[3:0] bits (AHB prescaler) */
emilmont 77:869cf507173a 3657 #define RCC_CFGR_HPRE_0 ((uint32_t)0x00000010) /*!< Bit 0 */
emilmont 77:869cf507173a 3658 #define RCC_CFGR_HPRE_1 ((uint32_t)0x00000020) /*!< Bit 1 */
emilmont 77:869cf507173a 3659 #define RCC_CFGR_HPRE_2 ((uint32_t)0x00000040) /*!< Bit 2 */
emilmont 77:869cf507173a 3660 #define RCC_CFGR_HPRE_3 ((uint32_t)0x00000080) /*!< Bit 3 */
emilmont 77:869cf507173a 3661 /* HPRE configuration */
emilmont 77:869cf507173a 3662 #define RCC_CFGR_HPRE_DIV1 ((uint32_t)0x00000000) /*!< SYSCLK not divided */
emilmont 77:869cf507173a 3663 #define RCC_CFGR_HPRE_DIV2 ((uint32_t)0x00000080) /*!< SYSCLK divided by 2 */
emilmont 77:869cf507173a 3664 #define RCC_CFGR_HPRE_DIV4 ((uint32_t)0x00000090) /*!< SYSCLK divided by 4 */
emilmont 77:869cf507173a 3665 #define RCC_CFGR_HPRE_DIV8 ((uint32_t)0x000000A0) /*!< SYSCLK divided by 8 */
emilmont 77:869cf507173a 3666 #define RCC_CFGR_HPRE_DIV16 ((uint32_t)0x000000B0) /*!< SYSCLK divided by 16 */
emilmont 77:869cf507173a 3667 #define RCC_CFGR_HPRE_DIV64 ((uint32_t)0x000000C0) /*!< SYSCLK divided by 64 */
emilmont 77:869cf507173a 3668 #define RCC_CFGR_HPRE_DIV128 ((uint32_t)0x000000D0) /*!< SYSCLK divided by 128 */
emilmont 77:869cf507173a 3669 #define RCC_CFGR_HPRE_DIV256 ((uint32_t)0x000000E0) /*!< SYSCLK divided by 256 */
emilmont 77:869cf507173a 3670 #define RCC_CFGR_HPRE_DIV512 ((uint32_t)0x000000F0) /*!< SYSCLK divided by 512 */
emilmont 77:869cf507173a 3671
emilmont 77:869cf507173a 3672 #define RCC_CFGR_PPRE ((uint32_t)0x00000700) /*!< PRE[2:0] bits (APB prescaler) */
emilmont 77:869cf507173a 3673 #define RCC_CFGR_PPRE_0 ((uint32_t)0x00000100) /*!< Bit 0 */
emilmont 77:869cf507173a 3674 #define RCC_CFGR_PPRE_1 ((uint32_t)0x00000200) /*!< Bit 1 */
emilmont 77:869cf507173a 3675 #define RCC_CFGR_PPRE_2 ((uint32_t)0x00000400) /*!< Bit 2 */
emilmont 77:869cf507173a 3676 /* PPRE configuration */
emilmont 77:869cf507173a 3677 #define RCC_CFGR_PPRE_DIV1 ((uint32_t)0x00000000) /*!< HCLK not divided */
emilmont 77:869cf507173a 3678 #define RCC_CFGR_PPRE_DIV2 ((uint32_t)0x00000400) /*!< HCLK divided by 2 */
emilmont 77:869cf507173a 3679 #define RCC_CFGR_PPRE_DIV4 ((uint32_t)0x00000500) /*!< HCLK divided by 4 */
emilmont 77:869cf507173a 3680 #define RCC_CFGR_PPRE_DIV8 ((uint32_t)0x00000600) /*!< HCLK divided by 8 */
emilmont 77:869cf507173a 3681 #define RCC_CFGR_PPRE_DIV16 ((uint32_t)0x00000700) /*!< HCLK divided by 16 */
emilmont 77:869cf507173a 3682
emilmont 77:869cf507173a 3683 #define RCC_CFGR_ADCPRE ((uint32_t)0x00004000) /*!< ADC prescaler: Obsolete. Proper ADC clock selection is
emilmont 77:869cf507173a 3684 done inside the ADC_CFGR2 */
emilmont 77:869cf507173a 3685
emilmont 77:869cf507173a 3686 #define RCC_CFGR_PLLSRC ((uint32_t)0x00018000) /*!< PLL entry clock source */
emilmont 77:869cf507173a 3687 #define RCC_CFGR_PLLSRC_0 ((uint32_t)0x00008000) /*!< Bit 0 (available only in the STM32F072 devices) */
emilmont 77:869cf507173a 3688 #define RCC_CFGR_PLLSRC_1 ((uint32_t)0x00010000) /*!< Bit 1 */
emilmont 77:869cf507173a 3689
emilmont 77:869cf507173a 3690 #define RCC_CFGR_PLLSRC_PREDIV1 ((uint32_t)0x00010000) /*!< PREDIV1 clock selected as PLL entry clock source;
emilmont 77:869cf507173a 3691 Old PREDIV1 bit definition, maintained for legacy purpose */
emilmont 77:869cf507173a 3692 #define RCC_CFGR_PLLSRC_HSI_DIV2 ((uint32_t)0x00000000) /*!< HSI clock divided by 2 selected as PLL entry clock source */
emilmont 77:869cf507173a 3693 #define RCC_CFGR_PLLSRC_HSI_PREDIV ((uint32_t)0x00008000) /*!< HSI PREDIV clock selected as PLL entry clock source
emilmont 77:869cf507173a 3694 (This bit and configuration is only available for STM32F072 devices)*/
emilmont 77:869cf507173a 3695 #define RCC_CFGR_PLLSRC_HSE_PREDIV ((uint32_t)0x00010000) /*!< HSE PREDIV clock selected as PLL entry clock source */
emilmont 77:869cf507173a 3696 #define RCC_CFGR_PLLSRC_HSI48_PREDIV ((uint32_t)0x00018000) /*!< HSI48 PREDIV clock selected as PLL entry clock source */
emilmont 77:869cf507173a 3697
emilmont 77:869cf507173a 3698 #define RCC_CFGR_PLLXTPRE ((uint32_t)0x00020000) /*!< HSE divider for PLL entry */
emilmont 77:869cf507173a 3699 #define RCC_CFGR_PLLXTPRE_PREDIV1 ((uint32_t)0x00000000) /*!< PREDIV1 clock not divided for PLL entry */
emilmont 77:869cf507173a 3700 #define RCC_CFGR_PLLXTPRE_PREDIV1_Div2 ((uint32_t)0x00020000) /*!< PREDIV1 clock divided by 2 for PLL entry */
emilmont 77:869cf507173a 3701
emilmont 77:869cf507173a 3702 /*!< Old bit definition maintained for legacy purposes */
emilmont 77:869cf507173a 3703 #define RCC_CFGR_PLLSRC_HSI_Div2 RCC_CFGR_PLLSRC_HSI_DIV2
emilmont 77:869cf507173a 3704
emilmont 77:869cf507173a 3705 /* PLLMUL configuration */
emilmont 77:869cf507173a 3706 #define RCC_CFGR_PLLMUL ((uint32_t)0x003C0000) /*!< PLLMUL[3:0] bits (PLL multiplication factor) */
emilmont 77:869cf507173a 3707 #define RCC_CFGR_PLLMUL_0 ((uint32_t)0x00040000) /*!< Bit 0 */
emilmont 77:869cf507173a 3708 #define RCC_CFGR_PLLMUL_1 ((uint32_t)0x00080000) /*!< Bit 1 */
emilmont 77:869cf507173a 3709 #define RCC_CFGR_PLLMUL_2 ((uint32_t)0x00100000) /*!< Bit 2 */
emilmont 77:869cf507173a 3710 #define RCC_CFGR_PLLMUL_3 ((uint32_t)0x00200000) /*!< Bit 3 */
emilmont 77:869cf507173a 3711
emilmont 77:869cf507173a 3712 #define RCC_CFGR_PLLMUL2 ((uint32_t)0x00000000) /*!< PLL input clock*2 */
emilmont 77:869cf507173a 3713 #define RCC_CFGR_PLLMUL3 ((uint32_t)0x00040000) /*!< PLL input clock*3 */
emilmont 77:869cf507173a 3714 #define RCC_CFGR_PLLMUL4 ((uint32_t)0x00080000) /*!< PLL input clock*4 */
emilmont 77:869cf507173a 3715 #define RCC_CFGR_PLLMUL5 ((uint32_t)0x000C0000) /*!< PLL input clock*5 */
emilmont 77:869cf507173a 3716 #define RCC_CFGR_PLLMUL6 ((uint32_t)0x00100000) /*!< PLL input clock*6 */
emilmont 77:869cf507173a 3717 #define RCC_CFGR_PLLMUL7 ((uint32_t)0x00140000) /*!< PLL input clock*7 */
emilmont 77:869cf507173a 3718 #define RCC_CFGR_PLLMUL8 ((uint32_t)0x00180000) /*!< PLL input clock*8 */
emilmont 77:869cf507173a 3719 #define RCC_CFGR_PLLMUL9 ((uint32_t)0x001C0000) /*!< PLL input clock*9 */
emilmont 77:869cf507173a 3720 #define RCC_CFGR_PLLMUL10 ((uint32_t)0x00200000) /*!< PLL input clock10 */
emilmont 77:869cf507173a 3721 #define RCC_CFGR_PLLMUL11 ((uint32_t)0x00240000) /*!< PLL input clock*11 */
emilmont 77:869cf507173a 3722 #define RCC_CFGR_PLLMUL12 ((uint32_t)0x00280000) /*!< PLL input clock*12 */
emilmont 77:869cf507173a 3723 #define RCC_CFGR_PLLMUL13 ((uint32_t)0x002C0000) /*!< PLL input clock*13 */
emilmont 77:869cf507173a 3724 #define RCC_CFGR_PLLMUL14 ((uint32_t)0x00300000) /*!< PLL input clock*14 */
emilmont 77:869cf507173a 3725 #define RCC_CFGR_PLLMUL15 ((uint32_t)0x00340000) /*!< PLL input clock*15 */
emilmont 77:869cf507173a 3726 #define RCC_CFGR_PLLMUL16 ((uint32_t)0x00380000) /*!< PLL input clock*16 */
emilmont 77:869cf507173a 3727
emilmont 77:869cf507173a 3728 /* Old PLLMUL configuration bit definition maintained for legacy purposes */
emilmont 77:869cf507173a 3729 #define RCC_CFGR_PLLMULL RCC_CFGR_PLLMUL /*!< PLLMUL[3:0] bits (PLL multiplication factor) */
emilmont 77:869cf507173a 3730 #define RCC_CFGR_PLLMULL_0 RCC_CFGR_PLLMUL_0 /*!< Bit 0 */
emilmont 77:869cf507173a 3731 #define RCC_CFGR_PLLMULL_1 RCC_CFGR_PLLMUL_1 /*!< Bit 1 */
emilmont 77:869cf507173a 3732 #define RCC_CFGR_PLLMULL_2 RCC_CFGR_PLLMUL_2 /*!< Bit 2 */
emilmont 77:869cf507173a 3733 #define RCC_CFGR_PLLMULL_3 RCC_CFGR_PLLMUL_3 /*!< Bit 3 */
emilmont 77:869cf507173a 3734
emilmont 77:869cf507173a 3735 #define RCC_CFGR_PLLMULL2 RCC_CFGR_PLLMUL2 /*!< PLL input clock*2 */
emilmont 77:869cf507173a 3736 #define RCC_CFGR_PLLMULL3 RCC_CFGR_PLLMUL3 /*!< PLL input clock*3 */
emilmont 77:869cf507173a 3737 #define RCC_CFGR_PLLMULL4 RCC_CFGR_PLLMUL4 /*!< PLL input clock*4 */
emilmont 77:869cf507173a 3738 #define RCC_CFGR_PLLMULL5 RCC_CFGR_PLLMUL5 /*!< PLL input clock*5 */
emilmont 77:869cf507173a 3739 #define RCC_CFGR_PLLMULL6 RCC_CFGR_PLLMUL6 /*!< PLL input clock*6 */
emilmont 77:869cf507173a 3740 #define RCC_CFGR_PLLMULL7 RCC_CFGR_PLLMUL7 /*!< PLL input clock*7 */
emilmont 77:869cf507173a 3741 #define RCC_CFGR_PLLMULL8 RCC_CFGR_PLLMUL8 /*!< PLL input clock*8 */
emilmont 77:869cf507173a 3742 #define RCC_CFGR_PLLMULL9 RCC_CFGR_PLLMUL9 /*!< PLL input clock*9 */
emilmont 77:869cf507173a 3743 #define RCC_CFGR_PLLMULL10 RCC_CFGR_PLLMUL10 /*!< PLL input clock10 */
emilmont 77:869cf507173a 3744 #define RCC_CFGR_PLLMULL11 RCC_CFGR_PLLMUL11 /*!< PLL input clock*11 */
emilmont 77:869cf507173a 3745 #define RCC_CFGR_PLLMULL12 RCC_CFGR_PLLMUL12 /*!< PLL input clock*12 */
emilmont 77:869cf507173a 3746 #define RCC_CFGR_PLLMULL13 RCC_CFGR_PLLMUL13 /*!< PLL input clock*13 */
emilmont 77:869cf507173a 3747 #define RCC_CFGR_PLLMULL14 RCC_CFGR_PLLMUL14 /*!< PLL input clock*14 */
emilmont 77:869cf507173a 3748 #define RCC_CFGR_PLLMULL15 RCC_CFGR_PLLMUL15 /*!< PLL input clock*15 */
emilmont 77:869cf507173a 3749 #define RCC_CFGR_PLLMULL16 RCC_CFGR_PLLMUL16 /*!< PLL input clock*16 */
emilmont 77:869cf507173a 3750
emilmont 77:869cf507173a 3751 #define RCC_CFGR_MCO ((uint32_t)0x0F000000) /*!< MCO[2:0] bits (Microcontroller Clock Output) */
emilmont 77:869cf507173a 3752 #define RCC_CFGR_MCO_0 ((uint32_t)0x01000000) /*!< Bit 0 */
emilmont 77:869cf507173a 3753 #define RCC_CFGR_MCO_1 ((uint32_t)0x02000000) /*!< Bit 1 */
emilmont 77:869cf507173a 3754 #define RCC_CFGR_MCO_2 ((uint32_t)0x04000000) /*!< Bit 2 */
emilmont 77:869cf507173a 3755 #define RCC_CFGR_MCO_3 ((uint32_t)0x08000000) /*!< Bit 3 */
emilmont 77:869cf507173a 3756 /* MCO configuration */
emilmont 77:869cf507173a 3757 #define RCC_CFGR_MCO_NOCLOCK ((uint32_t)0x00000000) /*!< No clock */
emilmont 77:869cf507173a 3758 #define RCC_CFGR_MCO_HSI14 ((uint32_t)0x01000000) /*!< HSI14 clock selected as MCO source */
emilmont 77:869cf507173a 3759 #define RCC_CFGR_MCO_LSI ((uint32_t)0x02000000) /*!< LSI clock selected as MCO source */
emilmont 77:869cf507173a 3760 #define RCC_CFGR_MCO_LSE ((uint32_t)0x03000000) /*!< LSE clock selected as MCO source */
emilmont 77:869cf507173a 3761 #define RCC_CFGR_MCO_SYSCLK ((uint32_t)0x04000000) /*!< System clock selected as MCO source */
emilmont 77:869cf507173a 3762 #define RCC_CFGR_MCO_HSI ((uint32_t)0x05000000) /*!< HSI clock selected as MCO source */
emilmont 77:869cf507173a 3763 #define RCC_CFGR_MCO_HSE ((uint32_t)0x06000000) /*!< HSE clock selected as MCO source */
emilmont 77:869cf507173a 3764 #define RCC_CFGR_MCO_PLL ((uint32_t)0x07000000) /*!< PLL clock selected as MCO source */
emilmont 77:869cf507173a 3765 #define RCC_CFGR_MCO_HSI48 ((uint32_t)0x08000000) /*!< HSI48 clock selected as MCO source */
emilmont 77:869cf507173a 3766
emilmont 77:869cf507173a 3767 #define RCC_CFGR_MCO_PRE ((uint32_t)0x70000000) /*!< MCO prescaler (these bits are not available in the STM32F051 devices)*/
emilmont 77:869cf507173a 3768 #define RCC_CFGR_MCO_PRE_1 ((uint32_t)0x00000000) /*!< MCO is divided by 1 (this bit are not available in the STM32F051 devices)*/
emilmont 77:869cf507173a 3769 #define RCC_CFGR_MCO_PRE_2 ((uint32_t)0x10000000) /*!< MCO is divided by 2 (this bit are not available in the STM32F051 devices)*/
emilmont 77:869cf507173a 3770 #define RCC_CFGR_MCO_PRE_4 ((uint32_t)0x20000000) /*!< MCO is divided by 4 (this bit are not available in the STM32F051 devices)*/
emilmont 77:869cf507173a 3771 #define RCC_CFGR_MCO_PRE_8 ((uint32_t)0x30000000) /*!< MCO is divided by 8 (this bit are not available in the STM32F051 devices)*/
emilmont 77:869cf507173a 3772 #define RCC_CFGR_MCO_PRE_16 ((uint32_t)0x40000000) /*!< MCO is divided by 16 (this bit are not available in the STM32F051 devices)*/
emilmont 77:869cf507173a 3773 #define RCC_CFGR_MCO_PRE_32 ((uint32_t)0x50000000) /*!< MCO is divided by 32 (this bit are not available in the STM32F051 devices)*/
emilmont 77:869cf507173a 3774 #define RCC_CFGR_MCO_PRE_64 ((uint32_t)0x60000000) /*!< MCO is divided by 64 (this bit are not available in the STM32F051 devices)*/
emilmont 77:869cf507173a 3775 #define RCC_CFGR_MCO_PRE_128 ((uint32_t)0x70000000) /*!< MCO is divided by 128 (this bit are not available in the STM32F051 devices)*/
emilmont 77:869cf507173a 3776
emilmont 77:869cf507173a 3777 #define RCC_CFGR_PLLNODIV ((uint32_t)0x80000000) /*!< PLL is not divided to MCO (this bit are not available in the STM32F051 devices) */
emilmont 77:869cf507173a 3778
emilmont 77:869cf507173a 3779 /******************* Bit definition for RCC_CIR register ********************/
emilmont 77:869cf507173a 3780 #define RCC_CIR_LSIRDYF ((uint32_t)0x00000001) /*!< LSI Ready Interrupt flag */
emilmont 77:869cf507173a 3781 #define RCC_CIR_LSERDYF ((uint32_t)0x00000002) /*!< LSE Ready Interrupt flag */
emilmont 77:869cf507173a 3782 #define RCC_CIR_HSIRDYF ((uint32_t)0x00000004) /*!< HSI Ready Interrupt flag */
emilmont 77:869cf507173a 3783 #define RCC_CIR_HSERDYF ((uint32_t)0x00000008) /*!< HSE Ready Interrupt flag */
emilmont 77:869cf507173a 3784 #define RCC_CIR_PLLRDYF ((uint32_t)0x00000010) /*!< PLL Ready Interrupt flag */
emilmont 77:869cf507173a 3785 #define RCC_CIR_HSI14RDYF ((uint32_t)0x00000020) /*!< HSI14 Ready Interrupt flag */
emilmont 77:869cf507173a 3786 #define RCC_CIR_HSI48RDYF ((uint32_t)0x00000040) /*!< HSI48 Ready Interrupt flag */
emilmont 77:869cf507173a 3787 #define RCC_CIR_CSSF ((uint32_t)0x00000080) /*!< Clock Security System Interrupt flag */
emilmont 77:869cf507173a 3788 #define RCC_CIR_LSIRDYIE ((uint32_t)0x00000100) /*!< LSI Ready Interrupt Enable */
emilmont 77:869cf507173a 3789 #define RCC_CIR_LSERDYIE ((uint32_t)0x00000200) /*!< LSE Ready Interrupt Enable */
emilmont 77:869cf507173a 3790 #define RCC_CIR_HSIRDYIE ((uint32_t)0x00000400) /*!< HSI Ready Interrupt Enable */
emilmont 77:869cf507173a 3791 #define RCC_CIR_HSERDYIE ((uint32_t)0x00000800) /*!< HSE Ready Interrupt Enable */
emilmont 77:869cf507173a 3792 #define RCC_CIR_PLLRDYIE ((uint32_t)0x00001000) /*!< PLL Ready Interrupt Enable */
emilmont 77:869cf507173a 3793 #define RCC_CIR_HSI14RDYIE ((uint32_t)0x00002000) /*!< HSI14 Ready Interrupt Enable */
emilmont 77:869cf507173a 3794 #define RCC_CIR_HSI48RDYIE ((uint32_t)0x00004000) /*!< HSI48 Ready Interrupt Enable */
emilmont 77:869cf507173a 3795 #define RCC_CIR_LSIRDYC ((uint32_t)0x00010000) /*!< LSI Ready Interrupt Clear */
emilmont 77:869cf507173a 3796 #define RCC_CIR_LSERDYC ((uint32_t)0x00020000) /*!< LSE Ready Interrupt Clear */
emilmont 77:869cf507173a 3797 #define RCC_CIR_HSIRDYC ((uint32_t)0x00040000) /*!< HSI Ready Interrupt Clear */
emilmont 77:869cf507173a 3798 #define RCC_CIR_HSERDYC ((uint32_t)0x00080000) /*!< HSE Ready Interrupt Clear */
emilmont 77:869cf507173a 3799 #define RCC_CIR_PLLRDYC ((uint32_t)0x00100000) /*!< PLL Ready Interrupt Clear */
emilmont 77:869cf507173a 3800 #define RCC_CIR_HSI14RDYC ((uint32_t)0x00200000) /*!< HSI14 Ready Interrupt Clear */
emilmont 77:869cf507173a 3801 #define RCC_CIR_HSI48RDYC ((uint32_t)0x00400000) /*!< HSI48 Ready Interrupt Clear */
emilmont 77:869cf507173a 3802 #define RCC_CIR_CSSC ((uint32_t)0x00800000) /*!< Clock Security System Interrupt Clear */
emilmont 77:869cf507173a 3803
emilmont 77:869cf507173a 3804 /***************** Bit definition for RCC_APB2RSTR register *****************/
emilmont 77:869cf507173a 3805 #define RCC_APB2RSTR_SYSCFGRST ((uint32_t)0x00000001) /*!< SYSCFG clock reset */
emilmont 77:869cf507173a 3806 #define RCC_APB2RSTR_ADCRST ((uint32_t)0x00000200) /*!< ADC clock reset */
emilmont 77:869cf507173a 3807 #define RCC_APB2RSTR_TIM1RST ((uint32_t)0x00000800) /*!< TIM1 clock reset */
emilmont 77:869cf507173a 3808 #define RCC_APB2RSTR_SPI1RST ((uint32_t)0x00001000) /*!< SPI1 clock reset */
emilmont 77:869cf507173a 3809 #define RCC_APB2RSTR_USART1RST ((uint32_t)0x00004000) /*!< USART1 clock reset */
emilmont 77:869cf507173a 3810 #define RCC_APB2RSTR_TIM15RST ((uint32_t)0x00010000) /*!< TIM15 clock reset */
emilmont 77:869cf507173a 3811 #define RCC_APB2RSTR_TIM16RST ((uint32_t)0x00020000) /*!< TIM16 clock reset */
emilmont 77:869cf507173a 3812 #define RCC_APB2RSTR_TIM17RST ((uint32_t)0x00040000) /*!< TIM17 clock reset */
emilmont 77:869cf507173a 3813 #define RCC_APB2RSTR_DBGMCURST ((uint32_t)0x00400000) /*!< DBGMCU clock reset */
emilmont 77:869cf507173a 3814
emilmont 77:869cf507173a 3815 /* Old ADC1 clock reset bit definition maintained for legacy purpose */
emilmont 77:869cf507173a 3816 #define RCC_APB2RSTR_ADC1RST RCC_APB2RSTR_ADCRST
emilmont 77:869cf507173a 3817
emilmont 77:869cf507173a 3818 /***************** Bit definition for RCC_APB1RSTR register *****************/
emilmont 77:869cf507173a 3819 #define RCC_APB1RSTR_TIM2RST ((uint32_t)0x00000001) /*!< Timer 2 clock reset */
emilmont 77:869cf507173a 3820 #define RCC_APB1RSTR_TIM3RST ((uint32_t)0x00000002) /*!< Timer 3 clock reset */
emilmont 77:869cf507173a 3821 #define RCC_APB1RSTR_TIM6RST ((uint32_t)0x00000010) /*!< Timer 6 clock reset */
emilmont 77:869cf507173a 3822 #define RCC_APB1RSTR_TIM7RST ((uint32_t)0x00000020) /*!< Timer 7 clock reset */
emilmont 77:869cf507173a 3823 #define RCC_APB1RSTR_TIM14RST ((uint32_t)0x00000100) /*!< Timer 14 clock reset */
emilmont 77:869cf507173a 3824 #define RCC_APB1RSTR_WWDGRST ((uint32_t)0x00000800) /*!< Window Watchdog clock reset */
emilmont 77:869cf507173a 3825 #define RCC_APB1RSTR_SPI2RST ((uint32_t)0x00004000) /*!< SPI2 clock reset */
emilmont 77:869cf507173a 3826 #define RCC_APB1RSTR_USART2RST ((uint32_t)0x00020000) /*!< USART 2 clock reset */
emilmont 77:869cf507173a 3827 #define RCC_APB1RSTR_USART3RST ((uint32_t)0x00040000) /*!< USART 3 clock reset */
emilmont 77:869cf507173a 3828 #define RCC_APB1RSTR_USART4RST ((uint32_t)0x00080000) /*!< USART 4 clock reset */
emilmont 77:869cf507173a 3829 #define RCC_APB1RSTR_I2C1RST ((uint32_t)0x00200000) /*!< I2C 1 clock reset */
emilmont 77:869cf507173a 3830 #define RCC_APB1RSTR_I2C2RST ((uint32_t)0x00400000) /*!< I2C 2 clock reset */
emilmont 77:869cf507173a 3831 #define RCC_APB1RSTR_USBRST ((uint32_t)0x00800000) /*!< USB clock reset */
emilmont 77:869cf507173a 3832 #define RCC_APB1RSTR_CANRST ((uint32_t)0x02000000) /*!< CAN clock reset */
emilmont 77:869cf507173a 3833 #define RCC_APB1RSTR_CRSRST ((uint32_t)0x08000000) /*!< CRS clock reset */
emilmont 77:869cf507173a 3834 #define RCC_APB1RSTR_PWRRST ((uint32_t)0x10000000) /*!< PWR clock reset */
emilmont 77:869cf507173a 3835 #define RCC_APB1RSTR_DACRST ((uint32_t)0x20000000) /*!< DAC clock reset */
emilmont 77:869cf507173a 3836 #define RCC_APB1RSTR_CECRST ((uint32_t)0x40000000) /*!< CEC clock reset */
emilmont 77:869cf507173a 3837
emilmont 77:869cf507173a 3838 /****************** Bit definition for RCC_AHBENR register ******************/
emilmont 77:869cf507173a 3839 #define RCC_AHBENR_DMAEN ((uint32_t)0x00000001) /*!< DMA clock enable */
emilmont 77:869cf507173a 3840 #define RCC_AHBENR_SRAMEN ((uint32_t)0x00000004) /*!< SRAM interface clock enable */
emilmont 77:869cf507173a 3841 #define RCC_AHBENR_FLITFEN ((uint32_t)0x00000010) /*!< FLITF clock enable */
emilmont 77:869cf507173a 3842 #define RCC_AHBENR_CRCEN ((uint32_t)0x00000040) /*!< CRC clock enable */
emilmont 77:869cf507173a 3843 #define RCC_AHBENR_GPIOAEN ((uint32_t)0x00020000) /*!< GPIOA clock enable */
emilmont 77:869cf507173a 3844 #define RCC_AHBENR_GPIOBEN ((uint32_t)0x00040000) /*!< GPIOB clock enable */
emilmont 77:869cf507173a 3845 #define RCC_AHBENR_GPIOCEN ((uint32_t)0x00080000) /*!< GPIOC clock enable */
emilmont 77:869cf507173a 3846 #define RCC_AHBENR_GPIODEN ((uint32_t)0x00100000) /*!< GPIOD clock enable */
emilmont 77:869cf507173a 3847 #define RCC_AHBENR_GPIOEEN ((uint32_t)0x00200000) /*!< GPIOE clock enable */
emilmont 77:869cf507173a 3848 #define RCC_AHBENR_GPIOFEN ((uint32_t)0x00400000) /*!< GPIOF clock enable */
emilmont 77:869cf507173a 3849 #define RCC_AHBENR_TSCEN ((uint32_t)0x01000000) /*!< TS controller clock enable */
emilmont 77:869cf507173a 3850
emilmont 77:869cf507173a 3851 /* Old Bit definition maintained for legacy purpose */
emilmont 77:869cf507173a 3852 #define RCC_AHBENR_DMA1EN RCC_AHBENR_DMAEN /*!< DMA1 clock enable */
emilmont 77:869cf507173a 3853 #define RCC_AHBENR_TSEN RCC_AHBENR_TSCEN /*!< TS clock enable */
emilmont 77:869cf507173a 3854
emilmont 77:869cf507173a 3855 /***************** Bit definition for RCC_APB2ENR register ******************/
emilmont 77:869cf507173a 3856 #define RCC_APB2ENR_SYSCFGCOMPEN ((uint32_t)0x00000001) /*!< SYSCFG and comparator clock enable */
emilmont 77:869cf507173a 3857 #define RCC_APB2ENR_ADCEN ((uint32_t)0x00000200) /*!< ADC1 clock enable */
emilmont 77:869cf507173a 3858 #define RCC_APB2ENR_TIM1EN ((uint32_t)0x00000800) /*!< TIM1 clock enable */
emilmont 77:869cf507173a 3859 #define RCC_APB2ENR_SPI1EN ((uint32_t)0x00001000) /*!< SPI1 clock enable */
emilmont 77:869cf507173a 3860 #define RCC_APB2ENR_USART1EN ((uint32_t)0x00004000) /*!< USART1 clock enable */
emilmont 77:869cf507173a 3861 #define RCC_APB2ENR_TIM15EN ((uint32_t)0x00010000) /*!< TIM15 clock enable */
emilmont 77:869cf507173a 3862 #define RCC_APB2ENR_TIM16EN ((uint32_t)0x00020000) /*!< TIM16 clock enable */
emilmont 77:869cf507173a 3863 #define RCC_APB2ENR_TIM17EN ((uint32_t)0x00040000) /*!< TIM17 clock enable */
emilmont 77:869cf507173a 3864 #define RCC_APB2ENR_DBGMCUEN ((uint32_t)0x00400000) /*!< DBGMCU clock enable */
emilmont 77:869cf507173a 3865
emilmont 77:869cf507173a 3866 /* Old Bit definition maintained for legacy purpose */
emilmont 77:869cf507173a 3867 #define RCC_APB2ENR_SYSCFGEN RCC_APB2ENR_SYSCFGCOMPEN /*!< SYSCFG clock enable */
emilmont 77:869cf507173a 3868 #define RCC_APB2ENR_ADC1EN RCC_APB2ENR_ADCEN /*!< ADC1 clock enable */
emilmont 77:869cf507173a 3869
emilmont 77:869cf507173a 3870 /***************** Bit definition for RCC_APB1ENR register ******************/
emilmont 77:869cf507173a 3871 #define RCC_APB1ENR_TIM2EN ((uint32_t)0x00000001) /*!< Timer 2 clock enable */
emilmont 77:869cf507173a 3872 #define RCC_APB1ENR_TIM3EN ((uint32_t)0x00000002) /*!< Timer 3 clock enable */
emilmont 77:869cf507173a 3873 #define RCC_APB1ENR_TIM6EN ((uint32_t)0x00000010) /*!< Timer 6 clock enable */
emilmont 77:869cf507173a 3874 #define RCC_APB1ENR_TIM7EN ((uint32_t)0x00000020) /*!< Timer 7 clock enable */
emilmont 77:869cf507173a 3875 #define RCC_APB1ENR_TIM14EN ((uint32_t)0x00000100) /*!< Timer 14 clock enable */
emilmont 77:869cf507173a 3876 #define RCC_APB1ENR_WWDGEN ((uint32_t)0x00000800) /*!< Window Watchdog clock enable */
emilmont 77:869cf507173a 3877 #define RCC_APB1ENR_SPI2EN ((uint32_t)0x00004000) /*!< SPI2 clock enable */
emilmont 77:869cf507173a 3878 #define RCC_APB1ENR_USART2EN ((uint32_t)0x00020000) /*!< USART2 clock enable */
emilmont 77:869cf507173a 3879 #define RCC_APB1ENR_USART3EN ((uint32_t)0x00040000) /*!< USART3 clock enable */
emilmont 77:869cf507173a 3880 #define RCC_APB1ENR_USART4EN ((uint32_t)0x00080000) /*!< USART4 clock enable */
emilmont 77:869cf507173a 3881 #define RCC_APB1ENR_I2C1EN ((uint32_t)0x00200000) /*!< I2C1 clock enable */
emilmont 77:869cf507173a 3882 #define RCC_APB1ENR_I2C2EN ((uint32_t)0x00400000) /*!< I2C2 clock enable */
emilmont 77:869cf507173a 3883 #define RCC_APB1ENR_USBEN ((uint32_t)0x00800000) /*!< USB clock enable */
emilmont 77:869cf507173a 3884 #define RCC_APB1ENR_CANEN ((uint32_t)0x02000000) /*!< CAN clock enable */
emilmont 77:869cf507173a 3885 #define RCC_APB1ENR_CRSEN ((uint32_t)0x08000000) /*!< CRS clock enable */
emilmont 77:869cf507173a 3886 #define RCC_APB1ENR_PWREN ((uint32_t)0x10000000) /*!< PWR clock enable */
emilmont 77:869cf507173a 3887 #define RCC_APB1ENR_DACEN ((uint32_t)0x20000000) /*!< DAC clock enable */
emilmont 77:869cf507173a 3888 #define RCC_APB1ENR_CECEN ((uint32_t)0x40000000) /*!< CEC clock enable */
emilmont 77:869cf507173a 3889
emilmont 77:869cf507173a 3890 /******************* Bit definition for RCC_BDCR register *******************/
emilmont 77:869cf507173a 3891 #define RCC_BDCR_LSEON ((uint32_t)0x00000001) /*!< External Low Speed oscillator enable */
emilmont 77:869cf507173a 3892 #define RCC_BDCR_LSERDY ((uint32_t)0x00000002) /*!< External Low Speed oscillator Ready */
emilmont 77:869cf507173a 3893 #define RCC_BDCR_LSEBYP ((uint32_t)0x00000004) /*!< External Low Speed oscillator Bypass */
emilmont 77:869cf507173a 3894
emilmont 77:869cf507173a 3895 #define RCC_BDCR_LSEDRV ((uint32_t)0x00000018) /*!< LSEDRV[1:0] bits (LSE Osc. drive capability) */
emilmont 77:869cf507173a 3896 #define RCC_BDCR_LSEDRV_0 ((uint32_t)0x00000008) /*!< Bit 0 */
emilmont 77:869cf507173a 3897 #define RCC_BDCR_LSEDRV_1 ((uint32_t)0x00000010) /*!< Bit 1 */
emilmont 77:869cf507173a 3898
emilmont 77:869cf507173a 3899 #define RCC_BDCR_RTCSEL ((uint32_t)0x00000300) /*!< RTCSEL[1:0] bits (RTC clock source selection) */
emilmont 77:869cf507173a 3900 #define RCC_BDCR_RTCSEL_0 ((uint32_t)0x00000100) /*!< Bit 0 */
emilmont 77:869cf507173a 3901 #define RCC_BDCR_RTCSEL_1 ((uint32_t)0x00000200) /*!< Bit 1 */
emilmont 77:869cf507173a 3902
emilmont 77:869cf507173a 3903 /* RTC configuration */
emilmont 77:869cf507173a 3904 #define RCC_BDCR_RTCSEL_NOCLOCK ((uint32_t)0x00000000) /*!< No clock */
emilmont 77:869cf507173a 3905 #define RCC_BDCR_RTCSEL_LSE ((uint32_t)0x00000100) /*!< LSE oscillator clock used as RTC clock */
emilmont 77:869cf507173a 3906 #define RCC_BDCR_RTCSEL_LSI ((uint32_t)0x00000200) /*!< LSI oscillator clock used as RTC clock */
emilmont 77:869cf507173a 3907 #define RCC_BDCR_RTCSEL_HSE ((uint32_t)0x00000300) /*!< HSE oscillator clock divided by 32 used as RTC clock */
emilmont 77:869cf507173a 3908
emilmont 77:869cf507173a 3909 #define RCC_BDCR_RTCEN ((uint32_t)0x00008000) /*!< RTC clock enable */
emilmont 77:869cf507173a 3910 #define RCC_BDCR_BDRST ((uint32_t)0x00010000) /*!< Backup domain software reset */
emilmont 77:869cf507173a 3911
emilmont 77:869cf507173a 3912 /******************* Bit definition for RCC_CSR register ********************/
emilmont 77:869cf507173a 3913 #define RCC_CSR_LSION ((uint32_t)0x00000001) /*!< Internal Low Speed oscillator enable */
emilmont 77:869cf507173a 3914 #define RCC_CSR_LSIRDY ((uint32_t)0x00000002) /*!< Internal Low Speed oscillator Ready */
emilmont 77:869cf507173a 3915 #define RCC_CSR_V18PWRRSTF ((uint32_t)0x00800000) /*!< V1.8 power domain reset flag */
emilmont 77:869cf507173a 3916 #define RCC_CSR_RMVF ((uint32_t)0x01000000) /*!< Remove reset flag */
emilmont 77:869cf507173a 3917 #define RCC_CSR_OBLRSTF ((uint32_t)0x02000000) /*!< OBL reset flag */
emilmont 77:869cf507173a 3918 #define RCC_CSR_PINRSTF ((uint32_t)0x04000000) /*!< PIN reset flag */
emilmont 77:869cf507173a 3919 #define RCC_CSR_PORRSTF ((uint32_t)0x08000000) /*!< POR/PDR reset flag */
emilmont 77:869cf507173a 3920 #define RCC_CSR_SFTRSTF ((uint32_t)0x10000000) /*!< Software Reset flag */
emilmont 77:869cf507173a 3921 #define RCC_CSR_IWDGRSTF ((uint32_t)0x20000000) /*!< Independent Watchdog reset flag */
emilmont 77:869cf507173a 3922 #define RCC_CSR_WWDGRSTF ((uint32_t)0x40000000) /*!< Window watchdog reset flag */
emilmont 77:869cf507173a 3923 #define RCC_CSR_LPWRRSTF ((uint32_t)0x80000000) /*!< Low-Power reset flag */
emilmont 77:869cf507173a 3924
emilmont 77:869cf507173a 3925 /* Old Bit definition maintained for legacy purpose */
emilmont 77:869cf507173a 3926 #define RCC_CSR_OBL RCC_CSR_OBLRSTF /*!< OBL reset flag */
emilmont 77:869cf507173a 3927 /******************* Bit definition for RCC_AHBRSTR register ****************/
emilmont 77:869cf507173a 3928 #define RCC_AHBRSTR_GPIOARST ((uint32_t)0x00020000) /*!< GPIOA clock reset */
emilmont 77:869cf507173a 3929 #define RCC_AHBRSTR_GPIOBRST ((uint32_t)0x00040000) /*!< GPIOB clock reset */
emilmont 77:869cf507173a 3930 #define RCC_AHBRSTR_GPIOCRST ((uint32_t)0x00080000) /*!< GPIOC clock reset */
emilmont 77:869cf507173a 3931 #define RCC_AHBRSTR_GPIODRST ((uint32_t)0x00010000) /*!< GPIOD clock reset */
emilmont 77:869cf507173a 3932 #define RCC_AHBRSTR_GPIOERST ((uint32_t)0x00020000) /*!< GPIOE clock reset */
emilmont 77:869cf507173a 3933 #define RCC_AHBRSTR_GPIOFRST ((uint32_t)0x00040000) /*!< GPIOF clock reset */
emilmont 77:869cf507173a 3934 #define RCC_AHBRSTR_TSCRST ((uint32_t)0x00100000) /*!< TS clock reset */
emilmont 77:869cf507173a 3935
emilmont 77:869cf507173a 3936 /* Old Bit definition maintained for legacy purpose */
emilmont 77:869cf507173a 3937 #define RCC_AHBRSTR_TSRST RCC_AHBRSTR_TSCRST /*!< TS clock reset */
emilmont 77:869cf507173a 3938
emilmont 77:869cf507173a 3939 /******************* Bit definition for RCC_CFGR2 register ******************/
emilmont 77:869cf507173a 3940 /* PREDIV1 configuration */
emilmont 77:869cf507173a 3941 #define RCC_CFGR2_PREDIV1 ((uint32_t)0x0000000F) /*!< PREDIV1[3:0] bits */
emilmont 77:869cf507173a 3942 #define RCC_CFGR2_PREDIV1_0 ((uint32_t)0x00000001) /*!< Bit 0 */
emilmont 77:869cf507173a 3943 #define RCC_CFGR2_PREDIV1_1 ((uint32_t)0x00000002) /*!< Bit 1 */
emilmont 77:869cf507173a 3944 #define RCC_CFGR2_PREDIV1_2 ((uint32_t)0x00000004) /*!< Bit 2 */
emilmont 77:869cf507173a 3945 #define RCC_CFGR2_PREDIV1_3 ((uint32_t)0x00000008) /*!< Bit 3 */
emilmont 77:869cf507173a 3946
emilmont 77:869cf507173a 3947 #define RCC_CFGR2_PREDIV1_DIV1 ((uint32_t)0x00000000) /*!< PREDIV1 input clock not divided */
emilmont 77:869cf507173a 3948 #define RCC_CFGR2_PREDIV1_DIV2 ((uint32_t)0x00000001) /*!< PREDIV1 input clock divided by 2 */
emilmont 77:869cf507173a 3949 #define RCC_CFGR2_PREDIV1_DIV3 ((uint32_t)0x00000002) /*!< PREDIV1 input clock divided by 3 */
emilmont 77:869cf507173a 3950 #define RCC_CFGR2_PREDIV1_DIV4 ((uint32_t)0x00000003) /*!< PREDIV1 input clock divided by 4 */
emilmont 77:869cf507173a 3951 #define RCC_CFGR2_PREDIV1_DIV5 ((uint32_t)0x00000004) /*!< PREDIV1 input clock divided by 5 */
emilmont 77:869cf507173a 3952 #define RCC_CFGR2_PREDIV1_DIV6 ((uint32_t)0x00000005) /*!< PREDIV1 input clock divided by 6 */
emilmont 77:869cf507173a 3953 #define RCC_CFGR2_PREDIV1_DIV7 ((uint32_t)0x00000006) /*!< PREDIV1 input clock divided by 7 */
emilmont 77:869cf507173a 3954 #define RCC_CFGR2_PREDIV1_DIV8 ((uint32_t)0x00000007) /*!< PREDIV1 input clock divided by 8 */
emilmont 77:869cf507173a 3955 #define RCC_CFGR2_PREDIV1_DIV9 ((uint32_t)0x00000008) /*!< PREDIV1 input clock divided by 9 */
emilmont 77:869cf507173a 3956 #define RCC_CFGR2_PREDIV1_DIV10 ((uint32_t)0x00000009) /*!< PREDIV1 input clock divided by 10 */
emilmont 77:869cf507173a 3957 #define RCC_CFGR2_PREDIV1_DIV11 ((uint32_t)0x0000000A) /*!< PREDIV1 input clock divided by 11 */
emilmont 77:869cf507173a 3958 #define RCC_CFGR2_PREDIV1_DIV12 ((uint32_t)0x0000000B) /*!< PREDIV1 input clock divided by 12 */
emilmont 77:869cf507173a 3959 #define RCC_CFGR2_PREDIV1_DIV13 ((uint32_t)0x0000000C) /*!< PREDIV1 input clock divided by 13 */
emilmont 77:869cf507173a 3960 #define RCC_CFGR2_PREDIV1_DIV14 ((uint32_t)0x0000000D) /*!< PREDIV1 input clock divided by 14 */
emilmont 77:869cf507173a 3961 #define RCC_CFGR2_PREDIV1_DIV15 ((uint32_t)0x0000000E) /*!< PREDIV1 input clock divided by 15 */
emilmont 77:869cf507173a 3962 #define RCC_CFGR2_PREDIV1_DIV16 ((uint32_t)0x0000000F) /*!< PREDIV1 input clock divided by 16 */
emilmont 77:869cf507173a 3963
emilmont 77:869cf507173a 3964 /******************* Bit definition for RCC_CFGR3 register ******************/
emilmont 77:869cf507173a 3965 #define RCC_CFGR3_USART1SW ((uint32_t)0x00000003) /*!< USART1SW[1:0] bits */
emilmont 77:869cf507173a 3966 #define RCC_CFGR3_USART1SW_0 ((uint32_t)0x00000001) /*!< Bit 0 */
emilmont 77:869cf507173a 3967 #define RCC_CFGR3_USART1SW_1 ((uint32_t)0x00000002) /*!< Bit 1 */
emilmont 77:869cf507173a 3968 #define RCC_CFGR3_I2C1SW ((uint32_t)0x00000010) /*!< I2C1SW bits */
emilmont 77:869cf507173a 3969 #define RCC_CFGR3_CECSW ((uint32_t)0x00000040) /*!< CECSW bits */
emilmont 77:869cf507173a 3970 #define RCC_CFGR3_USBSW ((uint32_t)0x00000080) /*!< USBSW bits */
emilmont 77:869cf507173a 3971 #define RCC_CFGR3_ADCSW ((uint32_t)0x00000100) /*!< ADCSW bits */
emilmont 77:869cf507173a 3972 #define RCC_CFGR3_USART2SW ((uint32_t)0x00030000) /*!< USART2SW[1:0] bits */
emilmont 77:869cf507173a 3973 #define RCC_CFGR3_USART2SW_0 ((uint32_t)0x00010000) /*!< Bit 0 */
emilmont 77:869cf507173a 3974 #define RCC_CFGR3_USART2SW_1 ((uint32_t)0x00020000) /*!< Bit 1 */
emilmont 77:869cf507173a 3975
emilmont 77:869cf507173a 3976 /******************* Bit definition for RCC_CR2 register ********************/
emilmont 77:869cf507173a 3977 #define RCC_CR2_HSI14ON ((uint32_t)0x00000001) /*!< Internal High Speed 14MHz clock enable */
emilmont 77:869cf507173a 3978 #define RCC_CR2_HSI14RDY ((uint32_t)0x00000002) /*!< Internal High Speed 14MHz clock ready flag */
emilmont 77:869cf507173a 3979 #define RCC_CR2_HSI14DIS ((uint32_t)0x00000004) /*!< Internal High Speed 14MHz clock disable */
emilmont 77:869cf507173a 3980 #define RCC_CR2_HSI14TRIM ((uint32_t)0x000000F8) /*!< Internal High Speed 14MHz clock trimming */
emilmont 77:869cf507173a 3981 #define RCC_CR2_HSI14CAL ((uint32_t)0x0000FF00) /*!< Internal High Speed 14MHz clock Calibration */
emilmont 77:869cf507173a 3982 #define RCC_CR2_HSI48ON ((uint32_t)0x00010000) /*!< Internal High Speed 48MHz clock enable */
emilmont 77:869cf507173a 3983 #define RCC_CR2_HSI48RDY ((uint32_t)0x00020000) /*!< Internal High Speed 48MHz clock ready flag */
emilmont 77:869cf507173a 3984 #define RCC_CR2_HSI48CAL ((uint32_t)0xFF000000) /*!< Internal High Speed 48MHz clock Calibration */
emilmont 77:869cf507173a 3985
emilmont 77:869cf507173a 3986 /******************************************************************************/
emilmont 77:869cf507173a 3987 /* */
emilmont 77:869cf507173a 3988 /* Real-Time Clock (RTC) */
emilmont 77:869cf507173a 3989 /* */
emilmont 77:869cf507173a 3990 /******************************************************************************/
emilmont 77:869cf507173a 3991 /******************** Bits definition for RTC_TR register *******************/
emilmont 77:869cf507173a 3992 #define RTC_TR_PM ((uint32_t)0x00400000)
emilmont 77:869cf507173a 3993 #define RTC_TR_HT ((uint32_t)0x00300000)
emilmont 77:869cf507173a 3994 #define RTC_TR_HT_0 ((uint32_t)0x00100000)
emilmont 77:869cf507173a 3995 #define RTC_TR_HT_1 ((uint32_t)0x00200000)
emilmont 77:869cf507173a 3996 #define RTC_TR_HU ((uint32_t)0x000F0000)
emilmont 77:869cf507173a 3997 #define RTC_TR_HU_0 ((uint32_t)0x00010000)
emilmont 77:869cf507173a 3998 #define RTC_TR_HU_1 ((uint32_t)0x00020000)
emilmont 77:869cf507173a 3999 #define RTC_TR_HU_2 ((uint32_t)0x00040000)
emilmont 77:869cf507173a 4000 #define RTC_TR_HU_3 ((uint32_t)0x00080000)
emilmont 77:869cf507173a 4001 #define RTC_TR_MNT ((uint32_t)0x00007000)
emilmont 77:869cf507173a 4002 #define RTC_TR_MNT_0 ((uint32_t)0x00001000)
emilmont 77:869cf507173a 4003 #define RTC_TR_MNT_1 ((uint32_t)0x00002000)
emilmont 77:869cf507173a 4004 #define RTC_TR_MNT_2 ((uint32_t)0x00004000)
emilmont 77:869cf507173a 4005 #define RTC_TR_MNU ((uint32_t)0x00000F00)
emilmont 77:869cf507173a 4006 #define RTC_TR_MNU_0 ((uint32_t)0x00000100)
emilmont 77:869cf507173a 4007 #define RTC_TR_MNU_1 ((uint32_t)0x00000200)
emilmont 77:869cf507173a 4008 #define RTC_TR_MNU_2 ((uint32_t)0x00000400)
emilmont 77:869cf507173a 4009 #define RTC_TR_MNU_3 ((uint32_t)0x00000800)
emilmont 77:869cf507173a 4010 #define RTC_TR_ST ((uint32_t)0x00000070)
emilmont 77:869cf507173a 4011 #define RTC_TR_ST_0 ((uint32_t)0x00000010)
emilmont 77:869cf507173a 4012 #define RTC_TR_ST_1 ((uint32_t)0x00000020)
emilmont 77:869cf507173a 4013 #define RTC_TR_ST_2 ((uint32_t)0x00000040)
emilmont 77:869cf507173a 4014 #define RTC_TR_SU ((uint32_t)0x0000000F)
emilmont 77:869cf507173a 4015 #define RTC_TR_SU_0 ((uint32_t)0x00000001)
emilmont 77:869cf507173a 4016 #define RTC_TR_SU_1 ((uint32_t)0x00000002)
emilmont 77:869cf507173a 4017 #define RTC_TR_SU_2 ((uint32_t)0x00000004)
emilmont 77:869cf507173a 4018 #define RTC_TR_SU_3 ((uint32_t)0x00000008)
emilmont 77:869cf507173a 4019
emilmont 77:869cf507173a 4020 /******************** Bits definition for RTC_DR register *******************/
emilmont 77:869cf507173a 4021 #define RTC_DR_YT ((uint32_t)0x00F00000)
emilmont 77:869cf507173a 4022 #define RTC_DR_YT_0 ((uint32_t)0x00100000)
emilmont 77:869cf507173a 4023 #define RTC_DR_YT_1 ((uint32_t)0x00200000)
emilmont 77:869cf507173a 4024 #define RTC_DR_YT_2 ((uint32_t)0x00400000)
emilmont 77:869cf507173a 4025 #define RTC_DR_YT_3 ((uint32_t)0x00800000)
emilmont 77:869cf507173a 4026 #define RTC_DR_YU ((uint32_t)0x000F0000)
emilmont 77:869cf507173a 4027 #define RTC_DR_YU_0 ((uint32_t)0x00010000)
emilmont 77:869cf507173a 4028 #define RTC_DR_YU_1 ((uint32_t)0x00020000)
emilmont 77:869cf507173a 4029 #define RTC_DR_YU_2 ((uint32_t)0x00040000)
emilmont 77:869cf507173a 4030 #define RTC_DR_YU_3 ((uint32_t)0x00080000)
emilmont 77:869cf507173a 4031 #define RTC_DR_WDU ((uint32_t)0x0000E000)
emilmont 77:869cf507173a 4032 #define RTC_DR_WDU_0 ((uint32_t)0x00002000)
emilmont 77:869cf507173a 4033 #define RTC_DR_WDU_1 ((uint32_t)0x00004000)
emilmont 77:869cf507173a 4034 #define RTC_DR_WDU_2 ((uint32_t)0x00008000)
emilmont 77:869cf507173a 4035 #define RTC_DR_MT ((uint32_t)0x00001000)
emilmont 77:869cf507173a 4036 #define RTC_DR_MU ((uint32_t)0x00000F00)
emilmont 77:869cf507173a 4037 #define RTC_DR_MU_0 ((uint32_t)0x00000100)
emilmont 77:869cf507173a 4038 #define RTC_DR_MU_1 ((uint32_t)0x00000200)
emilmont 77:869cf507173a 4039 #define RTC_DR_MU_2 ((uint32_t)0x00000400)
emilmont 77:869cf507173a 4040 #define RTC_DR_MU_3 ((uint32_t)0x00000800)
emilmont 77:869cf507173a 4041 #define RTC_DR_DT ((uint32_t)0x00000030)
emilmont 77:869cf507173a 4042 #define RTC_DR_DT_0 ((uint32_t)0x00000010)
emilmont 77:869cf507173a 4043 #define RTC_DR_DT_1 ((uint32_t)0x00000020)
emilmont 77:869cf507173a 4044 #define RTC_DR_DU ((uint32_t)0x0000000F)
emilmont 77:869cf507173a 4045 #define RTC_DR_DU_0 ((uint32_t)0x00000001)
emilmont 77:869cf507173a 4046 #define RTC_DR_DU_1 ((uint32_t)0x00000002)
emilmont 77:869cf507173a 4047 #define RTC_DR_DU_2 ((uint32_t)0x00000004)
emilmont 77:869cf507173a 4048 #define RTC_DR_DU_3 ((uint32_t)0x00000008)
emilmont 77:869cf507173a 4049
emilmont 77:869cf507173a 4050 /******************** Bits definition for RTC_CR register *******************/
emilmont 77:869cf507173a 4051 #define RTC_CR_COE ((uint32_t)0x00800000)
emilmont 77:869cf507173a 4052 #define RTC_CR_OSEL ((uint32_t)0x00600000)
emilmont 77:869cf507173a 4053 #define RTC_CR_OSEL_0 ((uint32_t)0x00200000)
emilmont 77:869cf507173a 4054 #define RTC_CR_OSEL_1 ((uint32_t)0x00400000)
emilmont 77:869cf507173a 4055 #define RTC_CR_POL ((uint32_t)0x00100000)
emilmont 77:869cf507173a 4056 #define RTC_CR_COSEL ((uint32_t)0x00080000)
emilmont 77:869cf507173a 4057 #define RTC_CR_BKP ((uint32_t)0x00040000)
emilmont 77:869cf507173a 4058 #define RTC_CR_SUB1H ((uint32_t)0x00020000)
emilmont 77:869cf507173a 4059 #define RTC_CR_ADD1H ((uint32_t)0x00010000)
emilmont 77:869cf507173a 4060 #define RTC_CR_TSIE ((uint32_t)0x00008000)
emilmont 77:869cf507173a 4061 #define RTC_CR_WUTIE ((uint32_t)0x00004000)
emilmont 77:869cf507173a 4062 #define RTC_CR_ALRAIE ((uint32_t)0x00001000)
emilmont 77:869cf507173a 4063 #define RTC_CR_TSE ((uint32_t)0x00000800)
emilmont 77:869cf507173a 4064 #define RTC_CR_WUTE ((uint32_t)0x00000400)
emilmont 77:869cf507173a 4065 #define RTC_CR_ALRAE ((uint32_t)0x00000100)
emilmont 77:869cf507173a 4066 #define RTC_CR_FMT ((uint32_t)0x00000040)
emilmont 77:869cf507173a 4067 #define RTC_CR_BYPSHAD ((uint32_t)0x00000020)
emilmont 77:869cf507173a 4068 #define RTC_CR_REFCKON ((uint32_t)0x00000010)
emilmont 77:869cf507173a 4069 #define RTC_CR_TSEDGE ((uint32_t)0x00000008)
emilmont 77:869cf507173a 4070 #define RTC_CR_WUCKSEL ((uint32_t)0x00000007)
emilmont 77:869cf507173a 4071 #define RTC_CR_WUCKSEL_0 ((uint32_t)0x00000001)
emilmont 77:869cf507173a 4072 #define RTC_CR_WUCKSEL_1 ((uint32_t)0x00000002)
emilmont 77:869cf507173a 4073 #define RTC_CR_WUCKSEL_2 ((uint32_t)0x00000004)
emilmont 77:869cf507173a 4074
emilmont 77:869cf507173a 4075 /* Old bit definition maintained for legacy purpose */
emilmont 77:869cf507173a 4076 #define RTC_CR_BCK RTC_CR_BKP
emilmont 77:869cf507173a 4077 #define RTC_CR_CALSEL RTC_CR_COSEL
emilmont 77:869cf507173a 4078
emilmont 77:869cf507173a 4079 /******************** Bits definition for RTC_ISR register ******************/
emilmont 77:869cf507173a 4080 #define RTC_ISR_RECALPF ((uint32_t)0x00010000)
emilmont 77:869cf507173a 4081 #define RTC_ISR_TAMP3F ((uint32_t)0x00008000)
emilmont 77:869cf507173a 4082 #define RTC_ISR_TAMP2F ((uint32_t)0x00004000)
emilmont 77:869cf507173a 4083 #define RTC_ISR_TAMP1F ((uint32_t)0x00002000)
emilmont 77:869cf507173a 4084 #define RTC_ISR_TSOVF ((uint32_t)0x00001000)
emilmont 77:869cf507173a 4085 #define RTC_ISR_TSF ((uint32_t)0x00000800)
emilmont 77:869cf507173a 4086 #define RTC_ISR_WUTF ((uint32_t)0x00000400)
emilmont 77:869cf507173a 4087 #define RTC_ISR_ALRAF ((uint32_t)0x00000100)
emilmont 77:869cf507173a 4088 #define RTC_ISR_INIT ((uint32_t)0x00000080)
emilmont 77:869cf507173a 4089 #define RTC_ISR_INITF ((uint32_t)0x00000040)
emilmont 77:869cf507173a 4090 #define RTC_ISR_RSF ((uint32_t)0x00000020)
emilmont 77:869cf507173a 4091 #define RTC_ISR_INITS ((uint32_t)0x00000010)
emilmont 77:869cf507173a 4092 #define RTC_ISR_SHPF ((uint32_t)0x00000008)
emilmont 77:869cf507173a 4093 #define RTC_ISR_WUTWF ((uint32_t)0x00000004)
emilmont 77:869cf507173a 4094 #define RTC_ISR_ALRAWF ((uint32_t)0x00000001)
emilmont 77:869cf507173a 4095
emilmont 77:869cf507173a 4096 /******************** Bits definition for RTC_PRER register *****************/
emilmont 77:869cf507173a 4097 #define RTC_PRER_PREDIV_A ((uint32_t)0x007F0000)
emilmont 77:869cf507173a 4098 #define RTC_PRER_PREDIV_S ((uint32_t)0x00007FFF)
emilmont 77:869cf507173a 4099
emilmont 77:869cf507173a 4100 /******************** Bits definition for RTC_WUTR register *****************/
emilmont 77:869cf507173a 4101 #define RTC_WUTR_WUT ((uint32_t)0x0000FFFF)
emilmont 77:869cf507173a 4102
emilmont 77:869cf507173a 4103 /******************** Bits definition for RTC_ALRMAR register ***************/
emilmont 77:869cf507173a 4104 #define RTC_ALRMAR_MSK4 ((uint32_t)0x80000000)
emilmont 77:869cf507173a 4105 #define RTC_ALRMAR_WDSEL ((uint32_t)0x40000000)
emilmont 77:869cf507173a 4106 #define RTC_ALRMAR_DT ((uint32_t)0x30000000)
emilmont 77:869cf507173a 4107 #define RTC_ALRMAR_DT_0 ((uint32_t)0x10000000)
emilmont 77:869cf507173a 4108 #define RTC_ALRMAR_DT_1 ((uint32_t)0x20000000)
emilmont 77:869cf507173a 4109 #define RTC_ALRMAR_DU ((uint32_t)0x0F000000)
emilmont 77:869cf507173a 4110 #define RTC_ALRMAR_DU_0 ((uint32_t)0x01000000)
emilmont 77:869cf507173a 4111 #define RTC_ALRMAR_DU_1 ((uint32_t)0x02000000)
emilmont 77:869cf507173a 4112 #define RTC_ALRMAR_DU_2 ((uint32_t)0x04000000)
emilmont 77:869cf507173a 4113 #define RTC_ALRMAR_DU_3 ((uint32_t)0x08000000)
emilmont 77:869cf507173a 4114 #define RTC_ALRMAR_MSK3 ((uint32_t)0x00800000)
emilmont 77:869cf507173a 4115 #define RTC_ALRMAR_PM ((uint32_t)0x00400000)
emilmont 77:869cf507173a 4116 #define RTC_ALRMAR_HT ((uint32_t)0x00300000)
emilmont 77:869cf507173a 4117 #define RTC_ALRMAR_HT_0 ((uint32_t)0x00100000)
emilmont 77:869cf507173a 4118 #define RTC_ALRMAR_HT_1 ((uint32_t)0x00200000)
emilmont 77:869cf507173a 4119 #define RTC_ALRMAR_HU ((uint32_t)0x000F0000)
emilmont 77:869cf507173a 4120 #define RTC_ALRMAR_HU_0 ((uint32_t)0x00010000)
emilmont 77:869cf507173a 4121 #define RTC_ALRMAR_HU_1 ((uint32_t)0x00020000)
emilmont 77:869cf507173a 4122 #define RTC_ALRMAR_HU_2 ((uint32_t)0x00040000)
emilmont 77:869cf507173a 4123 #define RTC_ALRMAR_HU_3 ((uint32_t)0x00080000)
emilmont 77:869cf507173a 4124 #define RTC_ALRMAR_MSK2 ((uint32_t)0x00008000)
emilmont 77:869cf507173a 4125 #define RTC_ALRMAR_MNT ((uint32_t)0x00007000)
emilmont 77:869cf507173a 4126 #define RTC_ALRMAR_MNT_0 ((uint32_t)0x00001000)
emilmont 77:869cf507173a 4127 #define RTC_ALRMAR_MNT_1 ((uint32_t)0x00002000)
emilmont 77:869cf507173a 4128 #define RTC_ALRMAR_MNT_2 ((uint32_t)0x00004000)
emilmont 77:869cf507173a 4129 #define RTC_ALRMAR_MNU ((uint32_t)0x00000F00)
emilmont 77:869cf507173a 4130 #define RTC_ALRMAR_MNU_0 ((uint32_t)0x00000100)
emilmont 77:869cf507173a 4131 #define RTC_ALRMAR_MNU_1 ((uint32_t)0x00000200)
emilmont 77:869cf507173a 4132 #define RTC_ALRMAR_MNU_2 ((uint32_t)0x00000400)
emilmont 77:869cf507173a 4133 #define RTC_ALRMAR_MNU_3 ((uint32_t)0x00000800)
emilmont 77:869cf507173a 4134 #define RTC_ALRMAR_MSK1 ((uint32_t)0x00000080)
emilmont 77:869cf507173a 4135 #define RTC_ALRMAR_ST ((uint32_t)0x00000070)
emilmont 77:869cf507173a 4136 #define RTC_ALRMAR_ST_0 ((uint32_t)0x00000010)
emilmont 77:869cf507173a 4137 #define RTC_ALRMAR_ST_1 ((uint32_t)0x00000020)
emilmont 77:869cf507173a 4138 #define RTC_ALRMAR_ST_2 ((uint32_t)0x00000040)
emilmont 77:869cf507173a 4139 #define RTC_ALRMAR_SU ((uint32_t)0x0000000F)
emilmont 77:869cf507173a 4140 #define RTC_ALRMAR_SU_0 ((uint32_t)0x00000001)
emilmont 77:869cf507173a 4141 #define RTC_ALRMAR_SU_1 ((uint32_t)0x00000002)
emilmont 77:869cf507173a 4142 #define RTC_ALRMAR_SU_2 ((uint32_t)0x00000004)
emilmont 77:869cf507173a 4143 #define RTC_ALRMAR_SU_3 ((uint32_t)0x00000008)
emilmont 77:869cf507173a 4144
emilmont 77:869cf507173a 4145 /******************** Bits definition for RTC_WPR register ******************/
emilmont 77:869cf507173a 4146 #define RTC_WPR_KEY ((uint32_t)0x000000FF)
emilmont 77:869cf507173a 4147
emilmont 77:869cf507173a 4148 /******************** Bits definition for RTC_SSR register ******************/
emilmont 77:869cf507173a 4149 #define RTC_SSR_SS ((uint32_t)0x0003FFFF)
emilmont 77:869cf507173a 4150
emilmont 77:869cf507173a 4151 /******************** Bits definition for RTC_SHIFTR register ***************/
emilmont 77:869cf507173a 4152 #define RTC_SHIFTR_SUBFS ((uint32_t)0x00007FFF)
emilmont 77:869cf507173a 4153 #define RTC_SHIFTR_ADD1S ((uint32_t)0x80000000)
emilmont 77:869cf507173a 4154
emilmont 77:869cf507173a 4155 /******************** Bits definition for RTC_TSTR register *****************/
emilmont 77:869cf507173a 4156 #define RTC_TSTR_PM ((uint32_t)0x00400000)
emilmont 77:869cf507173a 4157 #define RTC_TSTR_HT ((uint32_t)0x00300000)
emilmont 77:869cf507173a 4158 #define RTC_TSTR_HT_0 ((uint32_t)0x00100000)
emilmont 77:869cf507173a 4159 #define RTC_TSTR_HT_1 ((uint32_t)0x00200000)
emilmont 77:869cf507173a 4160 #define RTC_TSTR_HU ((uint32_t)0x000F0000)
emilmont 77:869cf507173a 4161 #define RTC_TSTR_HU_0 ((uint32_t)0x00010000)
emilmont 77:869cf507173a 4162 #define RTC_TSTR_HU_1 ((uint32_t)0x00020000)
emilmont 77:869cf507173a 4163 #define RTC_TSTR_HU_2 ((uint32_t)0x00040000)
emilmont 77:869cf507173a 4164 #define RTC_TSTR_HU_3 ((uint32_t)0x00080000)
emilmont 77:869cf507173a 4165 #define RTC_TSTR_MNT ((uint32_t)0x00007000)
emilmont 77:869cf507173a 4166 #define RTC_TSTR_MNT_0 ((uint32_t)0x00001000)
emilmont 77:869cf507173a 4167 #define RTC_TSTR_MNT_1 ((uint32_t)0x00002000)
emilmont 77:869cf507173a 4168 #define RTC_TSTR_MNT_2 ((uint32_t)0x00004000)
emilmont 77:869cf507173a 4169 #define RTC_TSTR_MNU ((uint32_t)0x00000F00)
emilmont 77:869cf507173a 4170 #define RTC_TSTR_MNU_0 ((uint32_t)0x00000100)
emilmont 77:869cf507173a 4171 #define RTC_TSTR_MNU_1 ((uint32_t)0x00000200)
emilmont 77:869cf507173a 4172 #define RTC_TSTR_MNU_2 ((uint32_t)0x00000400)
emilmont 77:869cf507173a 4173 #define RTC_TSTR_MNU_3 ((uint32_t)0x00000800)
emilmont 77:869cf507173a 4174 #define RTC_TSTR_ST ((uint32_t)0x00000070)
emilmont 77:869cf507173a 4175 #define RTC_TSTR_ST_0 ((uint32_t)0x00000010)
emilmont 77:869cf507173a 4176 #define RTC_TSTR_ST_1 ((uint32_t)0x00000020)
emilmont 77:869cf507173a 4177 #define RTC_TSTR_ST_2 ((uint32_t)0x00000040)
emilmont 77:869cf507173a 4178 #define RTC_TSTR_SU ((uint32_t)0x0000000F)
emilmont 77:869cf507173a 4179 #define RTC_TSTR_SU_0 ((uint32_t)0x00000001)
emilmont 77:869cf507173a 4180 #define RTC_TSTR_SU_1 ((uint32_t)0x00000002)
emilmont 77:869cf507173a 4181 #define RTC_TSTR_SU_2 ((uint32_t)0x00000004)
emilmont 77:869cf507173a 4182 #define RTC_TSTR_SU_3 ((uint32_t)0x00000008)
emilmont 77:869cf507173a 4183
emilmont 77:869cf507173a 4184 /******************** Bits definition for RTC_TSDR register *****************/
emilmont 77:869cf507173a 4185 #define RTC_TSDR_WDU ((uint32_t)0x0000E000)
emilmont 77:869cf507173a 4186 #define RTC_TSDR_WDU_0 ((uint32_t)0x00002000)
emilmont 77:869cf507173a 4187 #define RTC_TSDR_WDU_1 ((uint32_t)0x00004000)
emilmont 77:869cf507173a 4188 #define RTC_TSDR_WDU_2 ((uint32_t)0x00008000)
emilmont 77:869cf507173a 4189 #define RTC_TSDR_MT ((uint32_t)0x00001000)
emilmont 77:869cf507173a 4190 #define RTC_TSDR_MU ((uint32_t)0x00000F00)
emilmont 77:869cf507173a 4191 #define RTC_TSDR_MU_0 ((uint32_t)0x00000100)
emilmont 77:869cf507173a 4192 #define RTC_TSDR_MU_1 ((uint32_t)0x00000200)
emilmont 77:869cf507173a 4193 #define RTC_TSDR_MU_2 ((uint32_t)0x00000400)
emilmont 77:869cf507173a 4194 #define RTC_TSDR_MU_3 ((uint32_t)0x00000800)
emilmont 77:869cf507173a 4195 #define RTC_TSDR_DT ((uint32_t)0x00000030)
emilmont 77:869cf507173a 4196 #define RTC_TSDR_DT_0 ((uint32_t)0x00000010)
emilmont 77:869cf507173a 4197 #define RTC_TSDR_DT_1 ((uint32_t)0x00000020)
emilmont 77:869cf507173a 4198 #define RTC_TSDR_DU ((uint32_t)0x0000000F)
emilmont 77:869cf507173a 4199 #define RTC_TSDR_DU_0 ((uint32_t)0x00000001)
emilmont 77:869cf507173a 4200 #define RTC_TSDR_DU_1 ((uint32_t)0x00000002)
emilmont 77:869cf507173a 4201 #define RTC_TSDR_DU_2 ((uint32_t)0x00000004)
emilmont 77:869cf507173a 4202 #define RTC_TSDR_DU_3 ((uint32_t)0x00000008)
emilmont 77:869cf507173a 4203
emilmont 77:869cf507173a 4204 /******************** Bits definition for RTC_TSSSR register ****************/
emilmont 77:869cf507173a 4205 #define RTC_TSSSR_SS ((uint32_t)0x0003FFFF)
emilmont 77:869cf507173a 4206
emilmont 77:869cf507173a 4207 /******************** Bits definition for RTC_CALR register ******************/
emilmont 77:869cf507173a 4208 #define RTC_CALR_CALP ((uint32_t)0x00008000)
emilmont 77:869cf507173a 4209 #define RTC_CALR_CALW8 ((uint32_t)0x00004000)
emilmont 77:869cf507173a 4210 #define RTC_CALR_CALW16 ((uint32_t)0x00002000)
emilmont 77:869cf507173a 4211 #define RTC_CALR_CALM ((uint32_t)0x000001FF)
emilmont 77:869cf507173a 4212 #define RTC_CALR_CALM_0 ((uint32_t)0x00000001)
emilmont 77:869cf507173a 4213 #define RTC_CALR_CALM_1 ((uint32_t)0x00000002)
emilmont 77:869cf507173a 4214 #define RTC_CALR_CALM_2 ((uint32_t)0x00000004)
emilmont 77:869cf507173a 4215 #define RTC_CALR_CALM_3 ((uint32_t)0x00000008)
emilmont 77:869cf507173a 4216 #define RTC_CALR_CALM_4 ((uint32_t)0x00000010)
emilmont 77:869cf507173a 4217 #define RTC_CALR_CALM_5 ((uint32_t)0x00000020)
emilmont 77:869cf507173a 4218 #define RTC_CALR_CALM_6 ((uint32_t)0x00000040)
emilmont 77:869cf507173a 4219 #define RTC_CALR_CALM_7 ((uint32_t)0x00000080)
emilmont 77:869cf507173a 4220 #define RTC_CALR_CALM_8 ((uint32_t)0x00000100)
emilmont 77:869cf507173a 4221
emilmont 77:869cf507173a 4222 /* Old Bits definition for RTC_CAL register maintained for legacy purpose */
emilmont 77:869cf507173a 4223 #define RTC_CAL_CALP RTC_CALR_CALP
emilmont 77:869cf507173a 4224 #define RTC_CAL_CALW8 RTC_CALR_CALW8
emilmont 77:869cf507173a 4225 #define RTC_CAL_CALW16 RTC_CALR_CALW16
emilmont 77:869cf507173a 4226 #define RTC_CAL_CALM RTC_CALR_CALM
emilmont 77:869cf507173a 4227 #define RTC_CAL_CALM_0 RTC_CALR_CALM_0
emilmont 77:869cf507173a 4228 #define RTC_CAL_CALM_1 RTC_CALR_CALM_1
emilmont 77:869cf507173a 4229 #define RTC_CAL_CALM_2 RTC_CALR_CALM_2
emilmont 77:869cf507173a 4230 #define RTC_CAL_CALM_3 RTC_CALR_CALM_3
emilmont 77:869cf507173a 4231 #define RTC_CAL_CALM_4 RTC_CALR_CALM_4
emilmont 77:869cf507173a 4232 #define RTC_CAL_CALM_5 RTC_CALR_CALM_5
emilmont 77:869cf507173a 4233 #define RTC_CAL_CALM_6 RTC_CALR_CALM_6
emilmont 77:869cf507173a 4234 #define RTC_CAL_CALM_7 RTC_CALR_CALM_7
emilmont 77:869cf507173a 4235 #define RTC_CAL_CALM_8 RTC_CALR_CALM_8
emilmont 77:869cf507173a 4236
emilmont 77:869cf507173a 4237 /******************** Bits definition for RTC_TAFCR register ****************/
emilmont 77:869cf507173a 4238 #define RTC_TAFCR_PC15MODE ((uint32_t)0x00800000)
emilmont 77:869cf507173a 4239 #define RTC_TAFCR_PC15VALUE ((uint32_t)0x00400000)
emilmont 77:869cf507173a 4240 #define RTC_TAFCR_PC14MODE ((uint32_t)0x00200000)
emilmont 77:869cf507173a 4241 #define RTC_TAFCR_PC14VALUE ((uint32_t)0x00100000)
emilmont 77:869cf507173a 4242 #define RTC_TAFCR_PC13MODE ((uint32_t)0x00080000)
emilmont 77:869cf507173a 4243 #define RTC_TAFCR_PC13VALUE ((uint32_t)0x00040000)
emilmont 77:869cf507173a 4244 #define RTC_TAFCR_TAMPPUDIS ((uint32_t)0x00008000)
emilmont 77:869cf507173a 4245 #define RTC_TAFCR_TAMPPRCH ((uint32_t)0x00006000)
emilmont 77:869cf507173a 4246 #define RTC_TAFCR_TAMPPRCH_0 ((uint32_t)0x00002000)
emilmont 77:869cf507173a 4247 #define RTC_TAFCR_TAMPPRCH_1 ((uint32_t)0x00004000)
emilmont 77:869cf507173a 4248 #define RTC_TAFCR_TAMPFLT ((uint32_t)0x00001800)
emilmont 77:869cf507173a 4249 #define RTC_TAFCR_TAMPFLT_0 ((uint32_t)0x00000800)
emilmont 77:869cf507173a 4250 #define RTC_TAFCR_TAMPFLT_1 ((uint32_t)0x00001000)
emilmont 77:869cf507173a 4251 #define RTC_TAFCR_TAMPFREQ ((uint32_t)0x00000700)
emilmont 77:869cf507173a 4252 #define RTC_TAFCR_TAMPFREQ_0 ((uint32_t)0x00000100)
emilmont 77:869cf507173a 4253 #define RTC_TAFCR_TAMPFREQ_1 ((uint32_t)0x00000200)
emilmont 77:869cf507173a 4254 #define RTC_TAFCR_TAMPFREQ_2 ((uint32_t)0x00000400)
emilmont 77:869cf507173a 4255 #define RTC_TAFCR_TAMPTS ((uint32_t)0x00000080)
emilmont 77:869cf507173a 4256 #define RTC_TAFCR_TAMP3EDGE ((uint32_t)0x00000040)
emilmont 77:869cf507173a 4257 #define RTC_TAFCR_TAMP3E ((uint32_t)0x00000020)
emilmont 77:869cf507173a 4258 #define RTC_TAFCR_TAMP2EDGE ((uint32_t)0x00000010)
emilmont 77:869cf507173a 4259 #define RTC_TAFCR_TAMP2E ((uint32_t)0x00000008)
emilmont 77:869cf507173a 4260 #define RTC_TAFCR_TAMPIE ((uint32_t)0x00000004)
emilmont 77:869cf507173a 4261 #define RTC_TAFCR_TAMP1TRG ((uint32_t)0x00000002)
emilmont 77:869cf507173a 4262 #define RTC_TAFCR_TAMP1E ((uint32_t)0x00000001)
emilmont 77:869cf507173a 4263
emilmont 77:869cf507173a 4264 /* Old bit definition maintained for legacy purpose */
emilmont 77:869cf507173a 4265 #define RTC_TAFCR_ALARMOUTTYPE RTC_TAFCR_PC13VALUE
emilmont 77:869cf507173a 4266
emilmont 77:869cf507173a 4267 /******************** Bits definition for RTC_ALRMASSR register *************/
emilmont 77:869cf507173a 4268 #define RTC_ALRMASSR_MASKSS ((uint32_t)0x0F000000)
emilmont 77:869cf507173a 4269 #define RTC_ALRMASSR_MASKSS_0 ((uint32_t)0x01000000)
emilmont 77:869cf507173a 4270 #define RTC_ALRMASSR_MASKSS_1 ((uint32_t)0x02000000)
emilmont 77:869cf507173a 4271 #define RTC_ALRMASSR_MASKSS_2 ((uint32_t)0x04000000)
emilmont 77:869cf507173a 4272 #define RTC_ALRMASSR_MASKSS_3 ((uint32_t)0x08000000)
emilmont 77:869cf507173a 4273 #define RTC_ALRMASSR_SS ((uint32_t)0x00007FFF)
emilmont 77:869cf507173a 4274
emilmont 77:869cf507173a 4275 /******************** Bits definition for RTC_BKP0R register ****************/
emilmont 77:869cf507173a 4276 #define RTC_BKP0R ((uint32_t)0xFFFFFFFF)
emilmont 77:869cf507173a 4277
emilmont 77:869cf507173a 4278 /******************** Bits definition for RTC_BKP1R register ****************/
emilmont 77:869cf507173a 4279 #define RTC_BKP1R ((uint32_t)0xFFFFFFFF)
emilmont 77:869cf507173a 4280
emilmont 77:869cf507173a 4281 /******************** Bits definition for RTC_BKP2R register ****************/
emilmont 77:869cf507173a 4282 #define RTC_BKP2R ((uint32_t)0xFFFFFFFF)
emilmont 77:869cf507173a 4283
emilmont 77:869cf507173a 4284 /******************** Bits definition for RTC_BKP3R register ****************/
emilmont 77:869cf507173a 4285 #define RTC_BKP3R ((uint32_t)0xFFFFFFFF)
emilmont 77:869cf507173a 4286
emilmont 77:869cf507173a 4287 /******************** Bits definition for RTC_BKP4R register ****************/
emilmont 77:869cf507173a 4288 #define RTC_BKP4R ((uint32_t)0xFFFFFFFF)
emilmont 77:869cf507173a 4289
emilmont 77:869cf507173a 4290 /******************************************************************************/
emilmont 77:869cf507173a 4291 /* */
emilmont 77:869cf507173a 4292 /* Serial Peripheral Interface (SPI) */
emilmont 77:869cf507173a 4293 /* */
emilmont 77:869cf507173a 4294 /******************************************************************************/
emilmont 77:869cf507173a 4295 /******************* Bit definition for SPI_CR1 register ********************/
emilmont 77:869cf507173a 4296 #define SPI_CR1_CPHA ((uint16_t)0x0001) /*!< Clock Phase */
emilmont 77:869cf507173a 4297 #define SPI_CR1_CPOL ((uint16_t)0x0002) /*!< Clock Polarity */
emilmont 77:869cf507173a 4298 #define SPI_CR1_MSTR ((uint16_t)0x0004) /*!< Master Selection */
emilmont 77:869cf507173a 4299 #define SPI_CR1_BR ((uint16_t)0x0038) /*!< BR[2:0] bits (Baud Rate Control) */
emilmont 77:869cf507173a 4300 #define SPI_CR1_BR_0 ((uint16_t)0x0008) /*!< Bit 0 */
emilmont 77:869cf507173a 4301 #define SPI_CR1_BR_1 ((uint16_t)0x0010) /*!< Bit 1 */
emilmont 77:869cf507173a 4302 #define SPI_CR1_BR_2 ((uint16_t)0x0020) /*!< Bit 2 */
emilmont 77:869cf507173a 4303 #define SPI_CR1_SPE ((uint16_t)0x0040) /*!< SPI Enable */
emilmont 77:869cf507173a 4304 #define SPI_CR1_LSBFIRST ((uint16_t)0x0080) /*!< Frame Format */
emilmont 77:869cf507173a 4305 #define SPI_CR1_SSI ((uint16_t)0x0100) /*!< Internal slave select */
emilmont 77:869cf507173a 4306 #define SPI_CR1_SSM ((uint16_t)0x0200) /*!< Software slave management */
emilmont 77:869cf507173a 4307 #define SPI_CR1_RXONLY ((uint16_t)0x0400) /*!< Receive only */
emilmont 77:869cf507173a 4308 #define SPI_CR1_CRCL ((uint16_t)0x0800) /*!< CRC Length */
emilmont 77:869cf507173a 4309 #define SPI_CR1_CRCNEXT ((uint16_t)0x1000) /*!< Transmit CRC next */
emilmont 77:869cf507173a 4310 #define SPI_CR1_CRCEN ((uint16_t)0x2000) /*!< Hardware CRC calculation enable */
emilmont 77:869cf507173a 4311 #define SPI_CR1_BIDIOE ((uint16_t)0x4000) /*!< Output enable in bidirectional mode */
emilmont 77:869cf507173a 4312 #define SPI_CR1_BIDIMODE ((uint16_t)0x8000) /*!< Bidirectional data mode enable */
emilmont 77:869cf507173a 4313
emilmont 77:869cf507173a 4314 /******************* Bit definition for SPI_CR2 register ********************/
emilmont 77:869cf507173a 4315 #define SPI_CR2_RXDMAEN ((uint16_t)0x0001) /*!< Rx Buffer DMA Enable */
emilmont 77:869cf507173a 4316 #define SPI_CR2_TXDMAEN ((uint16_t)0x0002) /*!< Tx Buffer DMA Enable */
emilmont 77:869cf507173a 4317 #define SPI_CR2_SSOE ((uint16_t)0x0004) /*!< SS Output Enable */
emilmont 77:869cf507173a 4318 #define SPI_CR2_NSSP ((uint16_t)0x0008) /*!< NSS pulse management Enable */
emilmont 77:869cf507173a 4319 #define SPI_CR2_FRF ((uint16_t)0x0010) /*!< Frame Format Enable */
emilmont 77:869cf507173a 4320 #define SPI_CR2_ERRIE ((uint16_t)0x0020) /*!< Error Interrupt Enable */
emilmont 77:869cf507173a 4321 #define SPI_CR2_RXNEIE ((uint16_t)0x0040) /*!< RX buffer Not Empty Interrupt Enable */
emilmont 77:869cf507173a 4322 #define SPI_CR2_TXEIE ((uint16_t)0x0080) /*!< Tx buffer Empty Interrupt Enable */
emilmont 77:869cf507173a 4323 #define SPI_CR2_DS ((uint16_t)0x0F00) /*!< DS[3:0] Data Size */
emilmont 77:869cf507173a 4324 #define SPI_CR2_DS_0 ((uint16_t)0x0100) /*!< Bit 0 */
emilmont 77:869cf507173a 4325 #define SPI_CR2_DS_1 ((uint16_t)0x0200) /*!< Bit 1 */
emilmont 77:869cf507173a 4326 #define SPI_CR2_DS_2 ((uint16_t)0x0400) /*!< Bit 2 */
emilmont 77:869cf507173a 4327 #define SPI_CR2_DS_3 ((uint16_t)0x0800) /*!< Bit 3 */
emilmont 77:869cf507173a 4328 #define SPI_CR2_FRXTH ((uint16_t)0x1000) /*!< FIFO reception Threshold */
emilmont 77:869cf507173a 4329 #define SPI_CR2_LDMARX ((uint16_t)0x2000) /*!< Last DMA transfer for reception */
emilmont 77:869cf507173a 4330 #define SPI_CR2_LDMATX ((uint16_t)0x4000) /*!< Last DMA transfer for transmission */
emilmont 77:869cf507173a 4331
emilmont 77:869cf507173a 4332 /******************** Bit definition for SPI_SR register ********************/
emilmont 77:869cf507173a 4333 #define SPI_SR_RXNE ((uint16_t)0x0001) /*!< Receive buffer Not Empty */
emilmont 77:869cf507173a 4334 #define SPI_SR_TXE ((uint16_t)0x0002) /*!< Transmit buffer Empty */
emilmont 77:869cf507173a 4335 #define SPI_SR_CHSIDE ((uint16_t)0x0004) /*!< Channel side */
emilmont 77:869cf507173a 4336 #define SPI_SR_UDR ((uint16_t)0x0008) /*!< Underrun flag */
emilmont 77:869cf507173a 4337 #define SPI_SR_CRCERR ((uint16_t)0x0010) /*!< CRC Error flag */
emilmont 77:869cf507173a 4338 #define SPI_SR_MODF ((uint16_t)0x0020) /*!< Mode fault */
emilmont 77:869cf507173a 4339 #define SPI_SR_OVR ((uint16_t)0x0040) /*!< Overrun flag */
emilmont 77:869cf507173a 4340 #define SPI_SR_BSY ((uint16_t)0x0080) /*!< Busy flag */
emilmont 77:869cf507173a 4341 #define SPI_SR_FRE ((uint16_t)0x0100) /*!< TI frame format error */
emilmont 77:869cf507173a 4342 #define SPI_SR_FRLVL ((uint16_t)0x0600) /*!< FIFO Reception Level */
emilmont 77:869cf507173a 4343 #define SPI_SR_FRLVL_0 ((uint16_t)0x0200) /*!< Bit 0 */
emilmont 77:869cf507173a 4344 #define SPI_SR_FRLVL_1 ((uint16_t)0x0400) /*!< Bit 1 */
emilmont 77:869cf507173a 4345 #define SPI_SR_FTLVL ((uint16_t)0x1800) /*!< FIFO Transmission Level */
emilmont 77:869cf507173a 4346 #define SPI_SR_FTLVL_0 ((uint16_t)0x0800) /*!< Bit 0 */
emilmont 77:869cf507173a 4347 #define SPI_SR_FTLVL_1 ((uint16_t)0x1000) /*!< Bit 1 */
emilmont 77:869cf507173a 4348
emilmont 77:869cf507173a 4349 /******************** Bit definition for SPI_DR register ********************/
emilmont 77:869cf507173a 4350 #define SPI_DR_DR ((uint16_t)0xFFFF) /*!< Data Register */
emilmont 77:869cf507173a 4351
emilmont 77:869cf507173a 4352 /******************* Bit definition for SPI_CRCPR register ******************/
emilmont 77:869cf507173a 4353 #define SPI_CRCPR_CRCPOLY ((uint16_t)0xFFFF) /*!< CRC polynomial register */
emilmont 77:869cf507173a 4354
emilmont 77:869cf507173a 4355 /****************** Bit definition for SPI_RXCRCR register ******************/
emilmont 77:869cf507173a 4356 #define SPI_RXCRCR_RXCRC ((uint16_t)0xFFFF) /*!< Rx CRC Register */
emilmont 77:869cf507173a 4357
emilmont 77:869cf507173a 4358 /****************** Bit definition for SPI_TXCRCR register ******************/
emilmont 77:869cf507173a 4359 #define SPI_TXCRCR_TXCRC ((uint16_t)0xFFFF) /*!< Tx CRC Register */
emilmont 77:869cf507173a 4360
emilmont 77:869cf507173a 4361 /****************** Bit definition for SPI_I2SCFGR register *****************/
emilmont 77:869cf507173a 4362 #define SPI_I2SCFGR_CHLEN ((uint16_t)0x0001) /*!<Channel length (number of bits per audio channel) */
emilmont 77:869cf507173a 4363 #define SPI_I2SCFGR_DATLEN ((uint16_t)0x0006) /*!<DATLEN[1:0] bits (Data length to be transferred) */
emilmont 77:869cf507173a 4364 #define SPI_I2SCFGR_DATLEN_0 ((uint16_t)0x0002) /*!<Bit 0 */
emilmont 77:869cf507173a 4365 #define SPI_I2SCFGR_DATLEN_1 ((uint16_t)0x0004) /*!<Bit 1 */
emilmont 77:869cf507173a 4366 #define SPI_I2SCFGR_CKPOL ((uint16_t)0x0008) /*!<steady state clock polarity */
emilmont 77:869cf507173a 4367 #define SPI_I2SCFGR_I2SSTD ((uint16_t)0x0030) /*!<I2SSTD[1:0] bits (I2S standard selection) */
emilmont 77:869cf507173a 4368 #define SPI_I2SCFGR_I2SSTD_0 ((uint16_t)0x0010) /*!<Bit 0 */
emilmont 77:869cf507173a 4369 #define SPI_I2SCFGR_I2SSTD_1 ((uint16_t)0x0020) /*!<Bit 1 */
emilmont 77:869cf507173a 4370 #define SPI_I2SCFGR_PCMSYNC ((uint16_t)0x0080) /*!<PCM frame synchronization */
emilmont 77:869cf507173a 4371 #define SPI_I2SCFGR_I2SCFG ((uint16_t)0x0300) /*!<I2SCFG[1:0] bits (I2S configuration mode) */
emilmont 77:869cf507173a 4372 #define SPI_I2SCFGR_I2SCFG_0 ((uint16_t)0x0100) /*!<Bit 0 */
emilmont 77:869cf507173a 4373 #define SPI_I2SCFGR_I2SCFG_1 ((uint16_t)0x0200) /*!<Bit 1 */
emilmont 77:869cf507173a 4374 #define SPI_I2SCFGR_I2SE ((uint16_t)0x0400) /*!<I2S Enable */
emilmont 77:869cf507173a 4375 #define SPI_I2SCFGR_I2SMOD ((uint16_t)0x0800) /*!<I2S mode selection */
emilmont 77:869cf507173a 4376
emilmont 77:869cf507173a 4377 /****************** Bit definition for SPI_I2SPR register *******************/
emilmont 77:869cf507173a 4378 #define SPI_I2SPR_I2SDIV ((uint16_t)0x00FF) /*!<I2S Linear prescaler */
emilmont 77:869cf507173a 4379 #define SPI_I2SPR_ODD ((uint16_t)0x0100) /*!<Odd factor for the prescaler */
emilmont 77:869cf507173a 4380 #define SPI_I2SPR_MCKOE ((uint16_t)0x0200) /*!<Master Clock Output Enable */
emilmont 77:869cf507173a 4381
emilmont 77:869cf507173a 4382 /******************************************************************************/
emilmont 77:869cf507173a 4383 /* */
emilmont 77:869cf507173a 4384 /* System Configuration (SYSCFG) */
emilmont 77:869cf507173a 4385 /* */
emilmont 77:869cf507173a 4386 /******************************************************************************/
emilmont 77:869cf507173a 4387 /***************** Bit definition for SYSCFG_CFGR1 register ****************/
emilmont 77:869cf507173a 4388 #define SYSCFG_CFGR1_MEM_MODE ((uint32_t)0x00000003) /*!< SYSCFG_Memory Remap Config */
emilmont 77:869cf507173a 4389 #define SYSCFG_CFGR1_MEM_MODE_0 ((uint32_t)0x00000001) /*!< SYSCFG_Memory Remap Config Bit 0 */
emilmont 77:869cf507173a 4390 #define SYSCFG_CFGR1_MEM_MODE_1 ((uint32_t)0x00000002) /*!< SYSCFG_Memory Remap Config Bit 1 */
emilmont 77:869cf507173a 4391 #define SYSCFG_CFGR1_PA11_PA12_RMP ((uint32_t)0x00000010) /*!< PA11 and PA12 remap on QFN28 and TSSOP20 packages (only for STM32F042 devices)*/
emilmont 77:869cf507173a 4392 #define SYSCFG_CFGR1_ADC_DMA_RMP ((uint32_t)0x00000100) /*!< ADC DMA remap */
emilmont 77:869cf507173a 4393 #define SYSCFG_CFGR1_USART1TX_DMA_RMP ((uint32_t)0x00000200) /*!< USART1 TX DMA remap */
emilmont 77:869cf507173a 4394 #define SYSCFG_CFGR1_USART1RX_DMA_RMP ((uint32_t)0x00000400) /*!< USART1 RX DMA remap */
emilmont 77:869cf507173a 4395 #define SYSCFG_CFGR1_TIM16_DMA_RMP ((uint32_t)0x00000800) /*!< Timer 16 DMA remap */
emilmont 77:869cf507173a 4396 #define SYSCFG_CFGR1_TIM17_DMA_RMP ((uint32_t)0x00001000) /*!< Timer 17 DMA remap */
emilmont 77:869cf507173a 4397 #define SYSCFG_CFGR1_TIM16_DMA_RMP2 ((uint32_t)0x00002000) /*!< Timer 16 DMA remap 2 (only for STM32F072) */
emilmont 77:869cf507173a 4398 #define SYSCFG_CFGR1_TIM17_DMA_RMP2 ((uint32_t)0x00004000) /*!< Timer 17 DMA remap 2 (only for STM32F072) */
emilmont 77:869cf507173a 4399 #define SYSCFG_CFGR1_I2C_FMP_PB6 ((uint32_t)0x00010000) /*!< I2C PB6 Fast mode plus */
emilmont 77:869cf507173a 4400 #define SYSCFG_CFGR1_I2C_FMP_PB7 ((uint32_t)0x00020000) /*!< I2C PB7 Fast mode plus */
emilmont 77:869cf507173a 4401 #define SYSCFG_CFGR1_I2C_FMP_PB8 ((uint32_t)0x00040000) /*!< I2C PB8 Fast mode plus */
emilmont 77:869cf507173a 4402 #define SYSCFG_CFGR1_I2C_FMP_PB9 ((uint32_t)0x00080000) /*!< I2C PB9 Fast mode plus */
emilmont 77:869cf507173a 4403 #define SYSCFG_CFGR1_I2C_FMP_I2C1 ((uint32_t)0x00100000) /*!< Enable Fast Mode Plus on PB10, PB11, PF6 and PF7(only for STM32F030, STM32F031 and STM32F072 devices) */
emilmont 77:869cf507173a 4404 #define SYSCFG_CFGR1_I2C_FMP_I2C2 ((uint32_t)0x00200000) /*!< Enable I2C2 Fast mode plus (only for STM32F072) */
emilmont 77:869cf507173a 4405 #define SYSCFG_CFGR1_I2C_FMP_PA9 ((uint32_t)0x00400000) /*!< Enable Fast Mode Plus on PA9 (only for STM32F030, STM32F031, STM32F042 and STM32F072 devices) */
emilmont 77:869cf507173a 4406 #define SYSCFG_CFGR1_I2C_FMP_PA10 ((uint32_t)0x00800000) /*!< Enable Fast Mode Plus on PA10(only for STM32F030, STM32F031, STM32F042 and STM32F072 devices) */
emilmont 77:869cf507173a 4407 #define SYSCFG_CFGR1_SPI2_DMA_RMP ((uint32_t)0x01000000) /*!< SPI2 DMA remap (only for STM32F072) */
emilmont 77:869cf507173a 4408 #define SYSCFG_CFGR1_USART2_DMA_RMP ((uint32_t)0x02000000) /*!< USART2 DMA remap (only for STM32F072) */
emilmont 77:869cf507173a 4409 #define SYSCFG_CFGR1_USART3_DMA_RMP ((uint32_t)0x04000000) /*!< USART3 DMA remap (only for STM32F072) */
emilmont 77:869cf507173a 4410 #define SYSCFG_CFGR1_I2C1_DMA_RMP ((uint32_t)0x08000000) /*!< I2C1 DMA remap (only for STM32F072) */
emilmont 77:869cf507173a 4411 #define SYSCFG_CFGR1_TIM1_DMA_RMP ((uint32_t)0x10000000) /*!< TIM1 DMA remap (only for STM32F072) */
emilmont 77:869cf507173a 4412 #define SYSCFG_CFGR1_TIM2_DMA_RMP ((uint32_t)0x20000000) /*!< TIM2 DMA remap (only for STM32F072) */
emilmont 77:869cf507173a 4413 #define SYSCFG_CFGR1_TIM3_DMA_RMP ((uint32_t)0x40000000) /*!< TIM3 DMA remap (only for STM32F072) */
emilmont 77:869cf507173a 4414
emilmont 77:869cf507173a 4415 /***************** Bit definition for SYSCFG_EXTICR1 register ***************/
emilmont 77:869cf507173a 4416 #define SYSCFG_EXTICR1_EXTI0 ((uint16_t)0x000F) /*!< EXTI 0 configuration */
emilmont 77:869cf507173a 4417 #define SYSCFG_EXTICR1_EXTI1 ((uint16_t)0x00F0) /*!< EXTI 1 configuration */
emilmont 77:869cf507173a 4418 #define SYSCFG_EXTICR1_EXTI2 ((uint16_t)0x0F00) /*!< EXTI 2 configuration */
emilmont 77:869cf507173a 4419 #define SYSCFG_EXTICR1_EXTI3 ((uint16_t)0xF000) /*!< EXTI 3 configuration */
emilmont 77:869cf507173a 4420
emilmont 77:869cf507173a 4421 /**
emilmont 77:869cf507173a 4422 * @brief EXTI0 configuration
emilmont 77:869cf507173a 4423 */
emilmont 77:869cf507173a 4424 #define SYSCFG_EXTICR1_EXTI0_PA ((uint16_t)0x0000) /*!< PA[0] pin */
emilmont 77:869cf507173a 4425 #define SYSCFG_EXTICR1_EXTI0_PB ((uint16_t)0x0001) /*!< PB[0] pin */
emilmont 77:869cf507173a 4426 #define SYSCFG_EXTICR1_EXTI0_PC ((uint16_t)0x0002) /*!< PC[0] pin */
emilmont 77:869cf507173a 4427 #define SYSCFG_EXTICR1_EXTI0_PD ((uint16_t)0x0003) /*!< PD[0] pin */
emilmont 77:869cf507173a 4428 #define SYSCFG_EXTICR1_EXTI0_PE ((uint16_t)0x0004) /*!< PE[0] pin */
emilmont 77:869cf507173a 4429 #define SYSCFG_EXTICR1_EXTI0_PF ((uint16_t)0x0005) /*!< PF[0] pin */
emilmont 77:869cf507173a 4430
emilmont 77:869cf507173a 4431 /**
emilmont 77:869cf507173a 4432 * @brief EXTI1 configuration
emilmont 77:869cf507173a 4433 */
emilmont 77:869cf507173a 4434 #define SYSCFG_EXTICR1_EXTI1_PA ((uint16_t)0x0000) /*!< PA[1] pin */
emilmont 77:869cf507173a 4435 #define SYSCFG_EXTICR1_EXTI1_PB ((uint16_t)0x0010) /*!< PB[1] pin */
emilmont 77:869cf507173a 4436 #define SYSCFG_EXTICR1_EXTI1_PC ((uint16_t)0x0020) /*!< PC[1] pin */
emilmont 77:869cf507173a 4437 #define SYSCFG_EXTICR1_EXTI1_PD ((uint16_t)0x0030) /*!< PD[1] pin */
emilmont 77:869cf507173a 4438 #define SYSCFG_EXTICR1_EXTI1_PE ((uint16_t)0x0040) /*!< PE[1] pin */
emilmont 77:869cf507173a 4439 #define SYSCFG_EXTICR1_EXTI1_PF ((uint16_t)0x0050) /*!< PF[1] pin */
emilmont 77:869cf507173a 4440
emilmont 77:869cf507173a 4441 /**
emilmont 77:869cf507173a 4442 * @brief EXTI2 configuration
emilmont 77:869cf507173a 4443 */
emilmont 77:869cf507173a 4444 #define SYSCFG_EXTICR1_EXTI2_PA ((uint16_t)0x0000) /*!< PA[2] pin */
emilmont 77:869cf507173a 4445 #define SYSCFG_EXTICR1_EXTI2_PB ((uint16_t)0x0100) /*!< PB[2] pin */
emilmont 77:869cf507173a 4446 #define SYSCFG_EXTICR1_EXTI2_PC ((uint16_t)0x0200) /*!< PC[2] pin */
emilmont 77:869cf507173a 4447 #define SYSCFG_EXTICR1_EXTI2_PD ((uint16_t)0x0300) /*!< PD[2] pin */
emilmont 77:869cf507173a 4448 #define SYSCFG_EXTICR1_EXTI2_PE ((uint16_t)0x0400) /*!< PE[2] pin */
emilmont 77:869cf507173a 4449 #define SYSCFG_EXTICR1_EXTI2_PF ((uint16_t)0x0500) /*!< PF[2] pin */
emilmont 77:869cf507173a 4450
emilmont 77:869cf507173a 4451 /**
emilmont 77:869cf507173a 4452 * @brief EXTI3 configuration
emilmont 77:869cf507173a 4453 */
emilmont 77:869cf507173a 4454 #define SYSCFG_EXTICR1_EXTI3_PA ((uint16_t)0x0000) /*!< PA[3] pin */
emilmont 77:869cf507173a 4455 #define SYSCFG_EXTICR1_EXTI3_PB ((uint16_t)0x1000) /*!< PB[3] pin */
emilmont 77:869cf507173a 4456 #define SYSCFG_EXTICR1_EXTI3_PC ((uint16_t)0x2000) /*!< PC[3] pin */
emilmont 77:869cf507173a 4457 #define SYSCFG_EXTICR1_EXTI3_PD ((uint16_t)0x3000) /*!< PD[3] pin */
emilmont 77:869cf507173a 4458 #define SYSCFG_EXTICR1_EXTI3_PE ((uint16_t)0x4000) /*!< PE[3] pin */
emilmont 77:869cf507173a 4459 #define SYSCFG_EXTICR1_EXTI3_PF ((uint16_t)0x5000) /*!< PF[3] pin */
emilmont 77:869cf507173a 4460
emilmont 77:869cf507173a 4461 /***************** Bit definition for SYSCFG_EXTICR2 register *****************/
emilmont 77:869cf507173a 4462 #define SYSCFG_EXTICR2_EXTI4 ((uint16_t)0x000F) /*!< EXTI 4 configuration */
emilmont 77:869cf507173a 4463 #define SYSCFG_EXTICR2_EXTI5 ((uint16_t)0x00F0) /*!< EXTI 5 configuration */
emilmont 77:869cf507173a 4464 #define SYSCFG_EXTICR2_EXTI6 ((uint16_t)0x0F00) /*!< EXTI 6 configuration */
emilmont 77:869cf507173a 4465 #define SYSCFG_EXTICR2_EXTI7 ((uint16_t)0xF000) /*!< EXTI 7 configuration */
emilmont 77:869cf507173a 4466
emilmont 77:869cf507173a 4467 /**
emilmont 77:869cf507173a 4468 * @brief EXTI4 configuration
emilmont 77:869cf507173a 4469 */
emilmont 77:869cf507173a 4470 #define SYSCFG_EXTICR2_EXTI4_PA ((uint16_t)0x0000) /*!< PA[4] pin */
emilmont 77:869cf507173a 4471 #define SYSCFG_EXTICR2_EXTI4_PB ((uint16_t)0x0001) /*!< PB[4] pin */
emilmont 77:869cf507173a 4472 #define SYSCFG_EXTICR2_EXTI4_PC ((uint16_t)0x0002) /*!< PC[4] pin */
emilmont 77:869cf507173a 4473 #define SYSCFG_EXTICR2_EXTI4_PD ((uint16_t)0x0003) /*!< PD[4] pin */
emilmont 77:869cf507173a 4474 #define SYSCFG_EXTICR2_EXTI4_PE ((uint16_t)0x0004) /*!< PE[4] pin */
emilmont 77:869cf507173a 4475 #define SYSCFG_EXTICR2_EXTI4_PF ((uint16_t)0x0005) /*!< PF[4] pin */
emilmont 77:869cf507173a 4476
emilmont 77:869cf507173a 4477 /**
emilmont 77:869cf507173a 4478 * @brief EXTI5 configuration
emilmont 77:869cf507173a 4479 */
emilmont 77:869cf507173a 4480 #define SYSCFG_EXTICR2_EXTI5_PA ((uint16_t)0x0000) /*!< PA[5] pin */
emilmont 77:869cf507173a 4481 #define SYSCFG_EXTICR2_EXTI5_PB ((uint16_t)0x0010) /*!< PB[5] pin */
emilmont 77:869cf507173a 4482 #define SYSCFG_EXTICR2_EXTI5_PC ((uint16_t)0x0020) /*!< PC[5] pin */
emilmont 77:869cf507173a 4483 #define SYSCFG_EXTICR2_EXTI5_PD ((uint16_t)0x0030) /*!< PD[5] pin */
emilmont 77:869cf507173a 4484 #define SYSCFG_EXTICR2_EXTI5_PE ((uint16_t)0x0040) /*!< PE[5] pin */
emilmont 77:869cf507173a 4485 #define SYSCFG_EXTICR2_EXTI5_PF ((uint16_t)0x0050) /*!< PF[5] pin */
emilmont 77:869cf507173a 4486
emilmont 77:869cf507173a 4487 /**
emilmont 77:869cf507173a 4488 * @brief EXTI6 configuration
emilmont 77:869cf507173a 4489 */
emilmont 77:869cf507173a 4490 #define SYSCFG_EXTICR2_EXTI6_PA ((uint16_t)0x0000) /*!< PA[6] pin */
emilmont 77:869cf507173a 4491 #define SYSCFG_EXTICR2_EXTI6_PB ((uint16_t)0x0100) /*!< PB[6] pin */
emilmont 77:869cf507173a 4492 #define SYSCFG_EXTICR2_EXTI6_PC ((uint16_t)0x0200) /*!< PC[6] pin */
emilmont 77:869cf507173a 4493 #define SYSCFG_EXTICR2_EXTI6_PD ((uint16_t)0x0300) /*!< PD[6] pin */
emilmont 77:869cf507173a 4494 #define SYSCFG_EXTICR2_EXTI6_PE ((uint16_t)0x0400) /*!< PE[6] pin */
emilmont 77:869cf507173a 4495 #define SYSCFG_EXTICR2_EXTI6_PF ((uint16_t)0x0500) /*!< PF[6] pin */
emilmont 77:869cf507173a 4496
emilmont 77:869cf507173a 4497 /**
emilmont 77:869cf507173a 4498 * @brief EXTI7 configuration
emilmont 77:869cf507173a 4499 */
emilmont 77:869cf507173a 4500 #define SYSCFG_EXTICR2_EXTI7_PA ((uint16_t)0x0000) /*!< PA[7] pin */
emilmont 77:869cf507173a 4501 #define SYSCFG_EXTICR2_EXTI7_PB ((uint16_t)0x1000) /*!< PB[7] pin */
emilmont 77:869cf507173a 4502 #define SYSCFG_EXTICR2_EXTI7_PC ((uint16_t)0x2000) /*!< PC[7] pin */
emilmont 77:869cf507173a 4503 #define SYSCFG_EXTICR2_EXTI7_PD ((uint16_t)0x3000) /*!< PD[7] pin */
emilmont 77:869cf507173a 4504 #define SYSCFG_EXTICR2_EXTI7_PE ((uint16_t)0x4000) /*!< PE[7] pin */
emilmont 77:869cf507173a 4505 #define SYSCFG_EXTICR2_EXTI7_PF ((uint16_t)0x5000) /*!< PF[7] pin */
emilmont 77:869cf507173a 4506
emilmont 77:869cf507173a 4507 /***************** Bit definition for SYSCFG_EXTICR3 register *****************/
emilmont 77:869cf507173a 4508 #define SYSCFG_EXTICR3_EXTI8 ((uint16_t)0x000F) /*!< EXTI 8 configuration */
emilmont 77:869cf507173a 4509 #define SYSCFG_EXTICR3_EXTI9 ((uint16_t)0x00F0) /*!< EXTI 9 configuration */
emilmont 77:869cf507173a 4510 #define SYSCFG_EXTICR3_EXTI10 ((uint16_t)0x0F00) /*!< EXTI 10 configuration */
emilmont 77:869cf507173a 4511 #define SYSCFG_EXTICR3_EXTI11 ((uint16_t)0xF000) /*!< EXTI 11 configuration */
emilmont 77:869cf507173a 4512
emilmont 77:869cf507173a 4513 /**
emilmont 77:869cf507173a 4514 * @brief EXTI8 configuration
emilmont 77:869cf507173a 4515 */
emilmont 77:869cf507173a 4516 #define SYSCFG_EXTICR3_EXTI8_PA ((uint16_t)0x0000) /*!< PA[8] pin */
emilmont 77:869cf507173a 4517 #define SYSCFG_EXTICR3_EXTI8_PB ((uint16_t)0x0001) /*!< PB[8] pin */
emilmont 77:869cf507173a 4518 #define SYSCFG_EXTICR3_EXTI8_PC ((uint16_t)0x0002) /*!< PC[8] pin */
emilmont 77:869cf507173a 4519 #define SYSCFG_EXTICR3_EXTI8_PD ((uint16_t)0x0003) /*!< PD[8] pin */
emilmont 77:869cf507173a 4520 #define SYSCFG_EXTICR3_EXTI8_PE ((uint16_t)0x0004) /*!< PE[8] pin */
emilmont 77:869cf507173a 4521
emilmont 77:869cf507173a 4522 /**
emilmont 77:869cf507173a 4523 * @brief EXTI9 configuration
emilmont 77:869cf507173a 4524 */
emilmont 77:869cf507173a 4525 #define SYSCFG_EXTICR3_EXTI9_PA ((uint16_t)0x0000) /*!< PA[9] pin */
emilmont 77:869cf507173a 4526 #define SYSCFG_EXTICR3_EXTI9_PB ((uint16_t)0x0010) /*!< PB[9] pin */
emilmont 77:869cf507173a 4527 #define SYSCFG_EXTICR3_EXTI9_PC ((uint16_t)0x0020) /*!< PC[9] pin */
emilmont 77:869cf507173a 4528 #define SYSCFG_EXTICR3_EXTI9_PD ((uint16_t)0x0030) /*!< PD[9] pin */
emilmont 77:869cf507173a 4529 #define SYSCFG_EXTICR3_EXTI9_PE ((uint16_t)0x0040) /*!< PE[9] pin */
emilmont 77:869cf507173a 4530 #define SYSCFG_EXTICR3_EXTI9_PF ((uint16_t)0x0050) /*!< PF[9] pin */
emilmont 77:869cf507173a 4531
emilmont 77:869cf507173a 4532 /**
emilmont 77:869cf507173a 4533 * @brief EXTI10 configuration
emilmont 77:869cf507173a 4534 */
emilmont 77:869cf507173a 4535 #define SYSCFG_EXTICR3_EXTI10_PA ((uint16_t)0x0000) /*!< PA[10] pin */
emilmont 77:869cf507173a 4536 #define SYSCFG_EXTICR3_EXTI10_PB ((uint16_t)0x0100) /*!< PB[10] pin */
emilmont 77:869cf507173a 4537 #define SYSCFG_EXTICR3_EXTI10_PC ((uint16_t)0x0200) /*!< PC[10] pin */
emilmont 77:869cf507173a 4538 #define SYSCFG_EXTICR3_EXTI10_PD ((uint16_t)0x0300) /*!< PE[10] pin */
emilmont 77:869cf507173a 4539 #define SYSCFG_EXTICR3_EXTI10_PE ((uint16_t)0x0400) /*!< PD[10] pin */
emilmont 77:869cf507173a 4540 #define SYSCFG_EXTICR3_EXTI10_PF ((uint16_t)0x0500) /*!< PF[10] pin */
emilmont 77:869cf507173a 4541
emilmont 77:869cf507173a 4542 /**
emilmont 77:869cf507173a 4543 * @brief EXTI11 configuration
emilmont 77:869cf507173a 4544 */
emilmont 77:869cf507173a 4545 #define SYSCFG_EXTICR3_EXTI11_PA ((uint16_t)0x0000) /*!< PA[11] pin */
emilmont 77:869cf507173a 4546 #define SYSCFG_EXTICR3_EXTI11_PB ((uint16_t)0x1000) /*!< PB[11] pin */
emilmont 77:869cf507173a 4547 #define SYSCFG_EXTICR3_EXTI11_PC ((uint16_t)0x2000) /*!< PC[11] pin */
emilmont 77:869cf507173a 4548 #define SYSCFG_EXTICR3_EXTI11_PD ((uint16_t)0x3000) /*!< PD[11] pin */
emilmont 77:869cf507173a 4549 #define SYSCFG_EXTICR3_EXTI11_PE ((uint16_t)0x4000) /*!< PE[11] pin */
emilmont 77:869cf507173a 4550
emilmont 77:869cf507173a 4551 /***************** Bit definition for SYSCFG_EXTICR4 register *****************/
emilmont 77:869cf507173a 4552 #define SYSCFG_EXTICR4_EXTI12 ((uint16_t)0x000F) /*!< EXTI 12 configuration */
emilmont 77:869cf507173a 4553 #define SYSCFG_EXTICR4_EXTI13 ((uint16_t)0x00F0) /*!< EXTI 13 configuration */
emilmont 77:869cf507173a 4554 #define SYSCFG_EXTICR4_EXTI14 ((uint16_t)0x0F00) /*!< EXTI 14 configuration */
emilmont 77:869cf507173a 4555 #define SYSCFG_EXTICR4_EXTI15 ((uint16_t)0xF000) /*!< EXTI 15 configuration */
emilmont 77:869cf507173a 4556
emilmont 77:869cf507173a 4557 /**
emilmont 77:869cf507173a 4558 * @brief EXTI12 configuration
emilmont 77:869cf507173a 4559 */
emilmont 77:869cf507173a 4560 #define SYSCFG_EXTICR4_EXTI12_PA ((uint16_t)0x0000) /*!< PA[12] pin */
emilmont 77:869cf507173a 4561 #define SYSCFG_EXTICR4_EXTI12_PB ((uint16_t)0x0001) /*!< PB[12] pin */
emilmont 77:869cf507173a 4562 #define SYSCFG_EXTICR4_EXTI12_PC ((uint16_t)0x0002) /*!< PC[12] pin */
emilmont 77:869cf507173a 4563 #define SYSCFG_EXTICR4_EXTI12_PD ((uint16_t)0x0003) /*!< PD[12] pin */
emilmont 77:869cf507173a 4564 #define SYSCFG_EXTICR4_EXTI12_PE ((uint16_t)0x0004) /*!< PE[12] pin */
emilmont 77:869cf507173a 4565
emilmont 77:869cf507173a 4566 /**
emilmont 77:869cf507173a 4567 * @brief EXTI13 configuration
emilmont 77:869cf507173a 4568 */
emilmont 77:869cf507173a 4569 #define SYSCFG_EXTICR4_EXTI13_PA ((uint16_t)0x0000) /*!< PA[13] pin */
emilmont 77:869cf507173a 4570 #define SYSCFG_EXTICR4_EXTI13_PB ((uint16_t)0x0010) /*!< PB[13] pin */
emilmont 77:869cf507173a 4571 #define SYSCFG_EXTICR4_EXTI13_PC ((uint16_t)0x0020) /*!< PC[13] pin */
emilmont 77:869cf507173a 4572 #define SYSCFG_EXTICR4_EXTI13_PD ((uint16_t)0x0030) /*!< PD[13] pin */
emilmont 77:869cf507173a 4573 #define SYSCFG_EXTICR4_EXTI13_PE ((uint16_t)0x0040) /*!< PE[13] pin */
emilmont 77:869cf507173a 4574
emilmont 77:869cf507173a 4575 /**
emilmont 77:869cf507173a 4576 * @brief EXTI14 configuration
emilmont 77:869cf507173a 4577 */
emilmont 77:869cf507173a 4578 #define SYSCFG_EXTICR4_EXTI14_PA ((uint16_t)0x0000) /*!< PA[14] pin */
emilmont 77:869cf507173a 4579 #define SYSCFG_EXTICR4_EXTI14_PB ((uint16_t)0x0100) /*!< PB[14] pin */
emilmont 77:869cf507173a 4580 #define SYSCFG_EXTICR4_EXTI14_PC ((uint16_t)0x0200) /*!< PC[14] pin */
emilmont 77:869cf507173a 4581 #define SYSCFG_EXTICR4_EXTI14_PD ((uint16_t)0x0300) /*!< PD[14] pin */
emilmont 77:869cf507173a 4582 #define SYSCFG_EXTICR4_EXTI14_PE ((uint16_t)0x0400) /*!< PE[14] pin */
emilmont 77:869cf507173a 4583
emilmont 77:869cf507173a 4584 /**
emilmont 77:869cf507173a 4585 * @brief EXTI15 configuration
emilmont 77:869cf507173a 4586 */
emilmont 77:869cf507173a 4587 #define SYSCFG_EXTICR4_EXTI15_PA ((uint16_t)0x0000) /*!< PA[15] pin */
emilmont 77:869cf507173a 4588 #define SYSCFG_EXTICR4_EXTI15_PB ((uint16_t)0x1000) /*!< PB[15] pin */
emilmont 77:869cf507173a 4589 #define SYSCFG_EXTICR4_EXTI15_PC ((uint16_t)0x2000) /*!< PC[15] pin */
emilmont 77:869cf507173a 4590 #define SYSCFG_EXTICR4_EXTI15_PD ((uint16_t)0x3000) /*!< PD[15] pin */
emilmont 77:869cf507173a 4591 #define SYSCFG_EXTICR4_EXTI15_PE ((uint16_t)0x4000) /*!< PE[15] pin */
emilmont 77:869cf507173a 4592
emilmont 77:869cf507173a 4593 /***************** Bit definition for SYSCFG_CFGR2 register ****************/
emilmont 77:869cf507173a 4594 #define SYSCFG_CFGR2_LOCKUP_LOCK ((uint32_t)0x00000001) /*!< Enables and locks the PVD connection with Timer1 Break Input and also the PVD_EN and PVDSEL[2:0] bits of the Power Control Interface */
emilmont 77:869cf507173a 4595 #define SYSCFG_CFGR2_SRAM_PARITY_LOCK ((uint32_t)0x00000002) /*!< Enables and locks the SRAM_PARITY error signal with Break Input of TIMER1 */
emilmont 77:869cf507173a 4596 #define SYSCFG_CFGR2_PVD_LOCK ((uint32_t)0x00000004) /*!< Enables and locks the LOCKUP (Hardfault) output of CortexM0 with Break Input of TIMER1 */
emilmont 77:869cf507173a 4597 #define SYSCFG_CFGR2_SRAM_PEF ((uint32_t)0x00000100) /*!< SRAM Parity error flag */
emilmont 77:869cf507173a 4598
emilmont 77:869cf507173a 4599 /* Old Bit definition maintained for legacy purpose */
emilmont 77:869cf507173a 4600 #define SYSCFG_CFGR2_SRAM_PE SYSCFG_CFGR2_SRAM_PEF
emilmont 77:869cf507173a 4601 /******************************************************************************/
emilmont 77:869cf507173a 4602 /* */
emilmont 77:869cf507173a 4603 /* Timers (TIM) */
emilmont 77:869cf507173a 4604 /* */
emilmont 77:869cf507173a 4605 /******************************************************************************/
emilmont 77:869cf507173a 4606 /******************* Bit definition for TIM_CR1 register ********************/
emilmont 77:869cf507173a 4607 #define TIM_CR1_CEN ((uint16_t)0x0001) /*!<Counter enable */
emilmont 77:869cf507173a 4608 #define TIM_CR1_UDIS ((uint16_t)0x0002) /*!<Update disable */
emilmont 77:869cf507173a 4609 #define TIM_CR1_URS ((uint16_t)0x0004) /*!<Update request source */
emilmont 77:869cf507173a 4610 #define TIM_CR1_OPM ((uint16_t)0x0008) /*!<One pulse mode */
emilmont 77:869cf507173a 4611 #define TIM_CR1_DIR ((uint16_t)0x0010) /*!<Direction */
emilmont 77:869cf507173a 4612
emilmont 77:869cf507173a 4613 #define TIM_CR1_CMS ((uint16_t)0x0060) /*!<CMS[1:0] bits (Center-aligned mode selection) */
emilmont 77:869cf507173a 4614 #define TIM_CR1_CMS_0 ((uint16_t)0x0020) /*!<Bit 0 */
emilmont 77:869cf507173a 4615 #define TIM_CR1_CMS_1 ((uint16_t)0x0040) /*!<Bit 1 */
emilmont 77:869cf507173a 4616
emilmont 77:869cf507173a 4617 #define TIM_CR1_ARPE ((uint16_t)0x0080) /*!<Auto-reload preload enable */
emilmont 77:869cf507173a 4618
emilmont 77:869cf507173a 4619 #define TIM_CR1_CKD ((uint16_t)0x0300) /*!<CKD[1:0] bits (clock division) */
emilmont 77:869cf507173a 4620 #define TIM_CR1_CKD_0 ((uint16_t)0x0100) /*!<Bit 0 */
emilmont 77:869cf507173a 4621 #define TIM_CR1_CKD_1 ((uint16_t)0x0200) /*!<Bit 1 */
emilmont 77:869cf507173a 4622
emilmont 77:869cf507173a 4623 /******************* Bit definition for TIM_CR2 register ********************/
emilmont 77:869cf507173a 4624 #define TIM_CR2_CCPC ((uint16_t)0x0001) /*!<Capture/Compare Preloaded Control */
emilmont 77:869cf507173a 4625 #define TIM_CR2_CCUS ((uint16_t)0x0004) /*!<Capture/Compare Control Update Selection */
emilmont 77:869cf507173a 4626 #define TIM_CR2_CCDS ((uint16_t)0x0008) /*!<Capture/Compare DMA Selection */
emilmont 77:869cf507173a 4627
emilmont 77:869cf507173a 4628 #define TIM_CR2_MMS ((uint16_t)0x0070) /*!<MMS[2:0] bits (Master Mode Selection) */
emilmont 77:869cf507173a 4629 #define TIM_CR2_MMS_0 ((uint16_t)0x0010) /*!<Bit 0 */
emilmont 77:869cf507173a 4630 #define TIM_CR2_MMS_1 ((uint16_t)0x0020) /*!<Bit 1 */
emilmont 77:869cf507173a 4631 #define TIM_CR2_MMS_2 ((uint16_t)0x0040) /*!<Bit 2 */
emilmont 77:869cf507173a 4632
emilmont 77:869cf507173a 4633 #define TIM_CR2_TI1S ((uint16_t)0x0080) /*!<TI1 Selection */
emilmont 77:869cf507173a 4634 #define TIM_CR2_OIS1 ((uint16_t)0x0100) /*!<Output Idle state 1 (OC1 output) */
emilmont 77:869cf507173a 4635 #define TIM_CR2_OIS1N ((uint16_t)0x0200) /*!<Output Idle state 1 (OC1N output) */
emilmont 77:869cf507173a 4636 #define TIM_CR2_OIS2 ((uint16_t)0x0400) /*!<Output Idle state 2 (OC2 output) */
emilmont 77:869cf507173a 4637 #define TIM_CR2_OIS2N ((uint16_t)0x0800) /*!<Output Idle state 2 (OC2N output) */
emilmont 77:869cf507173a 4638 #define TIM_CR2_OIS3 ((uint16_t)0x1000) /*!<Output Idle state 3 (OC3 output) */
emilmont 77:869cf507173a 4639 #define TIM_CR2_OIS3N ((uint16_t)0x2000) /*!<Output Idle state 3 (OC3N output) */
emilmont 77:869cf507173a 4640 #define TIM_CR2_OIS4 ((uint16_t)0x4000) /*!<Output Idle state 4 (OC4 output) */
emilmont 77:869cf507173a 4641
emilmont 77:869cf507173a 4642 /******************* Bit definition for TIM_SMCR register *******************/
emilmont 77:869cf507173a 4643 #define TIM_SMCR_SMS ((uint16_t)0x0007) /*!<SMS[2:0] bits (Slave mode selection) */
emilmont 77:869cf507173a 4644 #define TIM_SMCR_SMS_0 ((uint16_t)0x0001) /*!<Bit 0 */
emilmont 77:869cf507173a 4645 #define TIM_SMCR_SMS_1 ((uint16_t)0x0002) /*!<Bit 1 */
emilmont 77:869cf507173a 4646 #define TIM_SMCR_SMS_2 ((uint16_t)0x0004) /*!<Bit 2 */
emilmont 77:869cf507173a 4647
emilmont 77:869cf507173a 4648 #define TIM_SMCR_OCCS ((uint16_t)0x0008) /*!< OCREF clear selection */
emilmont 77:869cf507173a 4649
emilmont 77:869cf507173a 4650 #define TIM_SMCR_TS ((uint16_t)0x0070) /*!<TS[2:0] bits (Trigger selection) */
emilmont 77:869cf507173a 4651 #define TIM_SMCR_TS_0 ((uint16_t)0x0010) /*!<Bit 0 */
emilmont 77:869cf507173a 4652 #define TIM_SMCR_TS_1 ((uint16_t)0x0020) /*!<Bit 1 */
emilmont 77:869cf507173a 4653 #define TIM_SMCR_TS_2 ((uint16_t)0x0040) /*!<Bit 2 */
emilmont 77:869cf507173a 4654
emilmont 77:869cf507173a 4655 #define TIM_SMCR_MSM ((uint16_t)0x0080) /*!<Master/slave mode */
emilmont 77:869cf507173a 4656
emilmont 77:869cf507173a 4657 #define TIM_SMCR_ETF ((uint16_t)0x0F00) /*!<ETF[3:0] bits (External trigger filter) */
emilmont 77:869cf507173a 4658 #define TIM_SMCR_ETF_0 ((uint16_t)0x0100) /*!<Bit 0 */
emilmont 77:869cf507173a 4659 #define TIM_SMCR_ETF_1 ((uint16_t)0x0200) /*!<Bit 1 */
emilmont 77:869cf507173a 4660 #define TIM_SMCR_ETF_2 ((uint16_t)0x0400) /*!<Bit 2 */
emilmont 77:869cf507173a 4661 #define TIM_SMCR_ETF_3 ((uint16_t)0x0800) /*!<Bit 3 */
emilmont 77:869cf507173a 4662
emilmont 77:869cf507173a 4663 #define TIM_SMCR_ETPS ((uint16_t)0x3000) /*!<ETPS[1:0] bits (External trigger prescaler) */
emilmont 77:869cf507173a 4664 #define TIM_SMCR_ETPS_0 ((uint16_t)0x1000) /*!<Bit 0 */
emilmont 77:869cf507173a 4665 #define TIM_SMCR_ETPS_1 ((uint16_t)0x2000) /*!<Bit 1 */
emilmont 77:869cf507173a 4666
emilmont 77:869cf507173a 4667 #define TIM_SMCR_ECE ((uint16_t)0x4000) /*!<External clock enable */
emilmont 77:869cf507173a 4668 #define TIM_SMCR_ETP ((uint16_t)0x8000) /*!<External trigger polarity */
emilmont 77:869cf507173a 4669
emilmont 77:869cf507173a 4670 /******************* Bit definition for TIM_DIER register *******************/
emilmont 77:869cf507173a 4671 #define TIM_DIER_UIE ((uint16_t)0x0001) /*!<Update interrupt enable */
emilmont 77:869cf507173a 4672 #define TIM_DIER_CC1IE ((uint16_t)0x0002) /*!<Capture/Compare 1 interrupt enable */
emilmont 77:869cf507173a 4673 #define TIM_DIER_CC2IE ((uint16_t)0x0004) /*!<Capture/Compare 2 interrupt enable */
emilmont 77:869cf507173a 4674 #define TIM_DIER_CC3IE ((uint16_t)0x0008) /*!<Capture/Compare 3 interrupt enable */
emilmont 77:869cf507173a 4675 #define TIM_DIER_CC4IE ((uint16_t)0x0010) /*!<Capture/Compare 4 interrupt enable */
emilmont 77:869cf507173a 4676 #define TIM_DIER_COMIE ((uint16_t)0x0020) /*!<COM interrupt enable */
emilmont 77:869cf507173a 4677 #define TIM_DIER_TIE ((uint16_t)0x0040) /*!<Trigger interrupt enable */
emilmont 77:869cf507173a 4678 #define TIM_DIER_BIE ((uint16_t)0x0080) /*!<Break interrupt enable */
emilmont 77:869cf507173a 4679 #define TIM_DIER_UDE ((uint16_t)0x0100) /*!<Update DMA request enable */
emilmont 77:869cf507173a 4680 #define TIM_DIER_CC1DE ((uint16_t)0x0200) /*!<Capture/Compare 1 DMA request enable */
emilmont 77:869cf507173a 4681 #define TIM_DIER_CC2DE ((uint16_t)0x0400) /*!<Capture/Compare 2 DMA request enable */
emilmont 77:869cf507173a 4682 #define TIM_DIER_CC3DE ((uint16_t)0x0800) /*!<Capture/Compare 3 DMA request enable */
emilmont 77:869cf507173a 4683 #define TIM_DIER_CC4DE ((uint16_t)0x1000) /*!<Capture/Compare 4 DMA request enable */
emilmont 77:869cf507173a 4684 #define TIM_DIER_COMDE ((uint16_t)0x2000) /*!<COM DMA request enable */
emilmont 77:869cf507173a 4685 #define TIM_DIER_TDE ((uint16_t)0x4000) /*!<Trigger DMA request enable */
emilmont 77:869cf507173a 4686
emilmont 77:869cf507173a 4687 /******************** Bit definition for TIM_SR register ********************/
emilmont 77:869cf507173a 4688 #define TIM_SR_UIF ((uint16_t)0x0001) /*!<Update interrupt Flag */
emilmont 77:869cf507173a 4689 #define TIM_SR_CC1IF ((uint16_t)0x0002) /*!<Capture/Compare 1 interrupt Flag */
emilmont 77:869cf507173a 4690 #define TIM_SR_CC2IF ((uint16_t)0x0004) /*!<Capture/Compare 2 interrupt Flag */
emilmont 77:869cf507173a 4691 #define TIM_SR_CC3IF ((uint16_t)0x0008) /*!<Capture/Compare 3 interrupt Flag */
emilmont 77:869cf507173a 4692 #define TIM_SR_CC4IF ((uint16_t)0x0010) /*!<Capture/Compare 4 interrupt Flag */
emilmont 77:869cf507173a 4693 #define TIM_SR_COMIF ((uint16_t)0x0020) /*!<COM interrupt Flag */
emilmont 77:869cf507173a 4694 #define TIM_SR_TIF ((uint16_t)0x0040) /*!<Trigger interrupt Flag */
emilmont 77:869cf507173a 4695 #define TIM_SR_BIF ((uint16_t)0x0080) /*!<Break interrupt Flag */
emilmont 77:869cf507173a 4696 #define TIM_SR_CC1OF ((uint16_t)0x0200) /*!<Capture/Compare 1 Overcapture Flag */
emilmont 77:869cf507173a 4697 #define TIM_SR_CC2OF ((uint16_t)0x0400) /*!<Capture/Compare 2 Overcapture Flag */
emilmont 77:869cf507173a 4698 #define TIM_SR_CC3OF ((uint16_t)0x0800) /*!<Capture/Compare 3 Overcapture Flag */
emilmont 77:869cf507173a 4699 #define TIM_SR_CC4OF ((uint16_t)0x1000) /*!<Capture/Compare 4 Overcapture Flag */
emilmont 77:869cf507173a 4700
emilmont 77:869cf507173a 4701 /******************* Bit definition for TIM_EGR register ********************/
emilmont 77:869cf507173a 4702 #define TIM_EGR_UG ((uint8_t)0x01) /*!<Update Generation */
emilmont 77:869cf507173a 4703 #define TIM_EGR_CC1G ((uint8_t)0x02) /*!<Capture/Compare 1 Generation */
emilmont 77:869cf507173a 4704 #define TIM_EGR_CC2G ((uint8_t)0x04) /*!<Capture/Compare 2 Generation */
emilmont 77:869cf507173a 4705 #define TIM_EGR_CC3G ((uint8_t)0x08) /*!<Capture/Compare 3 Generation */
emilmont 77:869cf507173a 4706 #define TIM_EGR_CC4G ((uint8_t)0x10) /*!<Capture/Compare 4 Generation */
emilmont 77:869cf507173a 4707 #define TIM_EGR_COMG ((uint8_t)0x20) /*!<Capture/Compare Control Update Generation */
emilmont 77:869cf507173a 4708 #define TIM_EGR_TG ((uint8_t)0x40) /*!<Trigger Generation */
emilmont 77:869cf507173a 4709 #define TIM_EGR_BG ((uint8_t)0x80) /*!<Break Generation */
emilmont 77:869cf507173a 4710
emilmont 77:869cf507173a 4711 /****************** Bit definition for TIM_CCMR1 register *******************/
emilmont 77:869cf507173a 4712 #define TIM_CCMR1_CC1S ((uint16_t)0x0003) /*!<CC1S[1:0] bits (Capture/Compare 1 Selection) */
emilmont 77:869cf507173a 4713 #define TIM_CCMR1_CC1S_0 ((uint16_t)0x0001) /*!<Bit 0 */
emilmont 77:869cf507173a 4714 #define TIM_CCMR1_CC1S_1 ((uint16_t)0x0002) /*!<Bit 1 */
emilmont 77:869cf507173a 4715
emilmont 77:869cf507173a 4716 #define TIM_CCMR1_OC1FE ((uint16_t)0x0004) /*!<Output Compare 1 Fast enable */
emilmont 77:869cf507173a 4717 #define TIM_CCMR1_OC1PE ((uint16_t)0x0008) /*!<Output Compare 1 Preload enable */
emilmont 77:869cf507173a 4718
emilmont 77:869cf507173a 4719 #define TIM_CCMR1_OC1M ((uint16_t)0x0070) /*!<OC1M[2:0] bits (Output Compare 1 Mode) */
emilmont 77:869cf507173a 4720 #define TIM_CCMR1_OC1M_0 ((uint16_t)0x0010) /*!<Bit 0 */
emilmont 77:869cf507173a 4721 #define TIM_CCMR1_OC1M_1 ((uint16_t)0x0020) /*!<Bit 1 */
emilmont 77:869cf507173a 4722 #define TIM_CCMR1_OC1M_2 ((uint16_t)0x0040) /*!<Bit 2 */
emilmont 77:869cf507173a 4723
emilmont 77:869cf507173a 4724 #define TIM_CCMR1_OC1CE ((uint16_t)0x0080) /*!<Output Compare 1Clear Enable */
emilmont 77:869cf507173a 4725
emilmont 77:869cf507173a 4726 #define TIM_CCMR1_CC2S ((uint16_t)0x0300) /*!<CC2S[1:0] bits (Capture/Compare 2 Selection) */
emilmont 77:869cf507173a 4727 #define TIM_CCMR1_CC2S_0 ((uint16_t)0x0100) /*!<Bit 0 */
emilmont 77:869cf507173a 4728 #define TIM_CCMR1_CC2S_1 ((uint16_t)0x0200) /*!<Bit 1 */
emilmont 77:869cf507173a 4729
emilmont 77:869cf507173a 4730 #define TIM_CCMR1_OC2FE ((uint16_t)0x0400) /*!<Output Compare 2 Fast enable */
emilmont 77:869cf507173a 4731 #define TIM_CCMR1_OC2PE ((uint16_t)0x0800) /*!<Output Compare 2 Preload enable */
emilmont 77:869cf507173a 4732
emilmont 77:869cf507173a 4733 #define TIM_CCMR1_OC2M ((uint16_t)0x7000) /*!<OC2M[2:0] bits (Output Compare 2 Mode) */
emilmont 77:869cf507173a 4734 #define TIM_CCMR1_OC2M_0 ((uint16_t)0x1000) /*!<Bit 0 */
emilmont 77:869cf507173a 4735 #define TIM_CCMR1_OC2M_1 ((uint16_t)0x2000) /*!<Bit 1 */
emilmont 77:869cf507173a 4736 #define TIM_CCMR1_OC2M_2 ((uint16_t)0x4000) /*!<Bit 2 */
emilmont 77:869cf507173a 4737
emilmont 77:869cf507173a 4738 #define TIM_CCMR1_OC2CE ((uint16_t)0x8000) /*!<Output Compare 2 Clear Enable */
emilmont 77:869cf507173a 4739
emilmont 77:869cf507173a 4740 /*----------------------------------------------------------------------------*/
emilmont 77:869cf507173a 4741
emilmont 77:869cf507173a 4742 #define TIM_CCMR1_IC1PSC ((uint16_t)0x000C) /*!<IC1PSC[1:0] bits (Input Capture 1 Prescaler) */
emilmont 77:869cf507173a 4743 #define TIM_CCMR1_IC1PSC_0 ((uint16_t)0x0004) /*!<Bit 0 */
emilmont 77:869cf507173a 4744 #define TIM_CCMR1_IC1PSC_1 ((uint16_t)0x0008) /*!<Bit 1 */
emilmont 77:869cf507173a 4745
emilmont 77:869cf507173a 4746 #define TIM_CCMR1_IC1F ((uint16_t)0x00F0) /*!<IC1F[3:0] bits (Input Capture 1 Filter) */
emilmont 77:869cf507173a 4747 #define TIM_CCMR1_IC1F_0 ((uint16_t)0x0010) /*!<Bit 0 */
emilmont 77:869cf507173a 4748 #define TIM_CCMR1_IC1F_1 ((uint16_t)0x0020) /*!<Bit 1 */
emilmont 77:869cf507173a 4749 #define TIM_CCMR1_IC1F_2 ((uint16_t)0x0040) /*!<Bit 2 */
emilmont 77:869cf507173a 4750 #define TIM_CCMR1_IC1F_3 ((uint16_t)0x0080) /*!<Bit 3 */
emilmont 77:869cf507173a 4751
emilmont 77:869cf507173a 4752 #define TIM_CCMR1_IC2PSC ((uint16_t)0x0C00) /*!<IC2PSC[1:0] bits (Input Capture 2 Prescaler) */
emilmont 77:869cf507173a 4753 #define TIM_CCMR1_IC2PSC_0 ((uint16_t)0x0400) /*!<Bit 0 */
emilmont 77:869cf507173a 4754 #define TIM_CCMR1_IC2PSC_1 ((uint16_t)0x0800) /*!<Bit 1 */
emilmont 77:869cf507173a 4755
emilmont 77:869cf507173a 4756 #define TIM_CCMR1_IC2F ((uint16_t)0xF000) /*!<IC2F[3:0] bits (Input Capture 2 Filter) */
emilmont 77:869cf507173a 4757 #define TIM_CCMR1_IC2F_0 ((uint16_t)0x1000) /*!<Bit 0 */
emilmont 77:869cf507173a 4758 #define TIM_CCMR1_IC2F_1 ((uint16_t)0x2000) /*!<Bit 1 */
emilmont 77:869cf507173a 4759 #define TIM_CCMR1_IC2F_2 ((uint16_t)0x4000) /*!<Bit 2 */
emilmont 77:869cf507173a 4760 #define TIM_CCMR1_IC2F_3 ((uint16_t)0x8000) /*!<Bit 3 */
emilmont 77:869cf507173a 4761
emilmont 77:869cf507173a 4762 /****************** Bit definition for TIM_CCMR2 register *******************/
emilmont 77:869cf507173a 4763 #define TIM_CCMR2_CC3S ((uint16_t)0x0003) /*!<CC3S[1:0] bits (Capture/Compare 3 Selection) */
emilmont 77:869cf507173a 4764 #define TIM_CCMR2_CC3S_0 ((uint16_t)0x0001) /*!<Bit 0 */
emilmont 77:869cf507173a 4765 #define TIM_CCMR2_CC3S_1 ((uint16_t)0x0002) /*!<Bit 1 */
emilmont 77:869cf507173a 4766
emilmont 77:869cf507173a 4767 #define TIM_CCMR2_OC3FE ((uint16_t)0x0004) /*!<Output Compare 3 Fast enable */
emilmont 77:869cf507173a 4768 #define TIM_CCMR2_OC3PE ((uint16_t)0x0008) /*!<Output Compare 3 Preload enable */
emilmont 77:869cf507173a 4769
emilmont 77:869cf507173a 4770 #define TIM_CCMR2_OC3M ((uint16_t)0x0070) /*!<OC3M[2:0] bits (Output Compare 3 Mode) */
emilmont 77:869cf507173a 4771 #define TIM_CCMR2_OC3M_0 ((uint16_t)0x0010) /*!<Bit 0 */
emilmont 77:869cf507173a 4772 #define TIM_CCMR2_OC3M_1 ((uint16_t)0x0020) /*!<Bit 1 */
emilmont 77:869cf507173a 4773 #define TIM_CCMR2_OC3M_2 ((uint16_t)0x0040) /*!<Bit 2 */
emilmont 77:869cf507173a 4774
emilmont 77:869cf507173a 4775 #define TIM_CCMR2_OC3CE ((uint16_t)0x0080) /*!<Output Compare 3 Clear Enable */
emilmont 77:869cf507173a 4776
emilmont 77:869cf507173a 4777 #define TIM_CCMR2_CC4S ((uint16_t)0x0300) /*!<CC4S[1:0] bits (Capture/Compare 4 Selection) */
emilmont 77:869cf507173a 4778 #define TIM_CCMR2_CC4S_0 ((uint16_t)0x0100) /*!<Bit 0 */
emilmont 77:869cf507173a 4779 #define TIM_CCMR2_CC4S_1 ((uint16_t)0x0200) /*!<Bit 1 */
emilmont 77:869cf507173a 4780
emilmont 77:869cf507173a 4781 #define TIM_CCMR2_OC4FE ((uint16_t)0x0400) /*!<Output Compare 4 Fast enable */
emilmont 77:869cf507173a 4782 #define TIM_CCMR2_OC4PE ((uint16_t)0x0800) /*!<Output Compare 4 Preload enable */
emilmont 77:869cf507173a 4783
emilmont 77:869cf507173a 4784 #define TIM_CCMR2_OC4M ((uint16_t)0x7000) /*!<OC4M[2:0] bits (Output Compare 4 Mode) */
emilmont 77:869cf507173a 4785 #define TIM_CCMR2_OC4M_0 ((uint16_t)0x1000) /*!<Bit 0 */
emilmont 77:869cf507173a 4786 #define TIM_CCMR2_OC4M_1 ((uint16_t)0x2000) /*!<Bit 1 */
emilmont 77:869cf507173a 4787 #define TIM_CCMR2_OC4M_2 ((uint16_t)0x4000) /*!<Bit 2 */
emilmont 77:869cf507173a 4788
emilmont 77:869cf507173a 4789 #define TIM_CCMR2_OC4CE ((uint16_t)0x8000) /*!<Output Compare 4 Clear Enable */
emilmont 77:869cf507173a 4790
emilmont 77:869cf507173a 4791 /*----------------------------------------------------------------------------*/
emilmont 77:869cf507173a 4792
emilmont 77:869cf507173a 4793 #define TIM_CCMR2_IC3PSC ((uint16_t)0x000C) /*!<IC3PSC[1:0] bits (Input Capture 3 Prescaler) */
emilmont 77:869cf507173a 4794 #define TIM_CCMR2_IC3PSC_0 ((uint16_t)0x0004) /*!<Bit 0 */
emilmont 77:869cf507173a 4795 #define TIM_CCMR2_IC3PSC_1 ((uint16_t)0x0008) /*!<Bit 1 */
emilmont 77:869cf507173a 4796
emilmont 77:869cf507173a 4797 #define TIM_CCMR2_IC3F ((uint16_t)0x00F0) /*!<IC3F[3:0] bits (Input Capture 3 Filter) */
emilmont 77:869cf507173a 4798 #define TIM_CCMR2_IC3F_0 ((uint16_t)0x0010) /*!<Bit 0 */
emilmont 77:869cf507173a 4799 #define TIM_CCMR2_IC3F_1 ((uint16_t)0x0020) /*!<Bit 1 */
emilmont 77:869cf507173a 4800 #define TIM_CCMR2_IC3F_2 ((uint16_t)0x0040) /*!<Bit 2 */
emilmont 77:869cf507173a 4801 #define TIM_CCMR2_IC3F_3 ((uint16_t)0x0080) /*!<Bit 3 */
emilmont 77:869cf507173a 4802
emilmont 77:869cf507173a 4803 #define TIM_CCMR2_IC4PSC ((uint16_t)0x0C00) /*!<IC4PSC[1:0] bits (Input Capture 4 Prescaler) */
emilmont 77:869cf507173a 4804 #define TIM_CCMR2_IC4PSC_0 ((uint16_t)0x0400) /*!<Bit 0 */
emilmont 77:869cf507173a 4805 #define TIM_CCMR2_IC4PSC_1 ((uint16_t)0x0800) /*!<Bit 1 */
emilmont 77:869cf507173a 4806
emilmont 77:869cf507173a 4807 #define TIM_CCMR2_IC4F ((uint16_t)0xF000) /*!<IC4F[3:0] bits (Input Capture 4 Filter) */
emilmont 77:869cf507173a 4808 #define TIM_CCMR2_IC4F_0 ((uint16_t)0x1000) /*!<Bit 0 */
emilmont 77:869cf507173a 4809 #define TIM_CCMR2_IC4F_1 ((uint16_t)0x2000) /*!<Bit 1 */
emilmont 77:869cf507173a 4810 #define TIM_CCMR2_IC4F_2 ((uint16_t)0x4000) /*!<Bit 2 */
emilmont 77:869cf507173a 4811 #define TIM_CCMR2_IC4F_3 ((uint16_t)0x8000) /*!<Bit 3 */
emilmont 77:869cf507173a 4812
emilmont 77:869cf507173a 4813 /******************* Bit definition for TIM_CCER register *******************/
emilmont 77:869cf507173a 4814 #define TIM_CCER_CC1E ((uint16_t)0x0001) /*!<Capture/Compare 1 output enable */
emilmont 77:869cf507173a 4815 #define TIM_CCER_CC1P ((uint16_t)0x0002) /*!<Capture/Compare 1 output Polarity */
emilmont 77:869cf507173a 4816 #define TIM_CCER_CC1NE ((uint16_t)0x0004) /*!<Capture/Compare 1 Complementary output enable */
emilmont 77:869cf507173a 4817 #define TIM_CCER_CC1NP ((uint16_t)0x0008) /*!<Capture/Compare 1 Complementary output Polarity */
emilmont 77:869cf507173a 4818 #define TIM_CCER_CC2E ((uint16_t)0x0010) /*!<Capture/Compare 2 output enable */
emilmont 77:869cf507173a 4819 #define TIM_CCER_CC2P ((uint16_t)0x0020) /*!<Capture/Compare 2 output Polarity */
emilmont 77:869cf507173a 4820 #define TIM_CCER_CC2NE ((uint16_t)0x0040) /*!<Capture/Compare 2 Complementary output enable */
emilmont 77:869cf507173a 4821 #define TIM_CCER_CC2NP ((uint16_t)0x0080) /*!<Capture/Compare 2 Complementary output Polarity */
emilmont 77:869cf507173a 4822 #define TIM_CCER_CC3E ((uint16_t)0x0100) /*!<Capture/Compare 3 output enable */
emilmont 77:869cf507173a 4823 #define TIM_CCER_CC3P ((uint16_t)0x0200) /*!<Capture/Compare 3 output Polarity */
emilmont 77:869cf507173a 4824 #define TIM_CCER_CC3NE ((uint16_t)0x0400) /*!<Capture/Compare 3 Complementary output enable */
emilmont 77:869cf507173a 4825 #define TIM_CCER_CC3NP ((uint16_t)0x0800) /*!<Capture/Compare 3 Complementary output Polarity */
emilmont 77:869cf507173a 4826 #define TIM_CCER_CC4E ((uint16_t)0x1000) /*!<Capture/Compare 4 output enable */
emilmont 77:869cf507173a 4827 #define TIM_CCER_CC4P ((uint16_t)0x2000) /*!<Capture/Compare 4 output Polarity */
emilmont 77:869cf507173a 4828 #define TIM_CCER_CC4NP ((uint16_t)0x8000) /*!<Capture/Compare 4 Complementary output Polarity */
emilmont 77:869cf507173a 4829
emilmont 77:869cf507173a 4830 /******************* Bit definition for TIM_CNT register ********************/
emilmont 77:869cf507173a 4831 #define TIM_CNT_CNT ((uint16_t)0xFFFF) /*!<Counter Value */
emilmont 77:869cf507173a 4832
emilmont 77:869cf507173a 4833 /******************* Bit definition for TIM_PSC register ********************/
emilmont 77:869cf507173a 4834 #define TIM_PSC_PSC ((uint16_t)0xFFFF) /*!<Prescaler Value */
emilmont 77:869cf507173a 4835
emilmont 77:869cf507173a 4836 /******************* Bit definition for TIM_ARR register ********************/
emilmont 77:869cf507173a 4837 #define TIM_ARR_ARR ((uint16_t)0xFFFF) /*!<actual auto-reload Value */
emilmont 77:869cf507173a 4838
emilmont 77:869cf507173a 4839 /******************* Bit definition for TIM_RCR register ********************/
emilmont 77:869cf507173a 4840 #define TIM_RCR_REP ((uint8_t)0xFF) /*!<Repetition Counter Value */
emilmont 77:869cf507173a 4841
emilmont 77:869cf507173a 4842 /******************* Bit definition for TIM_CCR1 register *******************/
emilmont 77:869cf507173a 4843 #define TIM_CCR1_CCR1 ((uint16_t)0xFFFF) /*!<Capture/Compare 1 Value */
emilmont 77:869cf507173a 4844
emilmont 77:869cf507173a 4845 /******************* Bit definition for TIM_CCR2 register *******************/
emilmont 77:869cf507173a 4846 #define TIM_CCR2_CCR2 ((uint16_t)0xFFFF) /*!<Capture/Compare 2 Value */
emilmont 77:869cf507173a 4847
emilmont 77:869cf507173a 4848 /******************* Bit definition for TIM_CCR3 register *******************/
emilmont 77:869cf507173a 4849 #define TIM_CCR3_CCR3 ((uint16_t)0xFFFF) /*!<Capture/Compare 3 Value */
emilmont 77:869cf507173a 4850
emilmont 77:869cf507173a 4851 /******************* Bit definition for TIM_CCR4 register *******************/
emilmont 77:869cf507173a 4852 #define TIM_CCR4_CCR4 ((uint16_t)0xFFFF) /*!<Capture/Compare 4 Value */
emilmont 77:869cf507173a 4853
emilmont 77:869cf507173a 4854 /******************* Bit definition for TIM_BDTR register *******************/
emilmont 77:869cf507173a 4855 #define TIM_BDTR_DTG ((uint16_t)0x00FF) /*!<DTG[0:7] bits (Dead-Time Generator set-up) */
emilmont 77:869cf507173a 4856 #define TIM_BDTR_DTG_0 ((uint16_t)0x0001) /*!<Bit 0 */
emilmont 77:869cf507173a 4857 #define TIM_BDTR_DTG_1 ((uint16_t)0x0002) /*!<Bit 1 */
emilmont 77:869cf507173a 4858 #define TIM_BDTR_DTG_2 ((uint16_t)0x0004) /*!<Bit 2 */
emilmont 77:869cf507173a 4859 #define TIM_BDTR_DTG_3 ((uint16_t)0x0008) /*!<Bit 3 */
emilmont 77:869cf507173a 4860 #define TIM_BDTR_DTG_4 ((uint16_t)0x0010) /*!<Bit 4 */
emilmont 77:869cf507173a 4861 #define TIM_BDTR_DTG_5 ((uint16_t)0x0020) /*!<Bit 5 */
emilmont 77:869cf507173a 4862 #define TIM_BDTR_DTG_6 ((uint16_t)0x0040) /*!<Bit 6 */
emilmont 77:869cf507173a 4863 #define TIM_BDTR_DTG_7 ((uint16_t)0x0080) /*!<Bit 7 */
emilmont 77:869cf507173a 4864
emilmont 77:869cf507173a 4865 #define TIM_BDTR_LOCK ((uint16_t)0x0300) /*!<LOCK[1:0] bits (Lock Configuration) */
emilmont 77:869cf507173a 4866 #define TIM_BDTR_LOCK_0 ((uint16_t)0x0100) /*!<Bit 0 */
emilmont 77:869cf507173a 4867 #define TIM_BDTR_LOCK_1 ((uint16_t)0x0200) /*!<Bit 1 */
emilmont 77:869cf507173a 4868
emilmont 77:869cf507173a 4869 #define TIM_BDTR_OSSI ((uint16_t)0x0400) /*!<Off-State Selection for Idle mode */
emilmont 77:869cf507173a 4870 #define TIM_BDTR_OSSR ((uint16_t)0x0800) /*!<Off-State Selection for Run mode */
emilmont 77:869cf507173a 4871 #define TIM_BDTR_BKE ((uint16_t)0x1000) /*!<Break enable */
emilmont 77:869cf507173a 4872 #define TIM_BDTR_BKP ((uint16_t)0x2000) /*!<Break Polarity */
emilmont 77:869cf507173a 4873 #define TIM_BDTR_AOE ((uint16_t)0x4000) /*!<Automatic Output enable */
emilmont 77:869cf507173a 4874 #define TIM_BDTR_MOE ((uint16_t)0x8000) /*!<Main Output enable */
emilmont 77:869cf507173a 4875
emilmont 77:869cf507173a 4876 /******************* Bit definition for TIM_DCR register ********************/
emilmont 77:869cf507173a 4877 #define TIM_DCR_DBA ((uint16_t)0x001F) /*!<DBA[4:0] bits (DMA Base Address) */
emilmont 77:869cf507173a 4878 #define TIM_DCR_DBA_0 ((uint16_t)0x0001) /*!<Bit 0 */
emilmont 77:869cf507173a 4879 #define TIM_DCR_DBA_1 ((uint16_t)0x0002) /*!<Bit 1 */
emilmont 77:869cf507173a 4880 #define TIM_DCR_DBA_2 ((uint16_t)0x0004) /*!<Bit 2 */
emilmont 77:869cf507173a 4881 #define TIM_DCR_DBA_3 ((uint16_t)0x0008) /*!<Bit 3 */
emilmont 77:869cf507173a 4882 #define TIM_DCR_DBA_4 ((uint16_t)0x0010) /*!<Bit 4 */
emilmont 77:869cf507173a 4883
emilmont 77:869cf507173a 4884 #define TIM_DCR_DBL ((uint16_t)0x1F00) /*!<DBL[4:0] bits (DMA Burst Length) */
emilmont 77:869cf507173a 4885 #define TIM_DCR_DBL_0 ((uint16_t)0x0100) /*!<Bit 0 */
emilmont 77:869cf507173a 4886 #define TIM_DCR_DBL_1 ((uint16_t)0x0200) /*!<Bit 1 */
emilmont 77:869cf507173a 4887 #define TIM_DCR_DBL_2 ((uint16_t)0x0400) /*!<Bit 2 */
emilmont 77:869cf507173a 4888 #define TIM_DCR_DBL_3 ((uint16_t)0x0800) /*!<Bit 3 */
emilmont 77:869cf507173a 4889 #define TIM_DCR_DBL_4 ((uint16_t)0x1000) /*!<Bit 4 */
emilmont 77:869cf507173a 4890
emilmont 77:869cf507173a 4891 /******************* Bit definition for TIM_DMAR register *******************/
emilmont 77:869cf507173a 4892 #define TIM_DMAR_DMAB ((uint16_t)0xFFFF) /*!<DMA register for burst accesses */
emilmont 77:869cf507173a 4893
emilmont 77:869cf507173a 4894 /******************* Bit definition for TIM_OR register *********************/
emilmont 77:869cf507173a 4895 #define TIM14_OR_TI1_RMP ((uint16_t)0x0003) /*!<TI1_RMP[1:0] bits (TIM14 Input 4 remap) */
emilmont 77:869cf507173a 4896 #define TIM14_OR_TI1_RMP_0 ((uint16_t)0x0001) /*!<Bit 0 */
emilmont 77:869cf507173a 4897 #define TIM14_OR_TI1_RMP_1 ((uint16_t)0x0002) /*!<Bit 1 */
emilmont 77:869cf507173a 4898
emilmont 77:869cf507173a 4899
emilmont 77:869cf507173a 4900 /******************************************************************************/
emilmont 77:869cf507173a 4901 /* */
emilmont 77:869cf507173a 4902 /* Universal Synchronous Asynchronous Receiver Transmitter (USART) */
emilmont 77:869cf507173a 4903 /* */
emilmont 77:869cf507173a 4904 /******************************************************************************/
emilmont 77:869cf507173a 4905 /****************** Bit definition for USART_CR1 register *******************/
emilmont 77:869cf507173a 4906 #define USART_CR1_UE ((uint32_t)0x00000001) /*!< USART Enable */
emilmont 77:869cf507173a 4907 #define USART_CR1_UESM ((uint32_t)0x00000002) /*!< USART Enable in STOP Mode */
emilmont 77:869cf507173a 4908 #define USART_CR1_RE ((uint32_t)0x00000004) /*!< Receiver Enable */
emilmont 77:869cf507173a 4909 #define USART_CR1_TE ((uint32_t)0x00000008) /*!< Transmitter Enable */
emilmont 77:869cf507173a 4910 #define USART_CR1_IDLEIE ((uint32_t)0x00000010) /*!< IDLE Interrupt Enable */
emilmont 77:869cf507173a 4911 #define USART_CR1_RXNEIE ((uint32_t)0x00000020) /*!< RXNE Interrupt Enable */
emilmont 77:869cf507173a 4912 #define USART_CR1_TCIE ((uint32_t)0x00000040) /*!< Transmission Complete Interrupt Enable */
emilmont 77:869cf507173a 4913 #define USART_CR1_TXEIE ((uint32_t)0x00000080) /*!< TXE Interrupt Enable */
emilmont 77:869cf507173a 4914 #define USART_CR1_PEIE ((uint32_t)0x00000100) /*!< PE Interrupt Enable */
emilmont 77:869cf507173a 4915 #define USART_CR1_PS ((uint32_t)0x00000200) /*!< Parity Selection */
emilmont 77:869cf507173a 4916 #define USART_CR1_PCE ((uint32_t)0x00000400) /*!< Parity Control Enable */
emilmont 77:869cf507173a 4917 #define USART_CR1_WAKE ((uint32_t)0x00000800) /*!< Receiver Wakeup method */
emilmont 77:869cf507173a 4918 #define USART_CR1_M ((uint32_t)0x00001000) /*!< Word length */
emilmont 77:869cf507173a 4919 #define USART_CR1_MME ((uint32_t)0x00002000) /*!< Mute Mode Enable */
emilmont 77:869cf507173a 4920 #define USART_CR1_CMIE ((uint32_t)0x00004000) /*!< Character match interrupt enable */
emilmont 77:869cf507173a 4921 #define USART_CR1_OVER8 ((uint32_t)0x00008000) /*!< Oversampling by 8-bit or 16-bit mode */
emilmont 77:869cf507173a 4922 #define USART_CR1_DEDT ((uint32_t)0x001F0000) /*!< DEDT[4:0] bits (Driver Enable Deassertion Time) */
emilmont 77:869cf507173a 4923 #define USART_CR1_DEDT_0 ((uint32_t)0x00010000) /*!< Bit 0 */
emilmont 77:869cf507173a 4924 #define USART_CR1_DEDT_1 ((uint32_t)0x00020000) /*!< Bit 1 */
emilmont 77:869cf507173a 4925 #define USART_CR1_DEDT_2 ((uint32_t)0x00040000) /*!< Bit 2 */
emilmont 77:869cf507173a 4926 #define USART_CR1_DEDT_3 ((uint32_t)0x00080000) /*!< Bit 3 */
emilmont 77:869cf507173a 4927 #define USART_CR1_DEDT_4 ((uint32_t)0x00100000) /*!< Bit 4 */
emilmont 77:869cf507173a 4928 #define USART_CR1_DEAT ((uint32_t)0x03E00000) /*!< DEAT[4:0] bits (Driver Enable Assertion Time) */
emilmont 77:869cf507173a 4929 #define USART_CR1_DEAT_0 ((uint32_t)0x00200000) /*!< Bit 0 */
emilmont 77:869cf507173a 4930 #define USART_CR1_DEAT_1 ((uint32_t)0x00400000) /*!< Bit 1 */
emilmont 77:869cf507173a 4931 #define USART_CR1_DEAT_2 ((uint32_t)0x00800000) /*!< Bit 2 */
emilmont 77:869cf507173a 4932 #define USART_CR1_DEAT_3 ((uint32_t)0x01000000) /*!< Bit 3 */
emilmont 77:869cf507173a 4933 #define USART_CR1_DEAT_4 ((uint32_t)0x02000000) /*!< Bit 4 */
emilmont 77:869cf507173a 4934 #define USART_CR1_RTOIE ((uint32_t)0x04000000) /*!< Receive Time Out interrupt enable */
emilmont 77:869cf507173a 4935 #define USART_CR1_EOBIE ((uint32_t)0x08000000) /*!< End of Block interrupt enable */
emilmont 77:869cf507173a 4936
emilmont 77:869cf507173a 4937 /****************** Bit definition for USART_CR2 register *******************/
emilmont 77:869cf507173a 4938 #define USART_CR2_ADDM7 ((uint32_t)0x00000010) /*!< 7-bit or 4-bit Address Detection */
emilmont 77:869cf507173a 4939 #define USART_CR2_LBDL ((uint32_t)0x00000020) /*!< LIN Break Detection Length */
emilmont 77:869cf507173a 4940 #define USART_CR2_LBDIE ((uint32_t)0x00000040) /*!< LIN Break Detection Interrupt Enable */
emilmont 77:869cf507173a 4941 #define USART_CR2_LBCL ((uint32_t)0x00000100) /*!< Last Bit Clock pulse */
emilmont 77:869cf507173a 4942 #define USART_CR2_CPHA ((uint32_t)0x00000200) /*!< Clock Phase */
emilmont 77:869cf507173a 4943 #define USART_CR2_CPOL ((uint32_t)0x00000400) /*!< Clock Polarity */
emilmont 77:869cf507173a 4944 #define USART_CR2_CLKEN ((uint32_t)0x00000800) /*!< Clock Enable */
emilmont 77:869cf507173a 4945 #define USART_CR2_STOP ((uint32_t)0x00003000) /*!< STOP[1:0] bits (STOP bits) */
emilmont 77:869cf507173a 4946 #define USART_CR2_STOP_0 ((uint32_t)0x00001000) /*!< Bit 0 */
emilmont 77:869cf507173a 4947 #define USART_CR2_STOP_1 ((uint32_t)0x00002000) /*!< Bit 1 */
emilmont 77:869cf507173a 4948 #define USART_CR2_LINEN ((uint32_t)0x00004000) /*!< LIN mode enable */
emilmont 77:869cf507173a 4949 #define USART_CR2_SWAP ((uint32_t)0x00008000) /*!< SWAP TX/RX pins */
emilmont 77:869cf507173a 4950 #define USART_CR2_RXINV ((uint32_t)0x00010000) /*!< RX pin active level inversion */
emilmont 77:869cf507173a 4951 #define USART_CR2_TXINV ((uint32_t)0x00020000) /*!< TX pin active level inversion */
emilmont 77:869cf507173a 4952 #define USART_CR2_DATAINV ((uint32_t)0x00040000) /*!< Binary data inversion */
emilmont 77:869cf507173a 4953 #define USART_CR2_MSBFIRST ((uint32_t)0x00080000) /*!< Most Significant Bit First */
emilmont 77:869cf507173a 4954 #define USART_CR2_ABREN ((uint32_t)0x00100000) /*!< Auto Baud-Rate Enable*/
emilmont 77:869cf507173a 4955 #define USART_CR2_ABRMODE ((uint32_t)0x00600000) /*!< ABRMOD[1:0] bits (Auto Baud-Rate Mode) */
emilmont 77:869cf507173a 4956 #define USART_CR2_ABRMODE_0 ((uint32_t)0x00200000) /*!< Bit 0 */
emilmont 77:869cf507173a 4957 #define USART_CR2_ABRMODE_1 ((uint32_t)0x00400000) /*!< Bit 1 */
emilmont 77:869cf507173a 4958 #define USART_CR2_RTOEN ((uint32_t)0x00800000) /*!< Receiver Time-Out enable */
emilmont 77:869cf507173a 4959 #define USART_CR2_ADD ((uint32_t)0xFF000000) /*!< Address of the USART node */
emilmont 77:869cf507173a 4960
emilmont 77:869cf507173a 4961 /****************** Bit definition for USART_CR3 register *******************/
emilmont 77:869cf507173a 4962 #define USART_CR3_EIE ((uint32_t)0x00000001) /*!< Error Interrupt Enable */
emilmont 77:869cf507173a 4963 #define USART_CR3_IREN ((uint32_t)0x00000002) /*!< IrDA mode Enable */
emilmont 77:869cf507173a 4964 #define USART_CR3_IRLP ((uint32_t)0x00000004) /*!< IrDA Low-Power */
emilmont 77:869cf507173a 4965 #define USART_CR3_HDSEL ((uint32_t)0x00000008) /*!< Half-Duplex Selection */
emilmont 77:869cf507173a 4966 #define USART_CR3_NACK ((uint32_t)0x00000010) /*!< SmartCard NACK enable */
emilmont 77:869cf507173a 4967 #define USART_CR3_SCEN ((uint32_t)0x00000020) /*!< SmartCard mode enable */
emilmont 77:869cf507173a 4968 #define USART_CR3_DMAR ((uint32_t)0x00000040) /*!< DMA Enable Receiver */
emilmont 77:869cf507173a 4969 #define USART_CR3_DMAT ((uint32_t)0x00000080) /*!< DMA Enable Transmitter */
emilmont 77:869cf507173a 4970 #define USART_CR3_RTSE ((uint32_t)0x00000100) /*!< RTS Enable */
emilmont 77:869cf507173a 4971 #define USART_CR3_CTSE ((uint32_t)0x00000200) /*!< CTS Enable */
emilmont 77:869cf507173a 4972 #define USART_CR3_CTSIE ((uint32_t)0x00000400) /*!< CTS Interrupt Enable */
emilmont 77:869cf507173a 4973 #define USART_CR3_ONEBIT ((uint32_t)0x00000800) /*!< One sample bit method enable */
emilmont 77:869cf507173a 4974 #define USART_CR3_OVRDIS ((uint32_t)0x00001000) /*!< Overrun Disable */
emilmont 77:869cf507173a 4975 #define USART_CR3_DDRE ((uint32_t)0x00002000) /*!< DMA Disable on Reception Error */
emilmont 77:869cf507173a 4976 #define USART_CR3_DEM ((uint32_t)0x00004000) /*!< Driver Enable Mode */
emilmont 77:869cf507173a 4977 #define USART_CR3_DEP ((uint32_t)0x00008000) /*!< Driver Enable Polarity Selection */
emilmont 77:869cf507173a 4978 #define USART_CR3_SCARCNT ((uint32_t)0x000E0000) /*!< SCARCNT[2:0] bits (SmartCard Auto-Retry Count) */
emilmont 77:869cf507173a 4979 #define USART_CR3_SCARCNT_0 ((uint32_t)0x00020000) /*!< Bit 0 */
emilmont 77:869cf507173a 4980 #define USART_CR3_SCARCNT_1 ((uint32_t)0x00040000) /*!< Bit 1 */
emilmont 77:869cf507173a 4981 #define USART_CR3_SCARCNT_2 ((uint32_t)0x00080000) /*!< Bit 2 */
emilmont 77:869cf507173a 4982 #define USART_CR3_WUS ((uint32_t)0x00300000) /*!< WUS[1:0] bits (Wake UP Interrupt Flag Selection) */
emilmont 77:869cf507173a 4983 #define USART_CR3_WUS_0 ((uint32_t)0x00100000) /*!< Bit 0 */
emilmont 77:869cf507173a 4984 #define USART_CR3_WUS_1 ((uint32_t)0x00200000) /*!< Bit 1 */
emilmont 77:869cf507173a 4985 #define USART_CR3_WUFIE ((uint32_t)0x00400000) /*!< Wake Up Interrupt Enable */
emilmont 77:869cf507173a 4986
emilmont 77:869cf507173a 4987 /****************** Bit definition for USART_BRR register *******************/
emilmont 77:869cf507173a 4988 #define USART_BRR_DIV_FRACTION ((uint16_t)0x000F) /*!< Fraction of USARTDIV */
emilmont 77:869cf507173a 4989 #define USART_BRR_DIV_MANTISSA ((uint16_t)0xFFF0) /*!< Mantissa of USARTDIV */
emilmont 77:869cf507173a 4990
emilmont 77:869cf507173a 4991 /****************** Bit definition for USART_GTPR register ******************/
emilmont 77:869cf507173a 4992 #define USART_GTPR_PSC ((uint16_t)0x00FF) /*!< PSC[7:0] bits (Prescaler value) */
emilmont 77:869cf507173a 4993 #define USART_GTPR_GT ((uint16_t)0xFF00) /*!< GT[7:0] bits (Guard time value) */
emilmont 77:869cf507173a 4994
emilmont 77:869cf507173a 4995
emilmont 77:869cf507173a 4996 /******************* Bit definition for USART_RTOR register *****************/
emilmont 77:869cf507173a 4997 #define USART_RTOR_RTO ((uint32_t)0x00FFFFFF) /*!< Receiver Time Out Value */
emilmont 77:869cf507173a 4998 #define USART_RTOR_BLEN ((uint32_t)0xFF000000) /*!< Block Length */
emilmont 77:869cf507173a 4999
emilmont 77:869cf507173a 5000 /******************* Bit definition for USART_RQR register ******************/
emilmont 77:869cf507173a 5001 #define USART_RQR_ABRRQ ((uint16_t)0x0001) /*!< Auto-Baud Rate Request */
emilmont 77:869cf507173a 5002 #define USART_RQR_SBKRQ ((uint16_t)0x0002) /*!< Send Break Request */
emilmont 77:869cf507173a 5003 #define USART_RQR_MMRQ ((uint16_t)0x0004) /*!< Mute Mode Request */
emilmont 77:869cf507173a 5004 #define USART_RQR_RXFRQ ((uint16_t)0x0008) /*!< Receive Data flush Request */
emilmont 77:869cf507173a 5005 #define USART_RQR_TXFRQ ((uint16_t)0x0010) /*!< Transmit data flush Request */
emilmont 77:869cf507173a 5006
emilmont 77:869cf507173a 5007 /******************* Bit definition for USART_ISR register ******************/
emilmont 77:869cf507173a 5008 #define USART_ISR_PE ((uint32_t)0x00000001) /*!< Parity Error */
emilmont 77:869cf507173a 5009 #define USART_ISR_FE ((uint32_t)0x00000002) /*!< Framing Error */
emilmont 77:869cf507173a 5010 #define USART_ISR_NE ((uint32_t)0x00000004) /*!< Noise detected Flag */
emilmont 77:869cf507173a 5011 #define USART_ISR_ORE ((uint32_t)0x00000008) /*!< OverRun Error */
emilmont 77:869cf507173a 5012 #define USART_ISR_IDLE ((uint32_t)0x00000010) /*!< IDLE line detected */
emilmont 77:869cf507173a 5013 #define USART_ISR_RXNE ((uint32_t)0x00000020) /*!< Read Data Register Not Empty */
emilmont 77:869cf507173a 5014 #define USART_ISR_TC ((uint32_t)0x00000040) /*!< Transmission Complete */
emilmont 77:869cf507173a 5015 #define USART_ISR_TXE ((uint32_t)0x00000080) /*!< Transmit Data Register Empty */
emilmont 77:869cf507173a 5016 #define USART_ISR_LBD ((uint32_t)0x00000100) /*!< LIN Break Detection Flag */
emilmont 77:869cf507173a 5017 #define USART_ISR_CTSIF ((uint32_t)0x00000200) /*!< CTS interrupt flag */
emilmont 77:869cf507173a 5018 #define USART_ISR_CTS ((uint32_t)0x00000400) /*!< CTS flag */
emilmont 77:869cf507173a 5019 #define USART_ISR_RTOF ((uint32_t)0x00000800) /*!< Receiver Time Out */
emilmont 77:869cf507173a 5020 #define USART_ISR_EOBF ((uint32_t)0x00001000) /*!< End Of Block Flag */
emilmont 77:869cf507173a 5021 #define USART_ISR_ABRE ((uint32_t)0x00004000) /*!< Auto-Baud Rate Error */
emilmont 77:869cf507173a 5022 #define USART_ISR_ABRF ((uint32_t)0x00008000) /*!< Auto-Baud Rate Flag */
emilmont 77:869cf507173a 5023 #define USART_ISR_BUSY ((uint32_t)0x00010000) /*!< Busy Flag */
emilmont 77:869cf507173a 5024 #define USART_ISR_CMF ((uint32_t)0x00020000) /*!< Character Match Flag */
emilmont 77:869cf507173a 5025 #define USART_ISR_SBKF ((uint32_t)0x00040000) /*!< Send Break Flag */
emilmont 77:869cf507173a 5026 #define USART_ISR_RWU ((uint32_t)0x00080000) /*!< Receive Wake Up from mute mode Flag */
emilmont 77:869cf507173a 5027 #define USART_ISR_WUF ((uint32_t)0x00100000) /*!< Wake Up from stop mode Flag */
emilmont 77:869cf507173a 5028 #define USART_ISR_TEACK ((uint32_t)0x00200000) /*!< Transmit Enable Acknowledge Flag */
emilmont 77:869cf507173a 5029 #define USART_ISR_REACK ((uint32_t)0x00400000) /*!< Receive Enable Acknowledge Flag */
emilmont 77:869cf507173a 5030
emilmont 77:869cf507173a 5031 /******************* Bit definition for USART_ICR register ******************/
emilmont 77:869cf507173a 5032 #define USART_ICR_PECF ((uint32_t)0x00000001) /*!< Parity Error Clear Flag */
emilmont 77:869cf507173a 5033 #define USART_ICR_FECF ((uint32_t)0x00000002) /*!< Framing Error Clear Flag */
emilmont 77:869cf507173a 5034 #define USART_ICR_NCF ((uint32_t)0x00000004) /*!< Noise detected Clear Flag */
emilmont 77:869cf507173a 5035 #define USART_ICR_ORECF ((uint32_t)0x00000008) /*!< OverRun Error Clear Flag */
emilmont 77:869cf507173a 5036 #define USART_ICR_IDLECF ((uint32_t)0x00000010) /*!< IDLE line detected Clear Flag */
emilmont 77:869cf507173a 5037 #define USART_ICR_TCCF ((uint32_t)0x00000040) /*!< Transmission Complete Clear Flag */
emilmont 77:869cf507173a 5038 #define USART_ICR_LBDCF ((uint32_t)0x00000100) /*!< LIN Break Detection Clear Flag */
emilmont 77:869cf507173a 5039 #define USART_ICR_CTSCF ((uint32_t)0x00000200) /*!< CTS Interrupt Clear Flag */
emilmont 77:869cf507173a 5040 #define USART_ICR_RTOCF ((uint32_t)0x00000800) /*!< Receiver Time Out Clear Flag */
emilmont 77:869cf507173a 5041 #define USART_ICR_EOBCF ((uint32_t)0x00001000) /*!< End Of Block Clear Flag */
emilmont 77:869cf507173a 5042 #define USART_ICR_CMCF ((uint32_t)0x00020000) /*!< Character Match Clear Flag */
emilmont 77:869cf507173a 5043 #define USART_ICR_WUCF ((uint32_t)0x00100000) /*!< Wake Up from stop mode Clear Flag */
emilmont 77:869cf507173a 5044
emilmont 77:869cf507173a 5045 /******************* Bit definition for USART_RDR register ******************/
emilmont 77:869cf507173a 5046 #define USART_RDR_RDR ((uint16_t)0x01FF) /*!< RDR[8:0] bits (Receive Data value) */
emilmont 77:869cf507173a 5047
emilmont 77:869cf507173a 5048 /******************* Bit definition for USART_TDR register ******************/
emilmont 77:869cf507173a 5049 #define USART_TDR_TDR ((uint16_t)0x01FF) /*!< TDR[8:0] bits (Transmit Data value) */
emilmont 77:869cf507173a 5050
emilmont 77:869cf507173a 5051 /******************************************************************************/
emilmont 77:869cf507173a 5052 /* */
emilmont 77:869cf507173a 5053 /* Window WATCHDOG (WWDG) */
emilmont 77:869cf507173a 5054 /* */
emilmont 77:869cf507173a 5055 /******************************************************************************/
emilmont 77:869cf507173a 5056
emilmont 77:869cf507173a 5057 /******************* Bit definition for WWDG_CR register ********************/
emilmont 77:869cf507173a 5058 #define WWDG_CR_T ((uint8_t)0x7F) /*!< T[6:0] bits (7-Bit counter (MSB to LSB)) */
emilmont 77:869cf507173a 5059 #define WWDG_CR_T0 ((uint8_t)0x01) /*!< Bit 0 */
emilmont 77:869cf507173a 5060 #define WWDG_CR_T1 ((uint8_t)0x02) /*!< Bit 1 */
emilmont 77:869cf507173a 5061 #define WWDG_CR_T2 ((uint8_t)0x04) /*!< Bit 2 */
emilmont 77:869cf507173a 5062 #define WWDG_CR_T3 ((uint8_t)0x08) /*!< Bit 3 */
emilmont 77:869cf507173a 5063 #define WWDG_CR_T4 ((uint8_t)0x10) /*!< Bit 4 */
emilmont 77:869cf507173a 5064 #define WWDG_CR_T5 ((uint8_t)0x20) /*!< Bit 5 */
emilmont 77:869cf507173a 5065 #define WWDG_CR_T6 ((uint8_t)0x40) /*!< Bit 6 */
emilmont 77:869cf507173a 5066
emilmont 77:869cf507173a 5067 #define WWDG_CR_WDGA ((uint8_t)0x80) /*!< Activation bit */
emilmont 77:869cf507173a 5068
emilmont 77:869cf507173a 5069 /******************* Bit definition for WWDG_CFR register *******************/
emilmont 77:869cf507173a 5070 #define WWDG_CFR_W ((uint16_t)0x007F) /*!< W[6:0] bits (7-bit window value) */
emilmont 77:869cf507173a 5071 #define WWDG_CFR_W0 ((uint16_t)0x0001) /*!< Bit 0 */
emilmont 77:869cf507173a 5072 #define WWDG_CFR_W1 ((uint16_t)0x0002) /*!< Bit 1 */
emilmont 77:869cf507173a 5073 #define WWDG_CFR_W2 ((uint16_t)0x0004) /*!< Bit 2 */
emilmont 77:869cf507173a 5074 #define WWDG_CFR_W3 ((uint16_t)0x0008) /*!< Bit 3 */
emilmont 77:869cf507173a 5075 #define WWDG_CFR_W4 ((uint16_t)0x0010) /*!< Bit 4 */
emilmont 77:869cf507173a 5076 #define WWDG_CFR_W5 ((uint16_t)0x0020) /*!< Bit 5 */
emilmont 77:869cf507173a 5077 #define WWDG_CFR_W6 ((uint16_t)0x0040) /*!< Bit 6 */
emilmont 77:869cf507173a 5078
emilmont 77:869cf507173a 5079 #define WWDG_CFR_WDGTB ((uint16_t)0x0180) /*!< WDGTB[1:0] bits (Timer Base) */
emilmont 77:869cf507173a 5080 #define WWDG_CFR_WDGTB0 ((uint16_t)0x0080) /*!< Bit 0 */
emilmont 77:869cf507173a 5081 #define WWDG_CFR_WDGTB1 ((uint16_t)0x0100) /*!< Bit 1 */
emilmont 77:869cf507173a 5082
emilmont 77:869cf507173a 5083 #define WWDG_CFR_EWI ((uint16_t)0x0200) /*!< Early Wakeup Interrupt */
emilmont 77:869cf507173a 5084
emilmont 77:869cf507173a 5085 /******************* Bit definition for WWDG_SR register ********************/
emilmont 77:869cf507173a 5086 #define WWDG_SR_EWIF ((uint8_t)0x01) /*!< Early Wakeup Interrupt Flag */
emilmont 77:869cf507173a 5087
emilmont 77:869cf507173a 5088 /**
emilmont 77:869cf507173a 5089 * @}
emilmont 77:869cf507173a 5090 */
emilmont 77:869cf507173a 5091
emilmont 77:869cf507173a 5092 /**
emilmont 77:869cf507173a 5093 * @}
emilmont 77:869cf507173a 5094 */
emilmont 77:869cf507173a 5095
emilmont 77:869cf507173a 5096 #ifdef USE_STDPERIPH_DRIVER
emilmont 77:869cf507173a 5097 #include "stm32f0xx_conf.h"
emilmont 77:869cf507173a 5098 #endif
emilmont 77:869cf507173a 5099
emilmont 77:869cf507173a 5100 /** @addtogroup Exported_macro
emilmont 77:869cf507173a 5101 * @{
emilmont 77:869cf507173a 5102 */
emilmont 77:869cf507173a 5103 /**
emilmont 77:869cf507173a 5104 * @}
emilmont 77:869cf507173a 5105 */
emilmont 77:869cf507173a 5106
emilmont 77:869cf507173a 5107 #ifdef __cplusplus
emilmont 77:869cf507173a 5108 }
emilmont 77:869cf507173a 5109 #endif
emilmont 77:869cf507173a 5110
emilmont 77:869cf507173a 5111 #endif /* __STM32F0XX_H */
emilmont 77:869cf507173a 5112
emilmont 77:869cf507173a 5113 /**
emilmont 77:869cf507173a 5114 * @}
emilmont 77:869cf507173a 5115 */
emilmont 77:869cf507173a 5116
emilmont 77:869cf507173a 5117 /**
emilmont 77:869cf507173a 5118 * @}
emilmont 77:869cf507173a 5119 */
emilmont 77:869cf507173a 5120
emilmont 77:869cf507173a 5121 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/