FreeRTOS port on GAP8/RISC-V
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gap9/pmsis/include/pmsis/implem/drivers/fll/fll.h File Reference

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...
 

Macro Definition Documentation

#define FLL_CLUSTER_FV_SLOPE
#define FLL_CLUSTER_MAX_FREQUENCY
#define FLL_CLUSTER_MIN_FREQUENCY
#define FLL_LV_MAX_FREQUENCY
#define FLL_NV_MAX_FREQUENCY
#define FLL_SOC_FV_SLOPE
#define FLL_SOC_MAX_FREQUENCY
#define FLL_SOC_MIN_FREQUENCY

Function Documentation

static int pi_fll_cluster_max_freq_at_voltage ( int  voltage)
inlinestatic
Parameters
voltageGiven voltage
Returns
max frquency.

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 
)
Parameters
fll_idFLL domain.
realCompute current frequency.
Note
If real param is set, current frequency is computed from HW registers.
Returns
Frequency value.

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().

static int pi_fll_soc_max_freq_at_voltage ( int  voltage)
inlinestatic
Parameters
voltageGiven voltage
Returns
max frquency.

References DCDC_DEFAULT_LV, FLL_SOC_FV_SLOPE, and FLL_SOC_MIN_FREQUENCY.