Atmel Evaluation Kit for AT32uC3A0512, 32-Bit AVR Microcontroller Atmel ATEVK1105 ATEVK1105 Data Sheet

Product codes
ATEVK1105
Page of 826
682
AT32UC3A
Figure 32-6.
Synchronized Period or Duty Cycle Update 
To prevent overwriting the CUPDx by software, the user can use status events in order to syn-
chronize his software. Two methods are possible. In both, the user must enable the dedicated
interrupt in IER at PWM Controller level. 
The first method (polling method) consists of reading the relevant status bit in ISR Register
according to the enabled channel(s). See 
.
The second method uses an Interrupt Service Routine associated with the PWM channel. 
Note:
Reading the ISR register automatically clears CHIDx flags.
Figure 32-7.
Polling Method 
Note:
Polarity and alignment can be modified only when the channel is disabled. 
PWM_CUPDx Value
PWM_CPRDx
PWM_CDTYx
End of Cycle
PWM_CMRx. CPD
User's Writing
1
0
Writing in PWM_CUPDx 
The last write has been taken into account
CHIDx = 1
Writing in CPD field
Update of the Period or Duty Cycle
PWM_ISR Read
Acknowledgement and clear previous register state
YES
32058K
AVR32-01/12