
155
7734Q–AVR–02/12
AT90PWM81/161
Figure 13-7. Update at the end of complete PSCR cycle.
The software can stop the cycle before the end to update the values and restart a new PSCR
cycle.
13.6.1
Value Update Synchronization
New timing values or PSCR output configuration can be written during the PSCR cycle. Thanks
to LOCK and AUTOLOCK configuration bits, the new whole set of values can be taken into
account with the following conditions:
When AUTOLOCK configuration is selected, the update of the PSCR internal registers will be
done at the end of the PSCR cycle following a write in the Output Compare Register RB. The
AUTOLOCK configuration bit is taken into account at the end of the first PSCR cycle
When LOCK configuration bit is set, there is no update. The update of the PSCR internal
registers will be done at the end of the PSCR cycle if the LOCK bit is released to zero
The registers which update is synchronized thanks to LOCK and AUTOLOCK are OCRrSAH/L,
OCRrRAH/L, OCRrSBH/L, OCRrRBH/L and PSOCr. PISELrA1 and PISELrB1 bits of PSOCr are
immediatly updated in order to behave as PISELrA0 and PISELrB0.
See these register’s description starting on
page 172.When set, AUTOLOCK configuration bit prevails over LOCK configuration bit.
13.7
Enhanced resolution
The PSCR includes the same resolut i on enhancement as in PSC. Please see
13.8
PSCR Inputs
Each part A or B of PSCR has its own system to take into account one PSCR input. According to
on page 175), PSCrIN0/1 input can act has a Retrigger or Fault input.
This system A or B is also configured by this PSCR Input A/B Control Register (PFRCrA/B).
Software
PSC
Regulation Loop
Calculation
Writting in
PSC Registers
Cycle
With Set i
Cycle
With Set i
Cycle
With Set i
Cycle
With Set i
Cycle
With Set j
End of Cycle
Request for
an Update