The IEP module can be configured in 32-bit shadow
mode when IEP_CMP_CFG_REG[17] SHADOW_EN bit is set to 1h (default value is 0h, e.g.
64-bit mode of operation is enabled). In this mode, the controller counter will be in
32-bit mode of operation. This enables the shadow copy functionality of the compare
registers.
Rules of operation:
- Switching the state of the
controller counter
from 32-bit Shadow mode to 64-bit mode of operation, the counter should be
disabled and bit IEP_CMP_CFG_REG[17] SHADOW_EN should be cleared to 0h
(default value).
- A new compare update
(IEP_CMP_CFG_REG[16-1] CMP_EN = 1h - enables CMP[0:15] event, where
[0]CMP_EN maps to CMP0) should be set 4 cycle counts before the next
rollover or reset of the counter and to insure the correct shadow copy to
active update is correct.
Sequence of
operation:
- Disable counter trough
IEP_GLOBAL_CFG_REG[0] CNT_ENABLE = 0h (default value).
- Clear controller counter
through IEP_CMP_CFG_REG[17] SHADOW_EN = 0h (64-bit mode of operation)
- Enable 32-bit Shadow mode
through IEP_CMP_CFG_REG[17] SHADOW_EN bit (value: 1h)
- Program IEP_CMPm_REGn (where
m = 0 to 15 and n = 0 to 1); use the upper 32-bits (IEP_CMP0_REG1[31-0]
CMP0_1) of the 64-bit CMP
- The lower 32-bits are
the active compare value (IEP_CMPm_REG0[31-0] CMPm_0, where m = 0 to
15), software can only read this bits
- The upper 32-bits are
the shadow copy (IEP_CMPm_REG1[31-0] CMPm_1, where m = 0 to 15),
software can write and read this bits
- Enable counter trough
IEP_GLOBAL_CFG_REG[0] CNT_ENABLE = 1h
After the counter is enabled, then software can
load a new set of CMP[0:15] without affecting the current active values of
(IEP_CMPm_REG0[31-0] CMPm_0, where m = 0 to 15). Only when the counter is reset to
32-bit Shadow mode (IEP_CMP_CFG_REG[17] SHADOW_EN = 1h), it will load the shadow
copy of IEP_CMPm_REG1[31-0] CMPm_1 into local copy.
Shadow compare value (IEP_CMPm_REG1[31-0] CMPm_1)
is loaded into active register IEP_CMPm_REG0[31-0] CMPm_0 when the controller counter is
configured in 32-bit Shadow mode. If IEP_CMP_CFG_REG[0] CMP0_RST_CNT_EN bit is
enabled (value 1h) to reset the counter, the next reset event will be defined by the
last CMP0 update.