123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266 |
- #ifndef _SAML11_PM_COMPONENT_H_
- #define _SAML11_PM_COMPONENT_H_
- #define _SAML11_PM_COMPONENT_
- #define PM_U2240
- #define REV_PM 0x310
- #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
- typedef union {
- struct {
- uint8_t SLEEPMODE:3;
- uint8_t :5;
- } bit;
- uint8_t reg;
- } PM_SLEEPCFG_Type;
- #endif
- #define PM_SLEEPCFG_OFFSET (0x01)
- #define PM_SLEEPCFG_RESETVALUE _U_(0x02)
- #define PM_SLEEPCFG_SLEEPMODE_Pos 0
- #define PM_SLEEPCFG_SLEEPMODE_Msk (_U_(0x7) << PM_SLEEPCFG_SLEEPMODE_Pos)
- #define PM_SLEEPCFG_SLEEPMODE(value) (PM_SLEEPCFG_SLEEPMODE_Msk & ((value) << PM_SLEEPCFG_SLEEPMODE_Pos))
- #define PM_SLEEPCFG_SLEEPMODE_IDLE_Val _U_(0x2)
- #define PM_SLEEPCFG_SLEEPMODE_STANDBY_Val _U_(0x4)
- #define PM_SLEEPCFG_SLEEPMODE_OFF_Val _U_(0x6)
- #define PM_SLEEPCFG_SLEEPMODE_IDLE (PM_SLEEPCFG_SLEEPMODE_IDLE_Val << PM_SLEEPCFG_SLEEPMODE_Pos)
- #define PM_SLEEPCFG_SLEEPMODE_STANDBY (PM_SLEEPCFG_SLEEPMODE_STANDBY_Val << PM_SLEEPCFG_SLEEPMODE_Pos)
- #define PM_SLEEPCFG_SLEEPMODE_OFF (PM_SLEEPCFG_SLEEPMODE_OFF_Val << PM_SLEEPCFG_SLEEPMODE_Pos)
- #define PM_SLEEPCFG_MASK _U_(0x07)
- #define PM_SLEEPCFG_Msk _U_(0x07)
- #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
- typedef union {
- struct {
- uint8_t PLSEL:2;
- uint8_t :5;
- uint8_t PLDIS:1;
- } bit;
- uint8_t reg;
- } PM_PLCFG_Type;
- #endif
- #define PM_PLCFG_OFFSET (0x02)
- #define PM_PLCFG_RESETVALUE _U_(0x00)
- #define PM_PLCFG_PLSEL_Pos 0
- #define PM_PLCFG_PLSEL_Msk (_U_(0x3) << PM_PLCFG_PLSEL_Pos)
- #define PM_PLCFG_PLSEL(value) (PM_PLCFG_PLSEL_Msk & ((value) << PM_PLCFG_PLSEL_Pos))
- #define PM_PLCFG_PLSEL_PL0_Val _U_(0x0)
- #define PM_PLCFG_PLSEL_PL2_Val _U_(0x2)
- #define PM_PLCFG_PLSEL_PL0 (PM_PLCFG_PLSEL_PL0_Val << PM_PLCFG_PLSEL_Pos)
- #define PM_PLCFG_PLSEL_PL2 (PM_PLCFG_PLSEL_PL2_Val << PM_PLCFG_PLSEL_Pos)
- #define PM_PLCFG_PLDIS_Pos 7
- #define PM_PLCFG_PLDIS_Msk (_U_(0x1) << PM_PLCFG_PLDIS_Pos)
- #define PM_PLCFG_PLDIS PM_PLCFG_PLDIS_Msk
- #define PM_PLCFG_MASK _U_(0x83)
- #define PM_PLCFG_Msk _U_(0x83)
- #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
- typedef union {
- struct {
- uint8_t RAMPSWC:2;
- uint8_t :6;
- } bit;
- uint8_t reg;
- } PM_PWCFG_Type;
- #endif
- #define PM_PWCFG_OFFSET (0x03)
- #define PM_PWCFG_RESETVALUE _U_(0x00)
- #define PM_PWCFG_RAMPSWC_Pos 0
- #define PM_PWCFG_RAMPSWC_Msk (_U_(0x3) << PM_PWCFG_RAMPSWC_Pos)
- #define PM_PWCFG_RAMPSWC(value) (PM_PWCFG_RAMPSWC_Msk & ((value) << PM_PWCFG_RAMPSWC_Pos))
- #define PM_PWCFG_RAMPSWC_16KB_Val _U_(0x0)
- #define PM_PWCFG_RAMPSWC_12KB_Val _U_(0x1)
- #define PM_PWCFG_RAMPSWC_8KB_Val _U_(0x2)
- #define PM_PWCFG_RAMPSWC_4KB_Val _U_(0x3)
- #define PM_PWCFG_RAMPSWC_16KB (PM_PWCFG_RAMPSWC_16KB_Val << PM_PWCFG_RAMPSWC_Pos)
- #define PM_PWCFG_RAMPSWC_12KB (PM_PWCFG_RAMPSWC_12KB_Val << PM_PWCFG_RAMPSWC_Pos)
- #define PM_PWCFG_RAMPSWC_8KB (PM_PWCFG_RAMPSWC_8KB_Val << PM_PWCFG_RAMPSWC_Pos)
- #define PM_PWCFG_RAMPSWC_4KB (PM_PWCFG_RAMPSWC_4KB_Val << PM_PWCFG_RAMPSWC_Pos)
- #define PM_PWCFG_MASK _U_(0x03)
- #define PM_PWCFG_Msk _U_(0x03)
- #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
- typedef union {
- struct {
- uint8_t PLRDY:1;
- uint8_t :7;
- } bit;
- uint8_t reg;
- } PM_INTENCLR_Type;
- #endif
- #define PM_INTENCLR_OFFSET (0x04)
- #define PM_INTENCLR_RESETVALUE _U_(0x00)
- #define PM_INTENCLR_PLRDY_Pos 0
- #define PM_INTENCLR_PLRDY_Msk (_U_(0x1) << PM_INTENCLR_PLRDY_Pos)
- #define PM_INTENCLR_PLRDY PM_INTENCLR_PLRDY_Msk
- #define PM_INTENCLR_MASK _U_(0x01)
- #define PM_INTENCLR_Msk _U_(0x01)
- #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
- typedef union {
- struct {
- uint8_t PLRDY:1;
- uint8_t :7;
- } bit;
- uint8_t reg;
- } PM_INTENSET_Type;
- #endif
- #define PM_INTENSET_OFFSET (0x05)
- #define PM_INTENSET_RESETVALUE _U_(0x00)
- #define PM_INTENSET_PLRDY_Pos 0
- #define PM_INTENSET_PLRDY_Msk (_U_(0x1) << PM_INTENSET_PLRDY_Pos)
- #define PM_INTENSET_PLRDY PM_INTENSET_PLRDY_Msk
- #define PM_INTENSET_MASK _U_(0x01)
- #define PM_INTENSET_Msk _U_(0x01)
- #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
- typedef union {
- struct {
- __I uint8_t PLRDY:1;
- __I uint8_t :7;
- } bit;
- uint8_t reg;
- } PM_INTFLAG_Type;
- #endif
- #define PM_INTFLAG_OFFSET (0x06)
- #define PM_INTFLAG_RESETVALUE _U_(0x00)
- #define PM_INTFLAG_PLRDY_Pos 0
- #define PM_INTFLAG_PLRDY_Msk (_U_(0x1) << PM_INTFLAG_PLRDY_Pos)
- #define PM_INTFLAG_PLRDY PM_INTFLAG_PLRDY_Msk
- #define PM_INTFLAG_MASK _U_(0x01)
- #define PM_INTFLAG_Msk _U_(0x01)
- #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
- typedef union {
- struct {
- uint16_t PDCFG:1;
- uint16_t :3;
- uint16_t DPGPDSW:1;
- uint16_t :1;
- uint16_t VREGSMOD:2;
- uint16_t :2;
- uint16_t BBIASHS:1;
- uint16_t :1;
- uint16_t BBIASTR:1;
- uint16_t :3;
- } bit;
- uint16_t reg;
- } PM_STDBYCFG_Type;
- #endif
- #define PM_STDBYCFG_OFFSET (0x08)
- #define PM_STDBYCFG_RESETVALUE _U_(0x00)
- #define PM_STDBYCFG_PDCFG_Pos 0
- #define PM_STDBYCFG_PDCFG_Msk (_U_(0x1) << PM_STDBYCFG_PDCFG_Pos)
- #define PM_STDBYCFG_PDCFG PM_STDBYCFG_PDCFG_Msk
- #define PM_STDBYCFG_PDCFG_DEFAULT_Val _U_(0x0)
- #define PM_STDBYCFG_PDCFG_PDSW_Val _U_(0x1)
- #define PM_STDBYCFG_PDCFG_DEFAULT (PM_STDBYCFG_PDCFG_DEFAULT_Val << PM_STDBYCFG_PDCFG_Pos)
- #define PM_STDBYCFG_PDCFG_PDSW (PM_STDBYCFG_PDCFG_PDSW_Val << PM_STDBYCFG_PDCFG_Pos)
- #define PM_STDBYCFG_DPGPDSW_Pos 4
- #define PM_STDBYCFG_DPGPDSW_Msk (_U_(0x1) << PM_STDBYCFG_DPGPDSW_Pos)
- #define PM_STDBYCFG_DPGPDSW PM_STDBYCFG_DPGPDSW_Msk
- #define PM_STDBYCFG_DPGPDSW_0_Val _U_(0x0)
- #define PM_STDBYCFG_DPGPDSW_1_Val _U_(0x1)
- #define PM_STDBYCFG_DPGPDSW_0 (PM_STDBYCFG_DPGPDSW_0_Val << PM_STDBYCFG_DPGPDSW_Pos)
- #define PM_STDBYCFG_DPGPDSW_1 (PM_STDBYCFG_DPGPDSW_1_Val << PM_STDBYCFG_DPGPDSW_Pos)
- #define PM_STDBYCFG_VREGSMOD_Pos 6
- #define PM_STDBYCFG_VREGSMOD_Msk (_U_(0x3) << PM_STDBYCFG_VREGSMOD_Pos)
- #define PM_STDBYCFG_VREGSMOD(value) (PM_STDBYCFG_VREGSMOD_Msk & ((value) << PM_STDBYCFG_VREGSMOD_Pos))
- #define PM_STDBYCFG_VREGSMOD_AUTO_Val _U_(0x0)
- #define PM_STDBYCFG_VREGSMOD_PERFORMANCE_Val _U_(0x1)
- #define PM_STDBYCFG_VREGSMOD_LP_Val _U_(0x2)
- #define PM_STDBYCFG_VREGSMOD_AUTO (PM_STDBYCFG_VREGSMOD_AUTO_Val << PM_STDBYCFG_VREGSMOD_Pos)
- #define PM_STDBYCFG_VREGSMOD_PERFORMANCE (PM_STDBYCFG_VREGSMOD_PERFORMANCE_Val << PM_STDBYCFG_VREGSMOD_Pos)
- #define PM_STDBYCFG_VREGSMOD_LP (PM_STDBYCFG_VREGSMOD_LP_Val << PM_STDBYCFG_VREGSMOD_Pos)
- #define PM_STDBYCFG_BBIASHS_Pos 10
- #define PM_STDBYCFG_BBIASHS_Msk (_U_(0x1) << PM_STDBYCFG_BBIASHS_Pos)
- #define PM_STDBYCFG_BBIASHS PM_STDBYCFG_BBIASHS_Msk
- #define PM_STDBYCFG_BBIASTR_Pos 12
- #define PM_STDBYCFG_BBIASTR_Msk (_U_(0x1) << PM_STDBYCFG_BBIASTR_Pos)
- #define PM_STDBYCFG_BBIASTR PM_STDBYCFG_BBIASTR_Msk
- #define PM_STDBYCFG_MASK _U_(0x14D1)
- #define PM_STDBYCFG_Msk _U_(0x14D1)
- #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
- typedef struct {
- __I uint8_t Reserved1[1];
- __IO PM_SLEEPCFG_Type SLEEPCFG;
- __IO PM_PLCFG_Type PLCFG;
- __IO PM_PWCFG_Type PWCFG;
- __IO PM_INTENCLR_Type INTENCLR;
- __IO PM_INTENSET_Type INTENSET;
- __IO PM_INTFLAG_Type INTFLAG;
- __I uint8_t Reserved2[1];
- __IO PM_STDBYCFG_Type STDBYCFG;
- } Pm;
- #endif
- #endif
|