#ifndef _FC7XXX_FTU_NU_Tztufn24_REGS_H_ #define _FC7XXX_FTU_NU_Tztufn24_REGS_H_ #ifdef __cplusplus extern "C" { #endif /* ---------------------------------------------------------------------------- -- FTU Peripheral Access Layer ---------------------------------------------------------------------------- */ /*! * @addtogroup FTU_Peripheral_Access_Layer FTU Peripheral Access Layer * @{ */ /** FTU - Size of Registers Arrays */ #define FTU_CHANNEL_CONTROLS_COUNT 8u /** FTU - Register Layout Typedef */ typedef struct { __IO uint32_t SC ; /* Status And Control, offset: 0x0 */ __IO uint32_t CNT ; /* Counter, offset: 0x4 */ __IO uint32_t MOD ; /* Modulo, offset: 0x8 */ struct { __IO uint32_t CSCn ; /* Channel n control and status, offset: 0xc */ __IO uint32_t CVn ; /* Channel n value, offset: 0x10 */ }CONTROLS[FTU_CHANNEL_CONTROLS_COUNT]; __IO uint32_t CNTIN ; /* Counter Initial Value, offset: 0x4C */ __IO uint32_t STATUS ; /* Capture and Compare Status, offset: 0x50 */ __IO uint32_t MODE ; /* Mode Selection, offset: 0x54 */ __IO uint32_t SYNC ; /* Synchronization, offset: 0x58 */ __IO uint32_t OUTINIT ; /* Initial State For Channels Output, offset: 0x5C */ __IO uint32_t OUTMASK ; /* Output Mask, offset: 0x60 */ __IO uint32_t CHCTRL ; /* Channel control, offset: 0x64 */ __IO uint32_t DEADTIME ; /* Deadtime Configuration, offset: 0x68 */ __IO uint32_t TRIGCONF ; /* FTU Trigger out configuration, offset: 0x6C */ __IO uint32_t POL ; /* Polarity, offset: 0x70 */ __IO uint32_t FMS ; /* Fault Mode Status, offset: 0x74 */ __IO uint32_t FILTER ; /* Input Capture Filter Control, offset: 0x78 */ __IO uint32_t FLTCTRL ; /* Fault Control, offset: 0x7C */ __IO uint32_t QDCTRL ; /* Quadrature Decoder Control And Status, offset: 0x80 */ __IO uint32_t CONF ; /* Configuration, offset: 0x84 */ __IO uint32_t FLTPOL ; /* FTU Fault Input Polarity, offset: 0x88 */ __IO uint32_t SYNCONF ; /* Synchronization Configuration, offset: 0x8C */ __IO uint32_t INVCTRL ; /* FTU Inverting Control, offset: 0x90 */ __IO uint32_t SWOCTRL ; /* FTU Software Output Control, offset: 0x94 */ __IO uint32_t PWMLOAD ; /* FTU PWM Load, offset: 0x98 */ uint8_t RESERVED_0[4]; __IO uint32_t PAIRDEADTIME0 ; /* Pair (n) Deadtime Configuration, offset: 0xa0 */ uint8_t RESERVED_1[4]; __IO uint32_t PAIRDEADTIME1 ; /* Pair (n) Deadtime Configuration, offset: 0xa8 */ uint8_t RESERVED_2[4]; __IO uint32_t PAIRDEADTIME2 ; /* Pair (n) Deadtime Configuration, offset: 0xb0 */ uint8_t RESERVED_3[4]; __IO uint32_t PAIRDEADTIME3 ; /* Pair (n) Deadtime Configuration, offset: 0xb8 */ } FTU_Type, *FTU_MemMapPtr; /** Number of instances of the FTU module. */ #define FTU_INSTANCE_COUNT (8u) /* FTU - Peripheral instance base addresses */ /** Peripheral FTU0 base address */ #define FTU0_BASE (0x4005c000u) /** Peripheral FTU0 base pointer */ #define FTU0 ((FTU_Type *)FTU0_BASE) /** Peripheral FTU1 base address */ #define FTU1_BASE (0x4005d000u) /** Peripheral FTU1 base pointer */ #define FTU1 ((FTU_Type *)FTU1_BASE) /** Peripheral FTU2 base address */ #define FTU2_BASE (0x4005e000u) /** Peripheral FTU2 base pointer */ #define FTU2 ((FTU_Type *)FTU2_BASE) /** Peripheral FTU3 base address */ #define FTU3_BASE (0x4005f000u) /** Peripheral FTU3 base pointer */ #define FTU3 ((FTU_Type *)FTU3_BASE) /** Peripheral FTU4 base address */ #define FTU4_BASE (0x4045f000u) /** Peripheral FTU4 base pointer */ #define FTU4 ((FTU_Type *)FTU4_BASE) /** Peripheral FTU5 base address */ #define FTU5_BASE (0x40460000u) /** Peripheral FTU5 base pointer */ #define FTU5 ((FTU_Type *)FTU5_BASE) /** Peripheral FTU6 base address */ #define FTU6_BASE (0x40461000u) /** Peripheral FTU6 base pointer */ #define FTU6 ((FTU_Type *)FTU6_BASE) /** Peripheral FTU7 base address */ #define FTU7_BASE (0x40462000u) /** Peripheral FTU7 base pointer */ #define FTU7 ((FTU_Type *)FTU7_BASE) /** Array initializer of FTU peripheral base addresses */ #define FTU_BASE_ADDRS {FTU0_BASE, FTU1_BASE, FTU2_BASE, FTU3_BASE, FTU4_BASE, FTU5_BASE, FTU6_BASE, FTU7_BASE} /** Array initializer of FTU peripheral base pointers */ #define FTU_BASE_PTRS {FTU0, FTU1, FTU2, FTU3, FTU4, FTU5, FTU6, FTU7} // need fill by yourself ///** Number of interrupt vector arrays for the FTU module. */ //#define FTU_IRQS_ARR_COUNT (1u) ///** Number of interrupt channels for the FTU module. */ //#define FTU_IRQS_CH_COUNT (1u) ///** Interrupt vectors for the FTU peripheral type */ //#define FTU_IRQS {FTU0_IRQn, FTU1_IRQn, FTU2_IRQn, FTU3_IRQn, FTU4_IRQn, FTU5_IRQn, FTU6_IRQn, FTU7_IRQn, FTU8_IRQn, FTU9_IRQn, FTU10_IRQn, FTU11_IRQn} /* ---------------------------------------------------------------------------- -- FTU Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup FTU_Register_Masks FTU Register Masks * @{ */ /* SC Bit Fields */ #define FTU_SC_UPDOWN_DIS_MASK 0xC0000000u #define FTU_SC_UPDOWN_DIS_SHIFT 30u #define FTU_SC_UPDOWN_DIS_WIDTH 2u #define FTU_SC_UPDOWN_DIS(x) (((uint32_t)(((uint32_t)(x))<