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