FreeRTOS port on GAP8/RISC-V
|
Macros | |
#define | FLL_LV_MAX_FREQUENCY |
#define | FLL_NV_MAX_FREQUENCY |
#define | FLL_SOC_MIN_FREQUENCY |
#define | FLL_SOC_MAX_FREQUENCY |
#define | FLL_CLUSTER_MIN_FREQUENCY |
#define | FLL_CLUSTER_MAX_FREQUENCY |
#define | FLL_SOC_FV_SLOPE |
#define | FLL_CLUSTER_FV_SLOPE |
Functions | |
void | pi_fll_init (uint8_t fll_id, uint32_t frequency) |
Initialize an FLL. More... | |
int32_t | pi_fll_frequency_set (uint8_t fll_id, uint32_t frequency, uint8_t check) |
Set FLL to given frequency. More... | |
uint32_t | pi_fll_frequency_get (uint8_t fll_id, uint8_t real) |
Get FLL frequency. More... | |
static int | pi_fll_soc_max_freq_at_voltage (int voltage) |
Calculate FC SOC domain's max frequency with certain voltage. More... | |
static int | pi_fll_cluster_max_freq_at_voltage (int voltage) |
Calculate cluster domain's max frequency with certain voltage. More... | |
#define FLL_CLUSTER_FV_SLOPE |
Referenced by pi_fll_cluster_max_freq_at_voltage().
#define FLL_CLUSTER_MAX_FREQUENCY |
#define FLL_CLUSTER_MIN_FREQUENCY |
Referenced by pi_fll_cluster_max_freq_at_voltage().
#define FLL_LV_MAX_FREQUENCY |
#define FLL_NV_MAX_FREQUENCY |
#define FLL_SOC_FV_SLOPE |
Referenced by pi_fll_soc_max_freq_at_voltage().
#define FLL_SOC_MAX_FREQUENCY |
#define FLL_SOC_MIN_FREQUENCY |
Referenced by pi_fll_soc_max_freq_at_voltage().
|
inlinestatic |
voltage | Given voltage |
References DCDC_DEFAULT_LV, FLL_CLUSTER_FV_SLOPE, and FLL_CLUSTER_MIN_FREQUENCY.
uint32_t pi_fll_frequency_get | ( | uint8_t | fll_id, |
uint8_t | real | ||
) |
fll_id | FLL domain. |
real | Compute current frequency. |
References __pi_fll_frequency_from_mult_div_get(), g_fll_frequency, hal_fll_conf1_div_get(), and hal_fll_status_mult_factor_get().
Referenced by pi_freq_get().
int32_t pi_fll_frequency_set | ( | uint8_t | fll_id, |
uint32_t | frequency, | ||
uint8_t | check | ||
) |
fll_id | FLL domain. |
frequency | Frequency value to set. |
check | Check frequency(with current voltage). |
References __pi_fll_frequency_from_mult_div_get(), __pi_fll_mult_div_from_frequency_get(), abs(), fll_ctrl_conf2_t::assert_cycles, fll_ctrl_conf1_t::clock_out_divider, fll_ctrl_conf2_t::config_clock_sel, fll_ctrl_conf2_t::de_assert_cycles, fll_ctrl_conf2_t::dithering, FLL_ID_FC, FLL_TRACE, g_fll_frequency, hal_fll_conf1_div_get(), hal_fll_conf1_mask_set(), hal_fll_conf2_mask_set(), hal_fll_mult_div_set(), hal_fll_status_mult_factor_get(), fll_ctrl_conf2_t::lock_tolerance, fll_ctrl_conf2_t::loop_gain, fll_ctrl_conf1_t::mode, fll_ctrl_conf1_t::mult_factor, fll_ctrl_conf2_t::open_loop, fll_ctrl_conf1_t::output_lock_enable, pi_freq_callback_exec(), printf, fll_ctrl_conf1_t::raw, fll_ctrl_conf2_t::raw, and system_core_clock_update().
Referenced by pi_fll_init(), and pi_freq_set().
void pi_fll_init | ( | uint8_t | fll_id, |
uint32_t | frequency | ||
) |
This function initializes an FLL at a given frequency if param is not null.
fll_id | FLL domain. |
frequency | Initial frequency. |
References __pi_fll_mult_div_from_frequency_get(), fll_ctrl_conf2_t::assert_cycles, fll_ctrl_conf2_t::config_clock_sel, fll_ctrl_conf2_t::de_assert_cycles, fll_ctrl_conf2_t::dithering, fll, FLL_TRACE, g_fll_frequency, hal_fll_clock_conf_mask_set(), hal_fll_conf1_get(), hal_fll_conf1_mask_set(), hal_fll_conf2_mask_set(), hal_fll_dco_set(), hal_fll_integrator_set(), hal_fll_mult_div_set(), fll_ctrl_integrator_t::int_part, fll_ctrl_conf2_t::lock_tolerance, fll_ctrl_conf2_t::loop_gain, fll_ctrl_conf1_t::mode, fll_ctrl_conf2_t::open_loop, pi_fll_frequency_set(), PI_FLL_ITG_PER, fll_ctrl_conf1_t::raw, fll_ctrl_conf2_t::raw, and fll_ctrl_integrator_t::raw.
Referenced by __pi_pmu_init(), and pi_pmu_init().
|
inlinestatic |
voltage | Given voltage |
References DCDC_DEFAULT_LV, FLL_SOC_FV_SLOPE, and FLL_SOC_MIN_FREQUENCY.