Atmel SAM4S-XPLD Atmel ATSAM4S-XPLD ATSAM4S-XPLD Hoja De Datos

Los códigos de productos
ATSAM4S-XPLD
Descargar
Página de 1125
 878
SAM4S [DATASHEET]
11100E–ATARM–24-Jul-13
38.6.5.7 Write Protect Registers
To prevent any single software error that may corrupt PWM behavior, the registers listed below can be write-protected by
writing the field WPCMD in the 
 (PWM_WPCR). They are divided into
6 groups:
Register group 0:
Register group 1:
Register group 2:
Register group 3:
Register group 4:
Register group 5:
There are two types of Write Protect:
Write Protect SW, which can be enabled or disabled.
Write Protect HW, which can just be enabled, only a hardware reset of the PWM controller can disable it.
Both types of Write Protect can be applied independently to a particular register group by means of the WPCMD and
WPRG fields in PWM_WPCR register. If at least one Write Protect is active, the register group is write-protected. The
field WPCMD allows to perform the following actions depending on its value:
0 = Disabling the Write Protect SW of the register groups of which the bit WPRG is at 1.
1 = Enabling the Write Protect SW of the register groups of which the bit WPRG is at 1.
2 = Enabling the Write Protect HW of the register groups of which the bit WPRG is at 1.
At any time, the user can determine which Write Protect is active in which register group by the fields WPSWS and
WPHWS in the 
 (PWM_WPSR).
If a write access in a write-protected register is detected, then the WPVS flag in the PWM_WPSR register is set and the
field WPVSRC indicates in which register the write access has been attempted, through its address offset without the two
LSBs.
The WPVS and PWM_WPSR fields are automatically reset after reading the PWM_WPSR register.