XC2200 Derivatives
System Units (Vol. 1 of 2)
System Control Unit (SCU)
User’s Manual
6-240
V2.1, 2008-08
SCU, V1.13
6.14
Register Control
This block handles the register accesses of the SCU and the register access control for
all system register that use one of the following protection modes:
•
Unprotected Mode
•
Write Protection Mode
•
Secured Mode
6.14.1
Register Access Control
There are some dedicated registers that control critical system functions and modes.
These registers are protected by a special register security mechanism so these vital
system functions cannot be changed inadvertently after the executing of the EINIT
instruction. However, as these registers control central system behavior they need to be
accessed during operation. The system control software gets this access via a special
security state machine.
If an access violation is detected a trap trigger request is generated.
This security mechanism controls the following security levels wich can be configured via
register SLC:
•
Unprotected Mode
No protection is active. Registers can be written at any time. This mode is entered
after the Application Reset.
•
Write Protected Mode
Protected registers are locked against any write access. Write accesses have no
effect on these registers. This mode is entered automatically after the EINIT
instruction is executed.
•
Secured Mode
Protected registers can be written using a special command. Registers that are
protected by this mode are marked in
as Sec protected.
Access in Secured Mode can be achieved by preceding the intended write access
with writing “command 4” to register SLC. After writing “command 4” to register SLC
the register protection mechanism remains disabled until the next write to a register
on the PD+Bus (SFR, ESFR, XSFR area), i.e. accesses to registers (e.g. CSFR)
outside this area do not enable the protection again automatically. Therefore, the lock
mechanism after writing “command 4” works differently depending on the register
address. Normally one single write access to a protected register is enabled. After
this write access the protected registers are locked again automatically. Thereafter,
“command 4” has to be written again in order to enable the next write to a protected
register. The lock mechanism is not enabled again after a write access to a CSFR
register or to a LXBus peripheral register (XLOC area, e.g. USIC, CAN, IMB).
Note: In Secured Mode the re-enabling of register protection with respect to the write
address after “command 4” can lead to an unexpected, not obvious behaviour of