30 #ifndef _SAM3XA_PWM_COMPONENT_ 31 #define _SAM3XA_PWM_COMPONENT_ 39 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 59 #define PWMCMP_NUMBER 8 60 #define PWMCH_NUM_NUMBER 8 113 #define PWM_CLK_DIVA_Pos 0 114 #define PWM_CLK_DIVA_Msk (0xffu << PWM_CLK_DIVA_Pos) 115 #define PWM_CLK_DIVA(value) ((PWM_CLK_DIVA_Msk & ((value) << PWM_CLK_DIVA_Pos))) 116 #define PWM_CLK_PREA_Pos 8 117 #define PWM_CLK_PREA_Msk (0xfu << PWM_CLK_PREA_Pos) 118 #define PWM_CLK_PREA(value) ((PWM_CLK_PREA_Msk & ((value) << PWM_CLK_PREA_Pos))) 119 #define PWM_CLK_DIVB_Pos 16 120 #define PWM_CLK_DIVB_Msk (0xffu << PWM_CLK_DIVB_Pos) 121 #define PWM_CLK_DIVB(value) ((PWM_CLK_DIVB_Msk & ((value) << PWM_CLK_DIVB_Pos))) 122 #define PWM_CLK_PREB_Pos 24 123 #define PWM_CLK_PREB_Msk (0xfu << PWM_CLK_PREB_Pos) 124 #define PWM_CLK_PREB(value) ((PWM_CLK_PREB_Msk & ((value) << PWM_CLK_PREB_Pos))) 126 #define PWM_ENA_CHID0 (0x1u << 0) 127 #define PWM_ENA_CHID1 (0x1u << 1) 128 #define PWM_ENA_CHID2 (0x1u << 2) 129 #define PWM_ENA_CHID3 (0x1u << 3) 130 #define PWM_ENA_CHID4 (0x1u << 4) 131 #define PWM_ENA_CHID5 (0x1u << 5) 132 #define PWM_ENA_CHID6 (0x1u << 6) 133 #define PWM_ENA_CHID7 (0x1u << 7) 135 #define PWM_DIS_CHID0 (0x1u << 0) 136 #define PWM_DIS_CHID1 (0x1u << 1) 137 #define PWM_DIS_CHID2 (0x1u << 2) 138 #define PWM_DIS_CHID3 (0x1u << 3) 139 #define PWM_DIS_CHID4 (0x1u << 4) 140 #define PWM_DIS_CHID5 (0x1u << 5) 141 #define PWM_DIS_CHID6 (0x1u << 6) 142 #define PWM_DIS_CHID7 (0x1u << 7) 144 #define PWM_SR_CHID0 (0x1u << 0) 145 #define PWM_SR_CHID1 (0x1u << 1) 146 #define PWM_SR_CHID2 (0x1u << 2) 147 #define PWM_SR_CHID3 (0x1u << 3) 148 #define PWM_SR_CHID4 (0x1u << 4) 149 #define PWM_SR_CHID5 (0x1u << 5) 150 #define PWM_SR_CHID6 (0x1u << 6) 151 #define PWM_SR_CHID7 (0x1u << 7) 153 #define PWM_IER1_CHID0 (0x1u << 0) 154 #define PWM_IER1_CHID1 (0x1u << 1) 155 #define PWM_IER1_CHID2 (0x1u << 2) 156 #define PWM_IER1_CHID3 (0x1u << 3) 157 #define PWM_IER1_CHID4 (0x1u << 4) 158 #define PWM_IER1_CHID5 (0x1u << 5) 159 #define PWM_IER1_CHID6 (0x1u << 6) 160 #define PWM_IER1_CHID7 (0x1u << 7) 161 #define PWM_IER1_FCHID0 (0x1u << 16) 162 #define PWM_IER1_FCHID1 (0x1u << 17) 163 #define PWM_IER1_FCHID2 (0x1u << 18) 164 #define PWM_IER1_FCHID3 (0x1u << 19) 165 #define PWM_IER1_FCHID4 (0x1u << 20) 166 #define PWM_IER1_FCHID5 (0x1u << 21) 167 #define PWM_IER1_FCHID6 (0x1u << 22) 168 #define PWM_IER1_FCHID7 (0x1u << 23) 170 #define PWM_IDR1_CHID0 (0x1u << 0) 171 #define PWM_IDR1_CHID1 (0x1u << 1) 172 #define PWM_IDR1_CHID2 (0x1u << 2) 173 #define PWM_IDR1_CHID3 (0x1u << 3) 174 #define PWM_IDR1_CHID4 (0x1u << 4) 175 #define PWM_IDR1_CHID5 (0x1u << 5) 176 #define PWM_IDR1_CHID6 (0x1u << 6) 177 #define PWM_IDR1_CHID7 (0x1u << 7) 178 #define PWM_IDR1_FCHID0 (0x1u << 16) 179 #define PWM_IDR1_FCHID1 (0x1u << 17) 180 #define PWM_IDR1_FCHID2 (0x1u << 18) 181 #define PWM_IDR1_FCHID3 (0x1u << 19) 182 #define PWM_IDR1_FCHID4 (0x1u << 20) 183 #define PWM_IDR1_FCHID5 (0x1u << 21) 184 #define PWM_IDR1_FCHID6 (0x1u << 22) 185 #define PWM_IDR1_FCHID7 (0x1u << 23) 187 #define PWM_IMR1_CHID0 (0x1u << 0) 188 #define PWM_IMR1_CHID1 (0x1u << 1) 189 #define PWM_IMR1_CHID2 (0x1u << 2) 190 #define PWM_IMR1_CHID3 (0x1u << 3) 191 #define PWM_IMR1_CHID4 (0x1u << 4) 192 #define PWM_IMR1_CHID5 (0x1u << 5) 193 #define PWM_IMR1_CHID6 (0x1u << 6) 194 #define PWM_IMR1_CHID7 (0x1u << 7) 195 #define PWM_IMR1_FCHID0 (0x1u << 16) 196 #define PWM_IMR1_FCHID1 (0x1u << 17) 197 #define PWM_IMR1_FCHID2 (0x1u << 18) 198 #define PWM_IMR1_FCHID3 (0x1u << 19) 199 #define PWM_IMR1_FCHID4 (0x1u << 20) 200 #define PWM_IMR1_FCHID5 (0x1u << 21) 201 #define PWM_IMR1_FCHID6 (0x1u << 22) 202 #define PWM_IMR1_FCHID7 (0x1u << 23) 204 #define PWM_ISR1_CHID0 (0x1u << 0) 205 #define PWM_ISR1_CHID1 (0x1u << 1) 206 #define PWM_ISR1_CHID2 (0x1u << 2) 207 #define PWM_ISR1_CHID3 (0x1u << 3) 208 #define PWM_ISR1_CHID4 (0x1u << 4) 209 #define PWM_ISR1_CHID5 (0x1u << 5) 210 #define PWM_ISR1_CHID6 (0x1u << 6) 211 #define PWM_ISR1_CHID7 (0x1u << 7) 212 #define PWM_ISR1_FCHID0 (0x1u << 16) 213 #define PWM_ISR1_FCHID1 (0x1u << 17) 214 #define PWM_ISR1_FCHID2 (0x1u << 18) 215 #define PWM_ISR1_FCHID3 (0x1u << 19) 216 #define PWM_ISR1_FCHID4 (0x1u << 20) 217 #define PWM_ISR1_FCHID5 (0x1u << 21) 218 #define PWM_ISR1_FCHID6 (0x1u << 22) 219 #define PWM_ISR1_FCHID7 (0x1u << 23) 221 #define PWM_SCM_SYNC0 (0x1u << 0) 222 #define PWM_SCM_SYNC1 (0x1u << 1) 223 #define PWM_SCM_SYNC2 (0x1u << 2) 224 #define PWM_SCM_SYNC3 (0x1u << 3) 225 #define PWM_SCM_SYNC4 (0x1u << 4) 226 #define PWM_SCM_SYNC5 (0x1u << 5) 227 #define PWM_SCM_SYNC6 (0x1u << 6) 228 #define PWM_SCM_SYNC7 (0x1u << 7) 229 #define PWM_SCM_UPDM_Pos 16 230 #define PWM_SCM_UPDM_Msk (0x3u << PWM_SCM_UPDM_Pos) 231 #define PWM_SCM_UPDM_MODE0 (0x0u << 16) 232 #define PWM_SCM_UPDM_MODE1 (0x1u << 16) 233 #define PWM_SCM_UPDM_MODE2 (0x2u << 16) 234 #define PWM_SCM_PTRM (0x1u << 20) 235 #define PWM_SCM_PTRCS_Pos 21 236 #define PWM_SCM_PTRCS_Msk (0x7u << PWM_SCM_PTRCS_Pos) 237 #define PWM_SCM_PTRCS(value) ((PWM_SCM_PTRCS_Msk & ((value) << PWM_SCM_PTRCS_Pos))) 239 #define PWM_SCUC_UPDULOCK (0x1u << 0) 241 #define PWM_SCUP_UPR_Pos 0 242 #define PWM_SCUP_UPR_Msk (0xfu << PWM_SCUP_UPR_Pos) 243 #define PWM_SCUP_UPR(value) ((PWM_SCUP_UPR_Msk & ((value) << PWM_SCUP_UPR_Pos))) 244 #define PWM_SCUP_UPRCNT_Pos 4 245 #define PWM_SCUP_UPRCNT_Msk (0xfu << PWM_SCUP_UPRCNT_Pos) 246 #define PWM_SCUP_UPRCNT(value) ((PWM_SCUP_UPRCNT_Msk & ((value) << PWM_SCUP_UPRCNT_Pos))) 248 #define PWM_SCUPUPD_UPRUPD_Pos 0 249 #define PWM_SCUPUPD_UPRUPD_Msk (0xfu << PWM_SCUPUPD_UPRUPD_Pos) 250 #define PWM_SCUPUPD_UPRUPD(value) ((PWM_SCUPUPD_UPRUPD_Msk & ((value) << PWM_SCUPUPD_UPRUPD_Pos))) 252 #define PWM_IER2_WRDY (0x1u << 0) 253 #define PWM_IER2_ENDTX (0x1u << 1) 254 #define PWM_IER2_TXBUFE (0x1u << 2) 255 #define PWM_IER2_UNRE (0x1u << 3) 256 #define PWM_IER2_CMPM0 (0x1u << 8) 257 #define PWM_IER2_CMPM1 (0x1u << 9) 258 #define PWM_IER2_CMPM2 (0x1u << 10) 259 #define PWM_IER2_CMPM3 (0x1u << 11) 260 #define PWM_IER2_CMPM4 (0x1u << 12) 261 #define PWM_IER2_CMPM5 (0x1u << 13) 262 #define PWM_IER2_CMPM6 (0x1u << 14) 263 #define PWM_IER2_CMPM7 (0x1u << 15) 264 #define PWM_IER2_CMPU0 (0x1u << 16) 265 #define PWM_IER2_CMPU1 (0x1u << 17) 266 #define PWM_IER2_CMPU2 (0x1u << 18) 267 #define PWM_IER2_CMPU3 (0x1u << 19) 268 #define PWM_IER2_CMPU4 (0x1u << 20) 269 #define PWM_IER2_CMPU5 (0x1u << 21) 270 #define PWM_IER2_CMPU6 (0x1u << 22) 271 #define PWM_IER2_CMPU7 (0x1u << 23) 273 #define PWM_IDR2_WRDY (0x1u << 0) 274 #define PWM_IDR2_ENDTX (0x1u << 1) 275 #define PWM_IDR2_TXBUFE (0x1u << 2) 276 #define PWM_IDR2_UNRE (0x1u << 3) 277 #define PWM_IDR2_CMPM0 (0x1u << 8) 278 #define PWM_IDR2_CMPM1 (0x1u << 9) 279 #define PWM_IDR2_CMPM2 (0x1u << 10) 280 #define PWM_IDR2_CMPM3 (0x1u << 11) 281 #define PWM_IDR2_CMPM4 (0x1u << 12) 282 #define PWM_IDR2_CMPM5 (0x1u << 13) 283 #define PWM_IDR2_CMPM6 (0x1u << 14) 284 #define PWM_IDR2_CMPM7 (0x1u << 15) 285 #define PWM_IDR2_CMPU0 (0x1u << 16) 286 #define PWM_IDR2_CMPU1 (0x1u << 17) 287 #define PWM_IDR2_CMPU2 (0x1u << 18) 288 #define PWM_IDR2_CMPU3 (0x1u << 19) 289 #define PWM_IDR2_CMPU4 (0x1u << 20) 290 #define PWM_IDR2_CMPU5 (0x1u << 21) 291 #define PWM_IDR2_CMPU6 (0x1u << 22) 292 #define PWM_IDR2_CMPU7 (0x1u << 23) 294 #define PWM_IMR2_WRDY (0x1u << 0) 295 #define PWM_IMR2_ENDTX (0x1u << 1) 296 #define PWM_IMR2_TXBUFE (0x1u << 2) 297 #define PWM_IMR2_UNRE (0x1u << 3) 298 #define PWM_IMR2_CMPM0 (0x1u << 8) 299 #define PWM_IMR2_CMPM1 (0x1u << 9) 300 #define PWM_IMR2_CMPM2 (0x1u << 10) 301 #define PWM_IMR2_CMPM3 (0x1u << 11) 302 #define PWM_IMR2_CMPM4 (0x1u << 12) 303 #define PWM_IMR2_CMPM5 (0x1u << 13) 304 #define PWM_IMR2_CMPM6 (0x1u << 14) 305 #define PWM_IMR2_CMPM7 (0x1u << 15) 306 #define PWM_IMR2_CMPU0 (0x1u << 16) 307 #define PWM_IMR2_CMPU1 (0x1u << 17) 308 #define PWM_IMR2_CMPU2 (0x1u << 18) 309 #define PWM_IMR2_CMPU3 (0x1u << 19) 310 #define PWM_IMR2_CMPU4 (0x1u << 20) 311 #define PWM_IMR2_CMPU5 (0x1u << 21) 312 #define PWM_IMR2_CMPU6 (0x1u << 22) 313 #define PWM_IMR2_CMPU7 (0x1u << 23) 315 #define PWM_ISR2_WRDY (0x1u << 0) 316 #define PWM_ISR2_ENDTX (0x1u << 1) 317 #define PWM_ISR2_TXBUFE (0x1u << 2) 318 #define PWM_ISR2_UNRE (0x1u << 3) 319 #define PWM_ISR2_CMPM0 (0x1u << 8) 320 #define PWM_ISR2_CMPM1 (0x1u << 9) 321 #define PWM_ISR2_CMPM2 (0x1u << 10) 322 #define PWM_ISR2_CMPM3 (0x1u << 11) 323 #define PWM_ISR2_CMPM4 (0x1u << 12) 324 #define PWM_ISR2_CMPM5 (0x1u << 13) 325 #define PWM_ISR2_CMPM6 (0x1u << 14) 326 #define PWM_ISR2_CMPM7 (0x1u << 15) 327 #define PWM_ISR2_CMPU0 (0x1u << 16) 328 #define PWM_ISR2_CMPU1 (0x1u << 17) 329 #define PWM_ISR2_CMPU2 (0x1u << 18) 330 #define PWM_ISR2_CMPU3 (0x1u << 19) 331 #define PWM_ISR2_CMPU4 (0x1u << 20) 332 #define PWM_ISR2_CMPU5 (0x1u << 21) 333 #define PWM_ISR2_CMPU6 (0x1u << 22) 334 #define PWM_ISR2_CMPU7 (0x1u << 23) 336 #define PWM_OOV_OOVH0 (0x1u << 0) 337 #define PWM_OOV_OOVH1 (0x1u << 1) 338 #define PWM_OOV_OOVH2 (0x1u << 2) 339 #define PWM_OOV_OOVH3 (0x1u << 3) 340 #define PWM_OOV_OOVH4 (0x1u << 4) 341 #define PWM_OOV_OOVH5 (0x1u << 5) 342 #define PWM_OOV_OOVH6 (0x1u << 6) 343 #define PWM_OOV_OOVH7 (0x1u << 7) 344 #define PWM_OOV_OOVL0 (0x1u << 16) 345 #define PWM_OOV_OOVL1 (0x1u << 17) 346 #define PWM_OOV_OOVL2 (0x1u << 18) 347 #define PWM_OOV_OOVL3 (0x1u << 19) 348 #define PWM_OOV_OOVL4 (0x1u << 20) 349 #define PWM_OOV_OOVL5 (0x1u << 21) 350 #define PWM_OOV_OOVL6 (0x1u << 22) 351 #define PWM_OOV_OOVL7 (0x1u << 23) 353 #define PWM_OS_OSH0 (0x1u << 0) 354 #define PWM_OS_OSH1 (0x1u << 1) 355 #define PWM_OS_OSH2 (0x1u << 2) 356 #define PWM_OS_OSH3 (0x1u << 3) 357 #define PWM_OS_OSH4 (0x1u << 4) 358 #define PWM_OS_OSH5 (0x1u << 5) 359 #define PWM_OS_OSH6 (0x1u << 6) 360 #define PWM_OS_OSH7 (0x1u << 7) 361 #define PWM_OS_OSL0 (0x1u << 16) 362 #define PWM_OS_OSL1 (0x1u << 17) 363 #define PWM_OS_OSL2 (0x1u << 18) 364 #define PWM_OS_OSL3 (0x1u << 19) 365 #define PWM_OS_OSL4 (0x1u << 20) 366 #define PWM_OS_OSL5 (0x1u << 21) 367 #define PWM_OS_OSL6 (0x1u << 22) 368 #define PWM_OS_OSL7 (0x1u << 23) 370 #define PWM_OSS_OSSH0 (0x1u << 0) 371 #define PWM_OSS_OSSH1 (0x1u << 1) 372 #define PWM_OSS_OSSH2 (0x1u << 2) 373 #define PWM_OSS_OSSH3 (0x1u << 3) 374 #define PWM_OSS_OSSH4 (0x1u << 4) 375 #define PWM_OSS_OSSH5 (0x1u << 5) 376 #define PWM_OSS_OSSH6 (0x1u << 6) 377 #define PWM_OSS_OSSH7 (0x1u << 7) 378 #define PWM_OSS_OSSL0 (0x1u << 16) 379 #define PWM_OSS_OSSL1 (0x1u << 17) 380 #define PWM_OSS_OSSL2 (0x1u << 18) 381 #define PWM_OSS_OSSL3 (0x1u << 19) 382 #define PWM_OSS_OSSL4 (0x1u << 20) 383 #define PWM_OSS_OSSL5 (0x1u << 21) 384 #define PWM_OSS_OSSL6 (0x1u << 22) 385 #define PWM_OSS_OSSL7 (0x1u << 23) 387 #define PWM_OSC_OSCH0 (0x1u << 0) 388 #define PWM_OSC_OSCH1 (0x1u << 1) 389 #define PWM_OSC_OSCH2 (0x1u << 2) 390 #define PWM_OSC_OSCH3 (0x1u << 3) 391 #define PWM_OSC_OSCH4 (0x1u << 4) 392 #define PWM_OSC_OSCH5 (0x1u << 5) 393 #define PWM_OSC_OSCH6 (0x1u << 6) 394 #define PWM_OSC_OSCH7 (0x1u << 7) 395 #define PWM_OSC_OSCL0 (0x1u << 16) 396 #define PWM_OSC_OSCL1 (0x1u << 17) 397 #define PWM_OSC_OSCL2 (0x1u << 18) 398 #define PWM_OSC_OSCL3 (0x1u << 19) 399 #define PWM_OSC_OSCL4 (0x1u << 20) 400 #define PWM_OSC_OSCL5 (0x1u << 21) 401 #define PWM_OSC_OSCL6 (0x1u << 22) 402 #define PWM_OSC_OSCL7 (0x1u << 23) 404 #define PWM_OSSUPD_OSSUPH0 (0x1u << 0) 405 #define PWM_OSSUPD_OSSUPH1 (0x1u << 1) 406 #define PWM_OSSUPD_OSSUPH2 (0x1u << 2) 407 #define PWM_OSSUPD_OSSUPH3 (0x1u << 3) 408 #define PWM_OSSUPD_OSSUPH4 (0x1u << 4) 409 #define PWM_OSSUPD_OSSUPH5 (0x1u << 5) 410 #define PWM_OSSUPD_OSSUPH6 (0x1u << 6) 411 #define PWM_OSSUPD_OSSUPH7 (0x1u << 7) 412 #define PWM_OSSUPD_OSSUPL0 (0x1u << 16) 413 #define PWM_OSSUPD_OSSUPL1 (0x1u << 17) 414 #define PWM_OSSUPD_OSSUPL2 (0x1u << 18) 415 #define PWM_OSSUPD_OSSUPL3 (0x1u << 19) 416 #define PWM_OSSUPD_OSSUPL4 (0x1u << 20) 417 #define PWM_OSSUPD_OSSUPL5 (0x1u << 21) 418 #define PWM_OSSUPD_OSSUPL6 (0x1u << 22) 419 #define PWM_OSSUPD_OSSUPL7 (0x1u << 23) 421 #define PWM_OSCUPD_OSCUPH0 (0x1u << 0) 422 #define PWM_OSCUPD_OSCUPH1 (0x1u << 1) 423 #define PWM_OSCUPD_OSCUPH2 (0x1u << 2) 424 #define PWM_OSCUPD_OSCUPH3 (0x1u << 3) 425 #define PWM_OSCUPD_OSCUPH4 (0x1u << 4) 426 #define PWM_OSCUPD_OSCUPH5 (0x1u << 5) 427 #define PWM_OSCUPD_OSCUPH6 (0x1u << 6) 428 #define PWM_OSCUPD_OSCUPH7 (0x1u << 7) 429 #define PWM_OSCUPD_OSCUPL0 (0x1u << 16) 430 #define PWM_OSCUPD_OSCUPL1 (0x1u << 17) 431 #define PWM_OSCUPD_OSCUPL2 (0x1u << 18) 432 #define PWM_OSCUPD_OSCUPL3 (0x1u << 19) 433 #define PWM_OSCUPD_OSCUPL4 (0x1u << 20) 434 #define PWM_OSCUPD_OSCUPL5 (0x1u << 21) 435 #define PWM_OSCUPD_OSCUPDL6 (0x1u << 22) 436 #define PWM_OSCUPD_OSCUPL7 (0x1u << 23) 438 #define PWM_FMR_FPOL_Pos 0 439 #define PWM_FMR_FPOL_Msk (0xffu << PWM_FMR_FPOL_Pos) 440 #define PWM_FMR_FPOL(value) ((PWM_FMR_FPOL_Msk & ((value) << PWM_FMR_FPOL_Pos))) 441 #define PWM_FMR_FMOD_Pos 8 442 #define PWM_FMR_FMOD_Msk (0xffu << PWM_FMR_FMOD_Pos) 443 #define PWM_FMR_FMOD(value) ((PWM_FMR_FMOD_Msk & ((value) << PWM_FMR_FMOD_Pos))) 444 #define PWM_FMR_FFIL_Pos 16 445 #define PWM_FMR_FFIL_Msk (0xffu << PWM_FMR_FFIL_Pos) 446 #define PWM_FMR_FFIL(value) ((PWM_FMR_FFIL_Msk & ((value) << PWM_FMR_FFIL_Pos))) 448 #define PWM_FSR_FIV_Pos 0 449 #define PWM_FSR_FIV_Msk (0xffu << PWM_FSR_FIV_Pos) 450 #define PWM_FSR_FS_Pos 8 451 #define PWM_FSR_FS_Msk (0xffu << PWM_FSR_FS_Pos) 453 #define PWM_FCR_FCLR_Pos 0 454 #define PWM_FCR_FCLR_Msk (0xffu << PWM_FCR_FCLR_Pos) 455 #define PWM_FCR_FCLR(value) ((PWM_FCR_FCLR_Msk & ((value) << PWM_FCR_FCLR_Pos))) 457 #define PWM_FPV_FPVH0 (0x1u << 0) 458 #define PWM_FPV_FPVH1 (0x1u << 1) 459 #define PWM_FPV_FPVH2 (0x1u << 2) 460 #define PWM_FPV_FPVH3 (0x1u << 3) 461 #define PWM_FPV_FPVH4 (0x1u << 4) 462 #define PWM_FPV_FPVH5 (0x1u << 5) 463 #define PWM_FPV_FPVH6 (0x1u << 6) 464 #define PWM_FPV_FPVH7 (0x1u << 7) 465 #define PWM_FPV_FPVL0 (0x1u << 16) 466 #define PWM_FPV_FPVL1 (0x1u << 17) 467 #define PWM_FPV_FPVL2 (0x1u << 18) 468 #define PWM_FPV_FPVL3 (0x1u << 19) 469 #define PWM_FPV_FPVL4 (0x1u << 20) 470 #define PWM_FPV_FPVL5 (0x1u << 21) 471 #define PWM_FPV_FPVL6 (0x1u << 22) 472 #define PWM_FPV_FPVL7 (0x1u << 23) 474 #define PWM_FPE1_FPE0_Pos 0 475 #define PWM_FPE1_FPE0_Msk (0xffu << PWM_FPE1_FPE0_Pos) 476 #define PWM_FPE1_FPE0(value) ((PWM_FPE1_FPE0_Msk & ((value) << PWM_FPE1_FPE0_Pos))) 477 #define PWM_FPE1_FPE1_Pos 8 478 #define PWM_FPE1_FPE1_Msk (0xffu << PWM_FPE1_FPE1_Pos) 479 #define PWM_FPE1_FPE1(value) ((PWM_FPE1_FPE1_Msk & ((value) << PWM_FPE1_FPE1_Pos))) 480 #define PWM_FPE1_FPE2_Pos 16 481 #define PWM_FPE1_FPE2_Msk (0xffu << PWM_FPE1_FPE2_Pos) 482 #define PWM_FPE1_FPE2(value) ((PWM_FPE1_FPE2_Msk & ((value) << PWM_FPE1_FPE2_Pos))) 483 #define PWM_FPE1_FPE3_Pos 24 484 #define PWM_FPE1_FPE3_Msk (0xffu << PWM_FPE1_FPE3_Pos) 485 #define PWM_FPE1_FPE3(value) ((PWM_FPE1_FPE3_Msk & ((value) << PWM_FPE1_FPE3_Pos))) 487 #define PWM_FPE2_FPE4_Pos 0 488 #define PWM_FPE2_FPE4_Msk (0xffu << PWM_FPE2_FPE4_Pos) 489 #define PWM_FPE2_FPE4(value) ((PWM_FPE2_FPE4_Msk & ((value) << PWM_FPE2_FPE4_Pos))) 490 #define PWM_FPE2_FPE5_Pos 8 491 #define PWM_FPE2_FPE5_Msk (0xffu << PWM_FPE2_FPE5_Pos) 492 #define PWM_FPE2_FPE5(value) ((PWM_FPE2_FPE5_Msk & ((value) << PWM_FPE2_FPE5_Pos))) 493 #define PWM_FPE2_FPE6_Pos 16 494 #define PWM_FPE2_FPE6_Msk (0xffu << PWM_FPE2_FPE6_Pos) 495 #define PWM_FPE2_FPE6(value) ((PWM_FPE2_FPE6_Msk & ((value) << PWM_FPE2_FPE6_Pos))) 496 #define PWM_FPE2_FPE7_Pos 24 497 #define PWM_FPE2_FPE7_Msk (0xffu << PWM_FPE2_FPE7_Pos) 498 #define PWM_FPE2_FPE7(value) ((PWM_FPE2_FPE7_Msk & ((value) << PWM_FPE2_FPE7_Pos))) 500 #define PWM_ELMR_CSEL0 (0x1u << 0) 501 #define PWM_ELMR_CSEL1 (0x1u << 1) 502 #define PWM_ELMR_CSEL2 (0x1u << 2) 503 #define PWM_ELMR_CSEL3 (0x1u << 3) 504 #define PWM_ELMR_CSEL4 (0x1u << 4) 505 #define PWM_ELMR_CSEL5 (0x1u << 5) 506 #define PWM_ELMR_CSEL6 (0x1u << 6) 507 #define PWM_ELMR_CSEL7 (0x1u << 7) 509 #define PWM_SMMR_GCEN0 (0x1u << 0) 510 #define PWM_SMMR_GCEN1 (0x1u << 1) 511 #define PWM_SMMR_GCEN2 (0x1u << 2) 512 #define PWM_SMMR_GCEN3 (0x1u << 3) 513 #define PWM_SMMR_DOWN0 (0x1u << 16) 514 #define PWM_SMMR_DOWN1 (0x1u << 17) 515 #define PWM_SMMR_DOWN2 (0x1u << 18) 516 #define PWM_SMMR_DOWN3 (0x1u << 19) 518 #define PWM_WPCR_WPCMD_Pos 0 519 #define PWM_WPCR_WPCMD_Msk (0x3u << PWM_WPCR_WPCMD_Pos) 520 #define PWM_WPCR_WPCMD(value) ((PWM_WPCR_WPCMD_Msk & ((value) << PWM_WPCR_WPCMD_Pos))) 521 #define PWM_WPCR_WPRG0 (0x1u << 2) 522 #define PWM_WPCR_WPRG1 (0x1u << 3) 523 #define PWM_WPCR_WPRG2 (0x1u << 4) 524 #define PWM_WPCR_WPRG3 (0x1u << 5) 525 #define PWM_WPCR_WPRG4 (0x1u << 6) 526 #define PWM_WPCR_WPRG5 (0x1u << 7) 527 #define PWM_WPCR_WPKEY_Pos 8 528 #define PWM_WPCR_WPKEY_Msk (0xffffffu << PWM_WPCR_WPKEY_Pos) 529 #define PWM_WPCR_WPKEY(value) ((PWM_WPCR_WPKEY_Msk & ((value) << PWM_WPCR_WPKEY_Pos))) 531 #define PWM_WPSR_WPSWS0 (0x1u << 0) 532 #define PWM_WPSR_WPSWS1 (0x1u << 1) 533 #define PWM_WPSR_WPSWS2 (0x1u << 2) 534 #define PWM_WPSR_WPSWS3 (0x1u << 3) 535 #define PWM_WPSR_WPSWS4 (0x1u << 4) 536 #define PWM_WPSR_WPSWS5 (0x1u << 5) 537 #define PWM_WPSR_WPVS (0x1u << 7) 538 #define PWM_WPSR_WPHWS0 (0x1u << 8) 539 #define PWM_WPSR_WPHWS1 (0x1u << 9) 540 #define PWM_WPSR_WPHWS2 (0x1u << 10) 541 #define PWM_WPSR_WPHWS3 (0x1u << 11) 542 #define PWM_WPSR_WPHWS4 (0x1u << 12) 543 #define PWM_WPSR_WPHWS5 (0x1u << 13) 544 #define PWM_WPSR_WPVSRC_Pos 16 545 #define PWM_WPSR_WPVSRC_Msk (0xffffu << PWM_WPSR_WPVSRC_Pos) 547 #define PWM_TPR_TXPTR_Pos 0 548 #define PWM_TPR_TXPTR_Msk (0xffffffffu << PWM_TPR_TXPTR_Pos) 549 #define PWM_TPR_TXPTR(value) ((PWM_TPR_TXPTR_Msk & ((value) << PWM_TPR_TXPTR_Pos))) 551 #define PWM_TCR_TXCTR_Pos 0 552 #define PWM_TCR_TXCTR_Msk (0xffffu << PWM_TCR_TXCTR_Pos) 553 #define PWM_TCR_TXCTR(value) ((PWM_TCR_TXCTR_Msk & ((value) << PWM_TCR_TXCTR_Pos))) 555 #define PWM_TNPR_TXNPTR_Pos 0 556 #define PWM_TNPR_TXNPTR_Msk (0xffffffffu << PWM_TNPR_TXNPTR_Pos) 557 #define PWM_TNPR_TXNPTR(value) ((PWM_TNPR_TXNPTR_Msk & ((value) << PWM_TNPR_TXNPTR_Pos))) 559 #define PWM_TNCR_TXNCTR_Pos 0 560 #define PWM_TNCR_TXNCTR_Msk (0xffffu << PWM_TNCR_TXNCTR_Pos) 561 #define PWM_TNCR_TXNCTR(value) ((PWM_TNCR_TXNCTR_Msk & ((value) << PWM_TNCR_TXNCTR_Pos))) 563 #define PWM_PTCR_RXTEN (0x1u << 0) 564 #define PWM_PTCR_RXTDIS (0x1u << 1) 565 #define PWM_PTCR_TXTEN (0x1u << 8) 566 #define PWM_PTCR_TXTDIS (0x1u << 9) 568 #define PWM_PTSR_RXTEN (0x1u << 0) 569 #define PWM_PTSR_TXTEN (0x1u << 8) 571 #define PWM_CMPV_CV_Pos 0 572 #define PWM_CMPV_CV_Msk (0xffffffu << PWM_CMPV_CV_Pos) 573 #define PWM_CMPV_CV(value) ((PWM_CMPV_CV_Msk & ((value) << PWM_CMPV_CV_Pos))) 574 #define PWM_CMPV_CVM (0x1u << 24) 576 #define PWM_CMPVUPD_CVUPD_Pos 0 577 #define PWM_CMPVUPD_CVUPD_Msk (0xffffffu << PWM_CMPVUPD_CVUPD_Pos) 578 #define PWM_CMPVUPD_CVUPD(value) ((PWM_CMPVUPD_CVUPD_Msk & ((value) << PWM_CMPVUPD_CVUPD_Pos))) 579 #define PWM_CMPVUPD_CVMUPD (0x1u << 24) 581 #define PWM_CMPM_CEN (0x1u << 0) 582 #define PWM_CMPM_CTR_Pos 4 583 #define PWM_CMPM_CTR_Msk (0xfu << PWM_CMPM_CTR_Pos) 584 #define PWM_CMPM_CTR(value) ((PWM_CMPM_CTR_Msk & ((value) << PWM_CMPM_CTR_Pos))) 585 #define PWM_CMPM_CPR_Pos 8 586 #define PWM_CMPM_CPR_Msk (0xfu << PWM_CMPM_CPR_Pos) 587 #define PWM_CMPM_CPR(value) ((PWM_CMPM_CPR_Msk & ((value) << PWM_CMPM_CPR_Pos))) 588 #define PWM_CMPM_CPRCNT_Pos 12 589 #define PWM_CMPM_CPRCNT_Msk (0xfu << PWM_CMPM_CPRCNT_Pos) 590 #define PWM_CMPM_CPRCNT(value) ((PWM_CMPM_CPRCNT_Msk & ((value) << PWM_CMPM_CPRCNT_Pos))) 591 #define PWM_CMPM_CUPR_Pos 16 592 #define PWM_CMPM_CUPR_Msk (0xfu << PWM_CMPM_CUPR_Pos) 593 #define PWM_CMPM_CUPR(value) ((PWM_CMPM_CUPR_Msk & ((value) << PWM_CMPM_CUPR_Pos))) 594 #define PWM_CMPM_CUPRCNT_Pos 20 595 #define PWM_CMPM_CUPRCNT_Msk (0xfu << PWM_CMPM_CUPRCNT_Pos) 596 #define PWM_CMPM_CUPRCNT(value) ((PWM_CMPM_CUPRCNT_Msk & ((value) << PWM_CMPM_CUPRCNT_Pos))) 598 #define PWM_CMPMUPD_CENUPD (0x1u << 0) 599 #define PWM_CMPMUPD_CTRUPD_Pos 4 600 #define PWM_CMPMUPD_CTRUPD_Msk (0xfu << PWM_CMPMUPD_CTRUPD_Pos) 601 #define PWM_CMPMUPD_CTRUPD(value) ((PWM_CMPMUPD_CTRUPD_Msk & ((value) << PWM_CMPMUPD_CTRUPD_Pos))) 602 #define PWM_CMPMUPD_CPRUPD_Pos 8 603 #define PWM_CMPMUPD_CPRUPD_Msk (0xfu << PWM_CMPMUPD_CPRUPD_Pos) 604 #define PWM_CMPMUPD_CPRUPD(value) ((PWM_CMPMUPD_CPRUPD_Msk & ((value) << PWM_CMPMUPD_CPRUPD_Pos))) 605 #define PWM_CMPMUPD_CUPRUPD_Pos 16 606 #define PWM_CMPMUPD_CUPRUPD_Msk (0xfu << PWM_CMPMUPD_CUPRUPD_Pos) 607 #define PWM_CMPMUPD_CUPRUPD(value) ((PWM_CMPMUPD_CUPRUPD_Msk & ((value) << PWM_CMPMUPD_CUPRUPD_Pos))) 609 #define PWM_CMR_CPRE_Pos 0 610 #define PWM_CMR_CPRE_Msk (0xfu << PWM_CMR_CPRE_Pos) 611 #define PWM_CMR_CPRE_MCK (0x0u << 0) 612 #define PWM_CMR_CPRE_MCK_DIV_2 (0x1u << 0) 613 #define PWM_CMR_CPRE_MCK_DIV_4 (0x2u << 0) 614 #define PWM_CMR_CPRE_MCK_DIV_8 (0x3u << 0) 615 #define PWM_CMR_CPRE_MCK_DIV_16 (0x4u << 0) 616 #define PWM_CMR_CPRE_MCK_DIV_32 (0x5u << 0) 617 #define PWM_CMR_CPRE_MCK_DIV_64 (0x6u << 0) 618 #define PWM_CMR_CPRE_MCK_DIV_128 (0x7u << 0) 619 #define PWM_CMR_CPRE_MCK_DIV_256 (0x8u << 0) 620 #define PWM_CMR_CPRE_MCK_DIV_512 (0x9u << 0) 621 #define PWM_CMR_CPRE_MCK_DIV_1024 (0xAu << 0) 622 #define PWM_CMR_CPRE_CLKA (0xBu << 0) 623 #define PWM_CMR_CPRE_CLKB (0xCu << 0) 624 #define PWM_CMR_CALG (0x1u << 8) 625 #define PWM_CMR_CPOL (0x1u << 9) 626 #define PWM_CMR_CES (0x1u << 10) 627 #define PWM_CMR_DTE (0x1u << 16) 628 #define PWM_CMR_DTHI (0x1u << 17) 629 #define PWM_CMR_DTLI (0x1u << 18) 631 #define PWM_CDTY_CDTY_Pos 0 632 #define PWM_CDTY_CDTY_Msk (0xffffffu << PWM_CDTY_CDTY_Pos) 633 #define PWM_CDTY_CDTY(value) ((PWM_CDTY_CDTY_Msk & ((value) << PWM_CDTY_CDTY_Pos))) 635 #define PWM_CDTYUPD_CDTYUPD_Pos 0 636 #define PWM_CDTYUPD_CDTYUPD_Msk (0xffffffu << PWM_CDTYUPD_CDTYUPD_Pos) 637 #define PWM_CDTYUPD_CDTYUPD(value) ((PWM_CDTYUPD_CDTYUPD_Msk & ((value) << PWM_CDTYUPD_CDTYUPD_Pos))) 639 #define PWM_CPRD_CPRD_Pos 0 640 #define PWM_CPRD_CPRD_Msk (0xffffffu << PWM_CPRD_CPRD_Pos) 641 #define PWM_CPRD_CPRD(value) ((PWM_CPRD_CPRD_Msk & ((value) << PWM_CPRD_CPRD_Pos))) 643 #define PWM_CPRDUPD_CPRDUPD_Pos 0 644 #define PWM_CPRDUPD_CPRDUPD_Msk (0xffffffu << PWM_CPRDUPD_CPRDUPD_Pos) 645 #define PWM_CPRDUPD_CPRDUPD(value) ((PWM_CPRDUPD_CPRDUPD_Msk & ((value) << PWM_CPRDUPD_CPRDUPD_Pos))) 647 #define PWM_CCNT_CNT_Pos 0 648 #define PWM_CCNT_CNT_Msk (0xffffffu << PWM_CCNT_CNT_Pos) 650 #define PWM_DT_DTH_Pos 0 651 #define PWM_DT_DTH_Msk (0xffffu << PWM_DT_DTH_Pos) 652 #define PWM_DT_DTH(value) ((PWM_DT_DTH_Msk & ((value) << PWM_DT_DTH_Pos))) 653 #define PWM_DT_DTL_Pos 16 654 #define PWM_DT_DTL_Msk (0xffffu << PWM_DT_DTL_Pos) 655 #define PWM_DT_DTL(value) ((PWM_DT_DTL_Msk & ((value) << PWM_DT_DTL_Pos))) 657 #define PWM_DTUPD_DTHUPD_Pos 0 658 #define PWM_DTUPD_DTHUPD_Msk (0xffffu << PWM_DTUPD_DTHUPD_Pos) 659 #define PWM_DTUPD_DTHUPD(value) ((PWM_DTUPD_DTHUPD_Msk & ((value) << PWM_DTUPD_DTHUPD_Pos))) 660 #define PWM_DTUPD_DTLUPD_Pos 16 661 #define PWM_DTUPD_DTLUPD_Msk (0xffffu << PWM_DTUPD_DTLUPD_Pos) 662 #define PWM_DTUPD_DTLUPD(value) ((PWM_DTUPD_DTLUPD_Msk & ((value) << PWM_DTUPD_DTLUPD_Pos))) RwReg PWM_FPE2
(Pwm Offset: 0x70) PWM Fault Protection Enable Register 2
Definition: component_pwm.h:90
volatile uint32_t RwReg
Definition: sam3n00a.h:54
#define PWMCMP_NUMBER
Pwm hardware registers.
Definition: component_pwm.h:59
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
RwReg PWM_FPE1
(Pwm Offset: 0x6C) PWM Fault Protection Enable Register 1
Definition: component_pwm.h:89
PwmCmp hardware registers.
Definition: component_pwm.h:52