Speed Modes Support
The CPU bean supports up to three different speed modes. The
three speed modes are a Processor Expert-specific concept which (among
all the other PE features and concepts) ensures the portability of the PE
projects between different CPU models.
In fact, the 3 speed modes are a generalization of all the possible CPU
clock speed modes used for power-saving that can be found in most of
modern microcontrollers. In the area of embedded systems, power saving and
power management functions are so important that we could not neglect the
proper HW- independent software implementation of these functions.
Therefore, for keeping the portability (HW independence) of PE projects,
we recommend not to program the CPU speed functions manually, but use
these 3 CPU Bean speed modes instead:
- High speed mode - this mode is selected after
reset and must be enabled in the project. This speed mode must be the
fastest mode of the main CPU clock.
- Low speed mode - this mode is usually used for
another PLL or main prescaler settings of the main CPU clock.
- Slow speed mode - this mode is usually used
for the slowest possible mode of the main CPU clock.
The modes can be switched in the runtime by the following CPU Bean
methods: (SetHighSpeed, SetLowSpeed and SetSlowSpeed). If a speed
mode is enabled in the CPU Bean properties, the corresponding method will
be enabled automatically.
For each bean in the project, whose function is dependent on the CPU
timing:
- Using the bean property "CPU clock/speed
selection", it is possible to define the speed modes that the
bean supports. If the CPU speed mode is changed to a mode which the
bean does not support for some reason, the bean will be disabled right
after the CPU speed mode is changed. Otherwise the bean will be
enabled.
- During the design, all the timing-related settings
for such a bean are checked to be correct in all the speed modes that
the bean supports (is enabled in).
- If the speed mode is changed, the current settings
for the bean will be conserved.
- Before or after the speed mode is changed, the
following event functions are called: BeforeNewSpeed, AfterNewSpeed.
[top of page]
|