30 #ifndef _SAM3U_PWM_COMPONENT_ 31 #define _SAM3U_PWM_COMPONENT_ 39 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 59 #define PWMCMP_NUMBER 8 60 #define PWMCH_NUM_NUMBER 4 110 #define PWM_CLK_DIVA_Pos 0 111 #define PWM_CLK_DIVA_Msk (0xffu << PWM_CLK_DIVA_Pos) 112 #define PWM_CLK_DIVA(value) ((PWM_CLK_DIVA_Msk & ((value) << PWM_CLK_DIVA_Pos))) 113 #define PWM_CLK_PREA_Pos 8 114 #define PWM_CLK_PREA_Msk (0xfu << PWM_CLK_PREA_Pos) 115 #define PWM_CLK_PREA(value) ((PWM_CLK_PREA_Msk & ((value) << PWM_CLK_PREA_Pos))) 116 #define PWM_CLK_DIVB_Pos 16 117 #define PWM_CLK_DIVB_Msk (0xffu << PWM_CLK_DIVB_Pos) 118 #define PWM_CLK_DIVB(value) ((PWM_CLK_DIVB_Msk & ((value) << PWM_CLK_DIVB_Pos))) 119 #define PWM_CLK_PREB_Pos 24 120 #define PWM_CLK_PREB_Msk (0xfu << PWM_CLK_PREB_Pos) 121 #define PWM_CLK_PREB(value) ((PWM_CLK_PREB_Msk & ((value) << PWM_CLK_PREB_Pos))) 123 #define PWM_ENA_CHID0 (0x1u << 0) 124 #define PWM_ENA_CHID1 (0x1u << 1) 125 #define PWM_ENA_CHID2 (0x1u << 2) 126 #define PWM_ENA_CHID3 (0x1u << 3) 128 #define PWM_DIS_CHID0 (0x1u << 0) 129 #define PWM_DIS_CHID1 (0x1u << 1) 130 #define PWM_DIS_CHID2 (0x1u << 2) 131 #define PWM_DIS_CHID3 (0x1u << 3) 133 #define PWM_SR_CHID0 (0x1u << 0) 134 #define PWM_SR_CHID1 (0x1u << 1) 135 #define PWM_SR_CHID2 (0x1u << 2) 136 #define PWM_SR_CHID3 (0x1u << 3) 138 #define PWM_IER1_CHID0 (0x1u << 0) 139 #define PWM_IER1_CHID1 (0x1u << 1) 140 #define PWM_IER1_CHID2 (0x1u << 2) 141 #define PWM_IER1_CHID3 (0x1u << 3) 142 #define PWM_IER1_FCHID0 (0x1u << 16) 143 #define PWM_IER1_FCHID1 (0x1u << 17) 144 #define PWM_IER1_FCHID2 (0x1u << 18) 145 #define PWM_IER1_FCHID3 (0x1u << 19) 147 #define PWM_IDR1_CHID0 (0x1u << 0) 148 #define PWM_IDR1_CHID1 (0x1u << 1) 149 #define PWM_IDR1_CHID2 (0x1u << 2) 150 #define PWM_IDR1_CHID3 (0x1u << 3) 151 #define PWM_IDR1_FCHID0 (0x1u << 16) 152 #define PWM_IDR1_FCHID1 (0x1u << 17) 153 #define PWM_IDR1_FCHID2 (0x1u << 18) 154 #define PWM_IDR1_FCHID3 (0x1u << 19) 156 #define PWM_IMR1_CHID0 (0x1u << 0) 157 #define PWM_IMR1_CHID1 (0x1u << 1) 158 #define PWM_IMR1_CHID2 (0x1u << 2) 159 #define PWM_IMR1_CHID3 (0x1u << 3) 160 #define PWM_IMR1_FCHID0 (0x1u << 16) 161 #define PWM_IMR1_FCHID1 (0x1u << 17) 162 #define PWM_IMR1_FCHID2 (0x1u << 18) 163 #define PWM_IMR1_FCHID3 (0x1u << 19) 165 #define PWM_ISR1_CHID0 (0x1u << 0) 166 #define PWM_ISR1_CHID1 (0x1u << 1) 167 #define PWM_ISR1_CHID2 (0x1u << 2) 168 #define PWM_ISR1_CHID3 (0x1u << 3) 169 #define PWM_ISR1_FCHID0 (0x1u << 16) 170 #define PWM_ISR1_FCHID1 (0x1u << 17) 171 #define PWM_ISR1_FCHID2 (0x1u << 18) 172 #define PWM_ISR1_FCHID3 (0x1u << 19) 174 #define PWM_SCM_SYNC0 (0x1u << 0) 175 #define PWM_SCM_SYNC1 (0x1u << 1) 176 #define PWM_SCM_SYNC2 (0x1u << 2) 177 #define PWM_SCM_SYNC3 (0x1u << 3) 178 #define PWM_SCM_UPDM_Pos 16 179 #define PWM_SCM_UPDM_Msk (0x3u << PWM_SCM_UPDM_Pos) 180 #define PWM_SCM_UPDM_MODE0 (0x0u << 16) 181 #define PWM_SCM_UPDM_MODE1 (0x1u << 16) 182 #define PWM_SCM_UPDM_MODE2 (0x2u << 16) 183 #define PWM_SCM_PTRM (0x1u << 20) 184 #define PWM_SCM_PTRCS_Pos 21 185 #define PWM_SCM_PTRCS_Msk (0x7u << PWM_SCM_PTRCS_Pos) 186 #define PWM_SCM_PTRCS(value) ((PWM_SCM_PTRCS_Msk & ((value) << PWM_SCM_PTRCS_Pos))) 188 #define PWM_SCUC_UPDULOCK (0x1u << 0) 190 #define PWM_SCUP_UPR_Pos 0 191 #define PWM_SCUP_UPR_Msk (0xfu << PWM_SCUP_UPR_Pos) 192 #define PWM_SCUP_UPR(value) ((PWM_SCUP_UPR_Msk & ((value) << PWM_SCUP_UPR_Pos))) 193 #define PWM_SCUP_UPRCNT_Pos 4 194 #define PWM_SCUP_UPRCNT_Msk (0xfu << PWM_SCUP_UPRCNT_Pos) 195 #define PWM_SCUP_UPRCNT(value) ((PWM_SCUP_UPRCNT_Msk & ((value) << PWM_SCUP_UPRCNT_Pos))) 197 #define PWM_SCUPUPD_UPRUPD_Pos 0 198 #define PWM_SCUPUPD_UPRUPD_Msk (0xfu << PWM_SCUPUPD_UPRUPD_Pos) 199 #define PWM_SCUPUPD_UPRUPD(value) ((PWM_SCUPUPD_UPRUPD_Msk & ((value) << PWM_SCUPUPD_UPRUPD_Pos))) 201 #define PWM_IER2_WRDY (0x1u << 0) 202 #define PWM_IER2_ENDTX (0x1u << 1) 203 #define PWM_IER2_TXBUFE (0x1u << 2) 204 #define PWM_IER2_UNRE (0x1u << 3) 205 #define PWM_IER2_CMPM0 (0x1u << 8) 206 #define PWM_IER2_CMPM1 (0x1u << 9) 207 #define PWM_IER2_CMPM2 (0x1u << 10) 208 #define PWM_IER2_CMPM3 (0x1u << 11) 209 #define PWM_IER2_CMPM4 (0x1u << 12) 210 #define PWM_IER2_CMPM5 (0x1u << 13) 211 #define PWM_IER2_CMPM6 (0x1u << 14) 212 #define PWM_IER2_CMPM7 (0x1u << 15) 213 #define PWM_IER2_CMPU0 (0x1u << 16) 214 #define PWM_IER2_CMPU1 (0x1u << 17) 215 #define PWM_IER2_CMPU2 (0x1u << 18) 216 #define PWM_IER2_CMPU3 (0x1u << 19) 217 #define PWM_IER2_CMPU4 (0x1u << 20) 218 #define PWM_IER2_CMPU5 (0x1u << 21) 219 #define PWM_IER2_CMPU6 (0x1u << 22) 220 #define PWM_IER2_CMPU7 (0x1u << 23) 222 #define PWM_IDR2_WRDY (0x1u << 0) 223 #define PWM_IDR2_ENDTX (0x1u << 1) 224 #define PWM_IDR2_TXBUFE (0x1u << 2) 225 #define PWM_IDR2_UNRE (0x1u << 3) 226 #define PWM_IDR2_CMPM0 (0x1u << 8) 227 #define PWM_IDR2_CMPM1 (0x1u << 9) 228 #define PWM_IDR2_CMPM2 (0x1u << 10) 229 #define PWM_IDR2_CMPM3 (0x1u << 11) 230 #define PWM_IDR2_CMPM4 (0x1u << 12) 231 #define PWM_IDR2_CMPM5 (0x1u << 13) 232 #define PWM_IDR2_CMPM6 (0x1u << 14) 233 #define PWM_IDR2_CMPM7 (0x1u << 15) 234 #define PWM_IDR2_CMPU0 (0x1u << 16) 235 #define PWM_IDR2_CMPU1 (0x1u << 17) 236 #define PWM_IDR2_CMPU2 (0x1u << 18) 237 #define PWM_IDR2_CMPU3 (0x1u << 19) 238 #define PWM_IDR2_CMPU4 (0x1u << 20) 239 #define PWM_IDR2_CMPU5 (0x1u << 21) 240 #define PWM_IDR2_CMPU6 (0x1u << 22) 241 #define PWM_IDR2_CMPU7 (0x1u << 23) 243 #define PWM_IMR2_WRDY (0x1u << 0) 244 #define PWM_IMR2_ENDTX (0x1u << 1) 245 #define PWM_IMR2_TXBUFE (0x1u << 2) 246 #define PWM_IMR2_UNRE (0x1u << 3) 247 #define PWM_IMR2_CMPM0 (0x1u << 8) 248 #define PWM_IMR2_CMPM1 (0x1u << 9) 249 #define PWM_IMR2_CMPM2 (0x1u << 10) 250 #define PWM_IMR2_CMPM3 (0x1u << 11) 251 #define PWM_IMR2_CMPM4 (0x1u << 12) 252 #define PWM_IMR2_CMPM5 (0x1u << 13) 253 #define PWM_IMR2_CMPM6 (0x1u << 14) 254 #define PWM_IMR2_CMPM7 (0x1u << 15) 255 #define PWM_IMR2_CMPU0 (0x1u << 16) 256 #define PWM_IMR2_CMPU1 (0x1u << 17) 257 #define PWM_IMR2_CMPU2 (0x1u << 18) 258 #define PWM_IMR2_CMPU3 (0x1u << 19) 259 #define PWM_IMR2_CMPU4 (0x1u << 20) 260 #define PWM_IMR2_CMPU5 (0x1u << 21) 261 #define PWM_IMR2_CMPU6 (0x1u << 22) 262 #define PWM_IMR2_CMPU7 (0x1u << 23) 264 #define PWM_ISR2_WRDY (0x1u << 0) 265 #define PWM_ISR2_ENDTX (0x1u << 1) 266 #define PWM_ISR2_TXBUFE (0x1u << 2) 267 #define PWM_ISR2_UNRE (0x1u << 3) 268 #define PWM_ISR2_CMPM0 (0x1u << 8) 269 #define PWM_ISR2_CMPM1 (0x1u << 9) 270 #define PWM_ISR2_CMPM2 (0x1u << 10) 271 #define PWM_ISR2_CMPM3 (0x1u << 11) 272 #define PWM_ISR2_CMPM4 (0x1u << 12) 273 #define PWM_ISR2_CMPM5 (0x1u << 13) 274 #define PWM_ISR2_CMPM6 (0x1u << 14) 275 #define PWM_ISR2_CMPM7 (0x1u << 15) 276 #define PWM_ISR2_CMPU0 (0x1u << 16) 277 #define PWM_ISR2_CMPU1 (0x1u << 17) 278 #define PWM_ISR2_CMPU2 (0x1u << 18) 279 #define PWM_ISR2_CMPU3 (0x1u << 19) 280 #define PWM_ISR2_CMPU4 (0x1u << 20) 281 #define PWM_ISR2_CMPU5 (0x1u << 21) 282 #define PWM_ISR2_CMPU6 (0x1u << 22) 283 #define PWM_ISR2_CMPU7 (0x1u << 23) 285 #define PWM_OOV_OOVH0 (0x1u << 0) 286 #define PWM_OOV_OOVH1 (0x1u << 1) 287 #define PWM_OOV_OOVH2 (0x1u << 2) 288 #define PWM_OOV_OOVH3 (0x1u << 3) 289 #define PWM_OOV_OOVL0 (0x1u << 16) 290 #define PWM_OOV_OOVL1 (0x1u << 17) 291 #define PWM_OOV_OOVL2 (0x1u << 18) 292 #define PWM_OOV_OOVL3 (0x1u << 19) 294 #define PWM_OS_OSH0 (0x1u << 0) 295 #define PWM_OS_OSH1 (0x1u << 1) 296 #define PWM_OS_OSH2 (0x1u << 2) 297 #define PWM_OS_OSH3 (0x1u << 3) 298 #define PWM_OS_OSL0 (0x1u << 16) 299 #define PWM_OS_OSL1 (0x1u << 17) 300 #define PWM_OS_OSL2 (0x1u << 18) 301 #define PWM_OS_OSL3 (0x1u << 19) 303 #define PWM_OSS_OSSH0 (0x1u << 0) 304 #define PWM_OSS_OSSH1 (0x1u << 1) 305 #define PWM_OSS_OSSH2 (0x1u << 2) 306 #define PWM_OSS_OSSH3 (0x1u << 3) 307 #define PWM_OSS_OSSL0 (0x1u << 16) 308 #define PWM_OSS_OSSL1 (0x1u << 17) 309 #define PWM_OSS_OSSL2 (0x1u << 18) 310 #define PWM_OSS_OSSL3 (0x1u << 19) 312 #define PWM_OSC_OSCH0 (0x1u << 0) 313 #define PWM_OSC_OSCH1 (0x1u << 1) 314 #define PWM_OSC_OSCH2 (0x1u << 2) 315 #define PWM_OSC_OSCH3 (0x1u << 3) 316 #define PWM_OSC_OSCL0 (0x1u << 16) 317 #define PWM_OSC_OSCL1 (0x1u << 17) 318 #define PWM_OSC_OSCL2 (0x1u << 18) 319 #define PWM_OSC_OSCL3 (0x1u << 19) 321 #define PWM_OSSUPD_OSSUPH0 (0x1u << 0) 322 #define PWM_OSSUPD_OSSUPH1 (0x1u << 1) 323 #define PWM_OSSUPD_OSSUPH2 (0x1u << 2) 324 #define PWM_OSSUPD_OSSUPH3 (0x1u << 3) 325 #define PWM_OSSUPD_OSSUPL0 (0x1u << 16) 326 #define PWM_OSSUPD_OSSUPL1 (0x1u << 17) 327 #define PWM_OSSUPD_OSSUPL2 (0x1u << 18) 328 #define PWM_OSSUPD_OSSUPL3 (0x1u << 19) 330 #define PWM_OSCUPD_OSCUPH0 (0x1u << 0) 331 #define PWM_OSCUPD_OSCUPH1 (0x1u << 1) 332 #define PWM_OSCUPD_OSCUPH2 (0x1u << 2) 333 #define PWM_OSCUPD_OSCUPH3 (0x1u << 3) 334 #define PWM_OSCUPD_OSCUPL0 (0x1u << 16) 335 #define PWM_OSCUPD_OSCUPL1 (0x1u << 17) 336 #define PWM_OSCUPD_OSCUPL2 (0x1u << 18) 337 #define PWM_OSCUPD_OSCUPL3 (0x1u << 19) 339 #define PWM_FMR_FPOL_Pos 0 340 #define PWM_FMR_FPOL_Msk (0xffu << PWM_FMR_FPOL_Pos) 341 #define PWM_FMR_FPOL(value) ((PWM_FMR_FPOL_Msk & ((value) << PWM_FMR_FPOL_Pos))) 342 #define PWM_FMR_FMOD_Pos 8 343 #define PWM_FMR_FMOD_Msk (0xffu << PWM_FMR_FMOD_Pos) 344 #define PWM_FMR_FMOD(value) ((PWM_FMR_FMOD_Msk & ((value) << PWM_FMR_FMOD_Pos))) 345 #define PWM_FMR_FFIL_Pos 16 346 #define PWM_FMR_FFIL_Msk (0xffu << PWM_FMR_FFIL_Pos) 347 #define PWM_FMR_FFIL(value) ((PWM_FMR_FFIL_Msk & ((value) << PWM_FMR_FFIL_Pos))) 349 #define PWM_FSR_FIV_Pos 0 350 #define PWM_FSR_FIV_Msk (0xffu << PWM_FSR_FIV_Pos) 351 #define PWM_FSR_FS_Pos 8 352 #define PWM_FSR_FS_Msk (0xffu << PWM_FSR_FS_Pos) 354 #define PWM_FCR_FCLR_Pos 0 355 #define PWM_FCR_FCLR_Msk (0xffu << PWM_FCR_FCLR_Pos) 356 #define PWM_FCR_FCLR(value) ((PWM_FCR_FCLR_Msk & ((value) << PWM_FCR_FCLR_Pos))) 358 #define PWM_FPV_FPVH0 (0x1u << 0) 359 #define PWM_FPV_FPVH1 (0x1u << 1) 360 #define PWM_FPV_FPVH2 (0x1u << 2) 361 #define PWM_FPV_FPVH3 (0x1u << 3) 362 #define PWM_FPV_FPVL0 (0x1u << 16) 363 #define PWM_FPV_FPVL1 (0x1u << 17) 364 #define PWM_FPV_FPVL2 (0x1u << 18) 365 #define PWM_FPV_FPVL3 (0x1u << 19) 367 #define PWM_FPE_FPE0_Pos 0 368 #define PWM_FPE_FPE0_Msk (0xffu << PWM_FPE_FPE0_Pos) 369 #define PWM_FPE_FPE0(value) ((PWM_FPE_FPE0_Msk & ((value) << PWM_FPE_FPE0_Pos))) 370 #define PWM_FPE_FPE1_Pos 8 371 #define PWM_FPE_FPE1_Msk (0xffu << PWM_FPE_FPE1_Pos) 372 #define PWM_FPE_FPE1(value) ((PWM_FPE_FPE1_Msk & ((value) << PWM_FPE_FPE1_Pos))) 373 #define PWM_FPE_FPE2_Pos 16 374 #define PWM_FPE_FPE2_Msk (0xffu << PWM_FPE_FPE2_Pos) 375 #define PWM_FPE_FPE2(value) ((PWM_FPE_FPE2_Msk & ((value) << PWM_FPE_FPE2_Pos))) 376 #define PWM_FPE_FPE3_Pos 24 377 #define PWM_FPE_FPE3_Msk (0xffu << PWM_FPE_FPE3_Pos) 378 #define PWM_FPE_FPE3(value) ((PWM_FPE_FPE3_Msk & ((value) << PWM_FPE_FPE3_Pos))) 380 #define PWM_ELMR_CSEL0 (0x1u << 0) 381 #define PWM_ELMR_CSEL1 (0x1u << 1) 382 #define PWM_ELMR_CSEL2 (0x1u << 2) 383 #define PWM_ELMR_CSEL3 (0x1u << 3) 384 #define PWM_ELMR_CSEL4 (0x1u << 4) 385 #define PWM_ELMR_CSEL5 (0x1u << 5) 386 #define PWM_ELMR_CSEL6 (0x1u << 6) 387 #define PWM_ELMR_CSEL7 (0x1u << 7) 389 #define PWM_WPCR_WPCMD_Pos 0 390 #define PWM_WPCR_WPCMD_Msk (0x3u << PWM_WPCR_WPCMD_Pos) 391 #define PWM_WPCR_WPCMD(value) ((PWM_WPCR_WPCMD_Msk & ((value) << PWM_WPCR_WPCMD_Pos))) 392 #define PWM_WPCR_WPRG0 (0x1u << 2) 393 #define PWM_WPCR_WPRG1 (0x1u << 3) 394 #define PWM_WPCR_WPRG2 (0x1u << 4) 395 #define PWM_WPCR_WPRG3 (0x1u << 5) 396 #define PWM_WPCR_WPRG4 (0x1u << 6) 397 #define PWM_WPCR_WPRG5 (0x1u << 7) 398 #define PWM_WPCR_WPKEY_Pos 8 399 #define PWM_WPCR_WPKEY_Msk (0xffffffu << PWM_WPCR_WPKEY_Pos) 400 #define PWM_WPCR_WPKEY(value) ((PWM_WPCR_WPKEY_Msk & ((value) << PWM_WPCR_WPKEY_Pos))) 402 #define PWM_WPSR_WPSWS0 (0x1u << 0) 403 #define PWM_WPSR_WPSWS1 (0x1u << 1) 404 #define PWM_WPSR_WPSWS2 (0x1u << 2) 405 #define PWM_WPSR_WPSWS3 (0x1u << 3) 406 #define PWM_WPSR_WPSWS4 (0x1u << 4) 407 #define PWM_WPSR_WPSWS5 (0x1u << 5) 408 #define PWM_WPSR_WPVS (0x1u << 7) 409 #define PWM_WPSR_WPHWS0 (0x1u << 8) 410 #define PWM_WPSR_WPHWS1 (0x1u << 9) 411 #define PWM_WPSR_WPHWS2 (0x1u << 10) 412 #define PWM_WPSR_WPHWS3 (0x1u << 11) 413 #define PWM_WPSR_WPHWS4 (0x1u << 12) 414 #define PWM_WPSR_WPHWS5 (0x1u << 13) 415 #define PWM_WPSR_WPVSRC_Pos 16 416 #define PWM_WPSR_WPVSRC_Msk (0xffffu << PWM_WPSR_WPVSRC_Pos) 418 #define PWM_TPR_TXPTR_Pos 0 419 #define PWM_TPR_TXPTR_Msk (0xffffffffu << PWM_TPR_TXPTR_Pos) 420 #define PWM_TPR_TXPTR(value) ((PWM_TPR_TXPTR_Msk & ((value) << PWM_TPR_TXPTR_Pos))) 422 #define PWM_TCR_TXCTR_Pos 0 423 #define PWM_TCR_TXCTR_Msk (0xffffu << PWM_TCR_TXCTR_Pos) 424 #define PWM_TCR_TXCTR(value) ((PWM_TCR_TXCTR_Msk & ((value) << PWM_TCR_TXCTR_Pos))) 426 #define PWM_TNPR_TXNPTR_Pos 0 427 #define PWM_TNPR_TXNPTR_Msk (0xffffffffu << PWM_TNPR_TXNPTR_Pos) 428 #define PWM_TNPR_TXNPTR(value) ((PWM_TNPR_TXNPTR_Msk & ((value) << PWM_TNPR_TXNPTR_Pos))) 430 #define PWM_TNCR_TXNCTR_Pos 0 431 #define PWM_TNCR_TXNCTR_Msk (0xffffu << PWM_TNCR_TXNCTR_Pos) 432 #define PWM_TNCR_TXNCTR(value) ((PWM_TNCR_TXNCTR_Msk & ((value) << PWM_TNCR_TXNCTR_Pos))) 434 #define PWM_PTCR_RXTEN (0x1u << 0) 435 #define PWM_PTCR_RXTDIS (0x1u << 1) 436 #define PWM_PTCR_TXTEN (0x1u << 8) 437 #define PWM_PTCR_TXTDIS (0x1u << 9) 439 #define PWM_PTSR_RXTEN (0x1u << 0) 440 #define PWM_PTSR_TXTEN (0x1u << 8) 442 #define PWM_CMPV_CV_Pos 0 443 #define PWM_CMPV_CV_Msk (0xffffffu << PWM_CMPV_CV_Pos) 444 #define PWM_CMPV_CV(value) ((PWM_CMPV_CV_Msk & ((value) << PWM_CMPV_CV_Pos))) 445 #define PWM_CMPV_CVM (0x1u << 24) 447 #define PWM_CMPVUPD_CVUPD_Pos 0 448 #define PWM_CMPVUPD_CVUPD_Msk (0xffffffu << PWM_CMPVUPD_CVUPD_Pos) 449 #define PWM_CMPVUPD_CVUPD(value) ((PWM_CMPVUPD_CVUPD_Msk & ((value) << PWM_CMPVUPD_CVUPD_Pos))) 450 #define PWM_CMPVUPD_CVMUPD (0x1u << 24) 452 #define PWM_CMPM_CEN (0x1u << 0) 453 #define PWM_CMPM_CTR_Pos 4 454 #define PWM_CMPM_CTR_Msk (0xfu << PWM_CMPM_CTR_Pos) 455 #define PWM_CMPM_CTR(value) ((PWM_CMPM_CTR_Msk & ((value) << PWM_CMPM_CTR_Pos))) 456 #define PWM_CMPM_CPR_Pos 8 457 #define PWM_CMPM_CPR_Msk (0xfu << PWM_CMPM_CPR_Pos) 458 #define PWM_CMPM_CPR(value) ((PWM_CMPM_CPR_Msk & ((value) << PWM_CMPM_CPR_Pos))) 459 #define PWM_CMPM_CPRCNT_Pos 12 460 #define PWM_CMPM_CPRCNT_Msk (0xfu << PWM_CMPM_CPRCNT_Pos) 461 #define PWM_CMPM_CPRCNT(value) ((PWM_CMPM_CPRCNT_Msk & ((value) << PWM_CMPM_CPRCNT_Pos))) 462 #define PWM_CMPM_CUPR_Pos 16 463 #define PWM_CMPM_CUPR_Msk (0xfu << PWM_CMPM_CUPR_Pos) 464 #define PWM_CMPM_CUPR(value) ((PWM_CMPM_CUPR_Msk & ((value) << PWM_CMPM_CUPR_Pos))) 465 #define PWM_CMPM_CUPRCNT_Pos 20 466 #define PWM_CMPM_CUPRCNT_Msk (0xfu << PWM_CMPM_CUPRCNT_Pos) 467 #define PWM_CMPM_CUPRCNT(value) ((PWM_CMPM_CUPRCNT_Msk & ((value) << PWM_CMPM_CUPRCNT_Pos))) 469 #define PWM_CMPMUPD_CENUPD (0x1u << 0) 470 #define PWM_CMPMUPD_CTRUPD_Pos 4 471 #define PWM_CMPMUPD_CTRUPD_Msk (0xfu << PWM_CMPMUPD_CTRUPD_Pos) 472 #define PWM_CMPMUPD_CTRUPD(value) ((PWM_CMPMUPD_CTRUPD_Msk & ((value) << PWM_CMPMUPD_CTRUPD_Pos))) 473 #define PWM_CMPMUPD_CPRUPD_Pos 8 474 #define PWM_CMPMUPD_CPRUPD_Msk (0xfu << PWM_CMPMUPD_CPRUPD_Pos) 475 #define PWM_CMPMUPD_CPRUPD(value) ((PWM_CMPMUPD_CPRUPD_Msk & ((value) << PWM_CMPMUPD_CPRUPD_Pos))) 476 #define PWM_CMPMUPD_CUPRUPD_Pos 16 477 #define PWM_CMPMUPD_CUPRUPD_Msk (0xfu << PWM_CMPMUPD_CUPRUPD_Pos) 478 #define PWM_CMPMUPD_CUPRUPD(value) ((PWM_CMPMUPD_CUPRUPD_Msk & ((value) << PWM_CMPMUPD_CUPRUPD_Pos))) 480 #define PWM_CMR_CPRE_Pos 0 481 #define PWM_CMR_CPRE_Msk (0xfu << PWM_CMR_CPRE_Pos) 482 #define PWM_CMR_CPRE_MCK (0x0u << 0) 483 #define PWM_CMR_CPRE_MCK_DIV_2 (0x1u << 0) 484 #define PWM_CMR_CPRE_MCK_DIV_4 (0x2u << 0) 485 #define PWM_CMR_CPRE_MCK_DIV_8 (0x3u << 0) 486 #define PWM_CMR_CPRE_MCK_DIV_16 (0x4u << 0) 487 #define PWM_CMR_CPRE_MCK_DIV_32 (0x5u << 0) 488 #define PWM_CMR_CPRE_MCK_DIV_64 (0x6u << 0) 489 #define PWM_CMR_CPRE_MCK_DIV_128 (0x7u << 0) 490 #define PWM_CMR_CPRE_MCK_DIV_256 (0x8u << 0) 491 #define PWM_CMR_CPRE_MCK_DIV_512 (0x9u << 0) 492 #define PWM_CMR_CPRE_MCK_DIV_1024 (0xAu << 0) 493 #define PWM_CMR_CPRE_CLKA (0xBu << 0) 494 #define PWM_CMR_CPRE_CLKB (0xCu << 0) 495 #define PWM_CMR_CALG (0x1u << 8) 496 #define PWM_CMR_CPOL (0x1u << 9) 497 #define PWM_CMR_CES (0x1u << 10) 498 #define PWM_CMR_DTE (0x1u << 16) 499 #define PWM_CMR_DTHI (0x1u << 17) 500 #define PWM_CMR_DTLI (0x1u << 18) 502 #define PWM_CDTY_CDTY_Pos 0 503 #define PWM_CDTY_CDTY_Msk (0xffffffu << PWM_CDTY_CDTY_Pos) 504 #define PWM_CDTY_CDTY(value) ((PWM_CDTY_CDTY_Msk & ((value) << PWM_CDTY_CDTY_Pos))) 506 #define PWM_CDTYUPD_CDTYUPD_Pos 0 507 #define PWM_CDTYUPD_CDTYUPD_Msk (0xffffffu << PWM_CDTYUPD_CDTYUPD_Pos) 508 #define PWM_CDTYUPD_CDTYUPD(value) ((PWM_CDTYUPD_CDTYUPD_Msk & ((value) << PWM_CDTYUPD_CDTYUPD_Pos))) 510 #define PWM_CPRD_CPRD_Pos 0 511 #define PWM_CPRD_CPRD_Msk (0xffffffu << PWM_CPRD_CPRD_Pos) 512 #define PWM_CPRD_CPRD(value) ((PWM_CPRD_CPRD_Msk & ((value) << PWM_CPRD_CPRD_Pos))) 514 #define PWM_CPRDUPD_CPRDUPD_Pos 0 515 #define PWM_CPRDUPD_CPRDUPD_Msk (0xffffffu << PWM_CPRDUPD_CPRDUPD_Pos) 516 #define PWM_CPRDUPD_CPRDUPD(value) ((PWM_CPRDUPD_CPRDUPD_Msk & ((value) << PWM_CPRDUPD_CPRDUPD_Pos))) 518 #define PWM_CCNT_CNT_Pos 0 519 #define PWM_CCNT_CNT_Msk (0xffffffu << PWM_CCNT_CNT_Pos) 521 #define PWM_DT_DTH_Pos 0 522 #define PWM_DT_DTH_Msk (0xffffu << PWM_DT_DTH_Pos) 523 #define PWM_DT_DTH(value) ((PWM_DT_DTH_Msk & ((value) << PWM_DT_DTH_Pos))) 524 #define PWM_DT_DTL_Pos 16 525 #define PWM_DT_DTL_Msk (0xffffu << PWM_DT_DTL_Pos) 526 #define PWM_DT_DTL(value) ((PWM_DT_DTL_Msk & ((value) << PWM_DT_DTL_Pos))) 528 #define PWM_DTUPD_DTHUPD_Pos 0 529 #define PWM_DTUPD_DTHUPD_Msk (0xffffu << PWM_DTUPD_DTHUPD_Pos) 530 #define PWM_DTUPD_DTHUPD(value) ((PWM_DTUPD_DTHUPD_Msk & ((value) << PWM_DTUPD_DTHUPD_Pos))) 531 #define PWM_DTUPD_DTLUPD_Pos 16 532 #define PWM_DTUPD_DTLUPD_Msk (0xffffu << PWM_DTUPD_DTLUPD_Pos) 533 #define PWM_DTUPD_DTLUPD(value) ((PWM_DTUPD_DTLUPD_Msk & ((value) << PWM_DTUPD_DTLUPD_Pos))) #define PWMCMP_NUMBER
Pwm hardware registers.
Definition: component_pwm.h:59
volatile uint32_t RwReg
Definition: sam3n00a.h:54
PwmCh_num hardware registers.
Definition: component_pwm.h:41
#define PWMCH_NUM_NUMBER
Pwm hardware registers.
Definition: component_pwm.h:50
volatile uint32_t WoReg
Definition: sam3n00a.h:53
Definition: component_pwm.h:51
volatile const uint32_t RoReg
Definition: sam3n00a.h:49
PwmCmp hardware registers.
Definition: component_pwm.h:52