//////////////////////////////////////////////////////////////////////////////// /// @file reg_syscfg.h /// @author AE TEAM /// @brief THIS FILE CONTAINS ALL THE FUNCTIONS PROTOTYPES FOR THE SERIES OF /// MM32 FIRMWARE LIBRARY. //////////////////////////////////////////////////////////////////////////////// /// @attention /// /// THE EXISTING FIRMWARE IS ONLY FOR REFERENCE, WHICH IS DESIGNED TO PROVIDE /// CUSTOMERS WITH CODING INFORMATION ABOUT THEIR PRODUCTS SO THEY CAN SAVE /// TIME. THEREFORE, MINDMOTION SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT OR /// CONSEQUENTIAL DAMAGES ABOUT ANY CLAIMS ARISING OUT OF THE CONTENT OF SUCH /// HARDWARE AND/OR THE USE OF THE CODING INFORMATION CONTAINED HEREIN IN /// CONNECTION WITH PRODUCTS MADE BY CUSTOMERS. /// ///

© COPYRIGHT MINDMOTION

//////////////////////////////////////////////////////////////////////////////// // Define to prevent recursive inclusion #ifndef __REG_SYSCFG_H #define __REG_SYSCFG_H // Files includes #include #include #include "types.h" #if defined ( __CC_ARM ) #pragma anon_unions #endif #define SYSCFG_BASE (APB2PERIPH_BASE + 0x0000) ///< Base Address: 0x40010000 //////////////////////////////////////////////////////////////////////////////// /// @brief SysTem Configuration Register Structure Definition //////////////////////////////////////////////////////////////////////////////// typedef struct { union { __IO u32 CFGR; ///< SYSCFG configuration register offset: 0x00 __IO u32 CFGR1; }; __IO u32 RESERVED0x04; ///< RESERVED register offset: 0x04 __IO u32 EXTICR[4]; ///< SYSCFG configuration register offset: 0x08-0x14 __IO u32 CFGR2; ///< SYSCFG configuration2 register offset: 0x18 __IO u32 PDETCSR; ///< SYSCFG Power Detect configuration stautus reg offset: 0x1C __IO u32 VOSDLY; ///< SYSCFG VOSDLY Counter register offset: 0x20 } SYSCFG_TypeDef; #define SYSCFG ((SYSCFG_TypeDef *) SYSCFG_BASE) //////////////////////////////////////////////////////////////////////////////// ///@brief System Configuration (SYSCFG) //////////////////////////////////////////////////////////////////////////////// /// @brief SYSCFG_CFGR Register Bit definition #define SYSCFG_CFGR_MEM_MODE_Pos (0) #define SYSCFG_CFGR_MEM_MODE ((u32)0x00000003) ///< SYSCFG_Memory Remap Config #define SYSCFG_CFGR_MEM_MODE_0 ((u32)0x00000001) ///< SYSCFG_Memory Remap Config Bit 0 #define SYSCFG_CFGR_MEM_MODE_1 ((u32)0x00000002) ///< SYSCFG_Memory Remap Config Bit 1 /// #define SYSCFG_CFGR_FSMC_SYNC_EN_Pos (27) #define SYSCFG_CFGR_FSMC_SYNC_EN (0x01U << SYSCFG_CFGR_FSMC_SYNC_EN_Pos)///< FSMC SYNC Enable #define SYSCFG_CFGR_FSMC_AF_ADDR_Pos (28) #define SYSCFG_CFGR_FSMC_AF_ADDR (0x01U << SYSCFG_CFGR_FSMC_AF_ADDR_Pos)///< FSMC Databus AF Address #define SYSCFG_CFGR_FSMC_MODE_Pos (29) #define SYSCFG_CFGR_FSMC_MODE ((u32)0x03<