Datasheet

1049
SAM3X / SAM3A [DATASHEET]
Atmel-11057C-ATARM-SAM3X-SAM3A-Datasheet_23-Mar-15
38.7.41 PWM Channel Period Update Register
Name: PWM_CPRDUPDx [x=0..7]
Address: 0x40094210 [0], 0x40094230 [1], 0x40094250 [2], 0x40094270 [3], 0x40094290 [4], 0x400942B0 [5],
0x400942D0 [6], 0x400942F0 [7]
Access: Write-only
This register can only be written if the bits WPSWS3 and WPHWS3 are cleared in “PWM Write Protect Status Register” on
page 1039.
This register acts as a double buffer for the CPRD value. This prevents an unexpected waveform when modifying the
waveform period.
Only the first 16 bits (channel counter size) are significant.
CPRDUPD: Channel Period Update
If the waveform is left-aligned, then the output waveform period depends on the channel counter source clock and can be
calculated:
–By using the PWM master clock (MCK) divided by an X given prescaler value (with X being 1, 2, 4, 8, 16, 32,
64, 128, 256, 512, or 1024). The resulting period formula will be:
–By using the PWM master clock (MCK) divided by one of both DIVA or DIVB divider, the formula becomes,
respectively:
or
If the waveform is center-aligned, then the output waveform period depends on the channel counter source clock and can
be calculated:
–By using the PWM master clock (MCK) divided by an X given prescaler value (with X being 1, 2, 4, 8, 16, 32,
64
, 128, 256, 512, or 1024). The resulting period formula will be:
–By using the PWM master clock (MCK) divided by one of both DIVA or DIVB divider, the formula becomes,
respectively:
or
31 30 29 28 27 26 25 24
––––––––
23 22 21 20 19 18 17 16
CPRDUPD
15 14 13 12 11 10 9 8
CPRDUPD
76543210
CPRDUPD
X CPRDUPD×()
MCK
--------------------------------------------
CRPDUPD DIVA×()
MCK
--------------------------------------------------------
CRPDUPD DIVB×()
MCK
--------------------------------------------------------
2 X CPRDUPD××()
MCK
------------------------------------------------------
2 CPRDUPD DIVA××()
MCK
-----------------------------------------------------------------
2 CPRDUPD× DIVB×()
MCK
-----------------------------------------------------------------