Name
Frequency Control — control ARM and CORE frequencies
Synopsis
#include <cyg/hal/hal_io.h>
void hal_bcm283x_set_freqencies(
cyg_uint32 arm
cyg_uint32 core
)
;
Description
The BCM283X GPU has control over the frequencies of the
various clocks that feed the hardware. Of these the most
important are the ARM clock, which feeds the CPUs and the CORE
clock which feeds most of the peripherals. On booting, the HAL
reads the current, minimum and maximum values of these clocks
and stores them in global variables. The UART and EMMC clocks
are also read and recorded. The ARM and CORE clocks are then
set to either the maximum values, or values set in the HAL
configuration
(CYGHWR_HAL_ARM_CORTEXA_BCM283X_ARM_FREQ
and
CYGHWR_HAL_ARM_CORTEXA_BCM283X_CORE_FREQ
).
eCos does not contain any support for dynamic frequency
management in the same way that Linux does. The CPUs run at a
single frequency throughout. Normally this is the maximum
frequency permitted without overclocking. A different
frequency may be selected in the configuration, or it may be
set at runtime by calling
hal_bcm283x_set_freqencies()
.
The function hal_bcm283x_set_freqencies()
updates either or both the ARM or CORE clock frequencies. The
frequencies are given in Hz, and if zero are not
changed. Values that lie below the minimum frequency for the
clock are increased to the minimum and those above the maximum
are reduced to the maximum. Other clock-related values, such
as the mini-UART baud rate divider (which divides the CORE
frequency), may also be changed. Finally, the curent values of
the main clocks in the system are read back from the GPU to
ensure that the correct values are used.
2024-03-18 | eCosPro Non-Commercial Public License |