30 #ifndef _SAM3N_PWM_COMPONENT_ 31 #define _SAM3N_PWM_COMPONENT_ 39 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 50 #define PWMCH_NUM_NUMBER 4 65 #define PWM_MR_DIVA_Pos 0 66 #define PWM_MR_DIVA_Msk (0xffu << PWM_MR_DIVA_Pos) 67 #define PWM_MR_DIVA_CLK_OFF (0x0u << 0) 68 #define PWM_MR_DIVA_CLK_DIV1 (0x1u << 0) 69 #define PWM_MR_PREA_Pos 8 70 #define PWM_MR_PREA_Msk (0xfu << PWM_MR_PREA_Pos) 71 #define PWM_MR_PREA_MCK (0x0u << 8) 72 #define PWM_MR_PREA_MCKDIV2 (0x1u << 8) 73 #define PWM_MR_PREA_MCKDIV4 (0x2u << 8) 74 #define PWM_MR_PREA_MCKDIV8 (0x3u << 8) 75 #define PWM_MR_PREA_MCKDIV16 (0x4u << 8) 76 #define PWM_MR_PREA_MCKDIV32 (0x5u << 8) 77 #define PWM_MR_PREA_MCKDIV64 (0x6u << 8) 78 #define PWM_MR_PREA_MCKDIV128 (0x7u << 8) 79 #define PWM_MR_PREA_MCKDIV256 (0x8u << 8) 80 #define PWM_MR_PREA_MCKDIV512 (0x9u << 8) 81 #define PWM_MR_PREA_MCKDIV1024 (0xAu << 8) 82 #define PWM_MR_DIVB_Pos 16 83 #define PWM_MR_DIVB_Msk (0xffu << PWM_MR_DIVB_Pos) 84 #define PWM_MR_DIVB_CLK_OFF (0x0u << 16) 85 #define PWM_MR_DIVB_CLK_DIV1 (0x1u << 16) 86 #define PWM_MR_PREB_Pos 24 87 #define PWM_MR_PREB_Msk (0xfu << PWM_MR_PREB_Pos) 88 #define PWM_MR_PREB_MCK (0x0u << 24) 89 #define PWM_MR_PREB_MCKDIV2 (0x1u << 24) 90 #define PWM_MR_PREB_MCKDIV4 (0x2u << 24) 91 #define PWM_MR_PREB_MCKDIV8 (0x3u << 24) 92 #define PWM_MR_PREB_MCKDIV16 (0x4u << 24) 93 #define PWM_MR_PREB_MCKDIV32 (0x5u << 24) 94 #define PWM_MR_PREB_MCKDIV64 (0x6u << 24) 95 #define PWM_MR_PREB_MCKDIV128 (0x7u << 24) 96 #define PWM_MR_PREB_MCKDIV256 (0x8u << 24) 97 #define PWM_MR_PREB_MCKDIV512 (0x9u << 24) 98 #define PWM_MR_PREB_MCKDIV1024 (0xAu << 24) 100 #define PWM_ENA_CHID0 (0x1u << 0) 101 #define PWM_ENA_CHID1 (0x1u << 1) 102 #define PWM_ENA_CHID2 (0x1u << 2) 103 #define PWM_ENA_CHID3 (0x1u << 3) 105 #define PWM_DIS_CHID0 (0x1u << 0) 106 #define PWM_DIS_CHID1 (0x1u << 1) 107 #define PWM_DIS_CHID2 (0x1u << 2) 108 #define PWM_DIS_CHID3 (0x1u << 3) 110 #define PWM_SR_CHID0 (0x1u << 0) 111 #define PWM_SR_CHID1 (0x1u << 1) 112 #define PWM_SR_CHID2 (0x1u << 2) 113 #define PWM_SR_CHID3 (0x1u << 3) 115 #define PWM_IER_CHID0 (0x1u << 0) 116 #define PWM_IER_CHID1 (0x1u << 1) 117 #define PWM_IER_CHID2 (0x1u << 2) 118 #define PWM_IER_CHID3 (0x1u << 3) 120 #define PWM_IDR_CHID0 (0x1u << 0) 121 #define PWM_IDR_CHID1 (0x1u << 1) 122 #define PWM_IDR_CHID2 (0x1u << 2) 123 #define PWM_IDR_CHID3 (0x1u << 3) 125 #define PWM_IMR_CHID0 (0x1u << 0) 126 #define PWM_IMR_CHID1 (0x1u << 1) 127 #define PWM_IMR_CHID2 (0x1u << 2) 128 #define PWM_IMR_CHID3 (0x1u << 3) 130 #define PWM_ISR_CHID0 (0x1u << 0) 131 #define PWM_ISR_CHID1 (0x1u << 1) 132 #define PWM_ISR_CHID2 (0x1u << 2) 133 #define PWM_ISR_CHID3 (0x1u << 3) 135 #define PWM_CMR_CPRE_Pos 0 136 #define PWM_CMR_CPRE_Msk (0xfu << PWM_CMR_CPRE_Pos) 137 #define PWM_CMR_CPRE_MCK (0x0u << 0) 138 #define PWM_CMR_CPRE_MCKDIV2 (0x1u << 0) 139 #define PWM_CMR_CPRE_MCKDIV4 (0x2u << 0) 140 #define PWM_CMR_CPRE_MCKDIV8 (0x3u << 0) 141 #define PWM_CMR_CPRE_MCKDIV16 (0x4u << 0) 142 #define PWM_CMR_CPRE_MCKDIV32 (0x5u << 0) 143 #define PWM_CMR_CPRE_MCKDIV64 (0x6u << 0) 144 #define PWM_CMR_CPRE_MCKDIV128 (0x7u << 0) 145 #define PWM_CMR_CPRE_MCKDIV256 (0x8u << 0) 146 #define PWM_CMR_CPRE_MCKDIV512 (0x9u << 0) 147 #define PWM_CMR_CPRE_MCKDIV1024 (0xAu << 0) 148 #define PWM_CMR_CPRE_CLKA (0xBu << 0) 149 #define PWM_CMR_CPRE_CLKB (0xCu << 0) 150 #define PWM_CMR_CALG (0x1u << 8) 151 #define PWM_CMR_CPOL (0x1u << 9) 152 #define PWM_CMR_CPD (0x1u << 10) 154 #define PWM_CDTY_CDTY_Pos 0 155 #define PWM_CDTY_CDTY_Msk (0xffffffffu << PWM_CDTY_CDTY_Pos) 156 #define PWM_CDTY_CDTY(value) ((PWM_CDTY_CDTY_Msk & ((value) << PWM_CDTY_CDTY_Pos))) 158 #define PWM_CPRD_CPRD_Pos 0 159 #define PWM_CPRD_CPRD_Msk (0xffffffffu << PWM_CPRD_CPRD_Pos) 160 #define PWM_CPRD_CPRD(value) ((PWM_CPRD_CPRD_Msk & ((value) << PWM_CPRD_CPRD_Pos))) 162 #define PWM_CCNT_CNT_Pos 0 163 #define PWM_CCNT_CNT_Msk (0xffffffffu << PWM_CCNT_CNT_Pos) 165 #define PWM_CUPD_CUPD_Pos 0 166 #define PWM_CUPD_CUPD_Msk (0xffffffffu << PWM_CUPD_CUPD_Pos) 167 #define PWM_CUPD_CUPD(value) ((PWM_CUPD_CUPD_Msk & ((value) << PWM_CUPD_CUPD_Pos))) WoReg PWM_ENA
(Pwm Offset: 0x04) PWM Enable Register
Definition: component_pwm.h:53
volatile uint32_t RwReg
Definition: sam3n00a.h:54
PwmCh_num hardware registers.
Definition: component_pwm.h:41
WoReg PWM_IDR
(Pwm Offset: 0x14) PWM Interrupt Disable Register
Definition: component_pwm.h:57
#define PWMCH_NUM_NUMBER
Pwm hardware registers.
Definition: component_pwm.h:50
RwReg PWM_CDTY
(PwmCh_num Offset: 0x4) PWM Channel Duty Cycle Register
Definition: component_pwm.h:43
volatile uint32_t WoReg
Definition: sam3n00a.h:53
RwReg PWM_CMR
(PwmCh_num Offset: 0x0) PWM Channel Mode Register
Definition: component_pwm.h:42
RwReg PWM_CPRD
(PwmCh_num Offset: 0x8) PWM Channel Period Register
Definition: component_pwm.h:44
WoReg PWM_DIS
(Pwm Offset: 0x08) PWM Disable Register
Definition: component_pwm.h:54
Definition: component_pwm.h:51
RoReg PWM_IMR
(Pwm Offset: 0x18) PWM Interrupt Mask Register
Definition: component_pwm.h:58
volatile const uint32_t RoReg
Definition: sam3n00a.h:49
RwReg PWM_MR
(Pwm Offset: 0x00) PWM Mode Register
Definition: component_pwm.h:52
RoReg PWM_ISR
(Pwm Offset: 0x1C) PWM Interrupt Status Register
Definition: component_pwm.h:59
WoReg PWM_IER
(Pwm Offset: 0x10) PWM Interrupt Enable Register
Definition: component_pwm.h:56
RoReg PWM_SR
(Pwm Offset: 0x0C) PWM Status Register
Definition: component_pwm.h:55
RwReg PWM_CUPD
(PwmCh_num Offset: 0x10) PWM Channel Update Register
Definition: component_pwm.h:46
RwReg PWM_CCNT
(PwmCh_num Offset: 0xC) PWM Channel Counter Register
Definition: component_pwm.h:45