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

Data Structures

struct  pi_freq_cb_t
 

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
 

Typedefs

typedef void(* pi_freq_func_t )(void *arg)
 

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_V (int voltage)
 Calculate FC SOC domain's max frequency with certain voltage. More...
 
static int pi_fll_cluster_max_freq_at_V (int voltage)
 Calculate cluster domain's max frequency with certain voltage. More...
 
static void pi_freq_callback_init (pi_freq_cb_t *cb, pi_freq_func_t func, void *args)
 
int pi_freq_callback_add (pi_freq_cb_t *cb)
 
int pi_freq_callback_remove (pi_freq_cb_t *cb)
 
void pi_freq_callback_exec (void)
 

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

Typedef Documentation

typedef void(* pi_freq_func_t)(void *arg)

Function Documentation

static int pi_fll_cluster_max_freq_at_V ( 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.
int32_t pi_fll_frequency_set ( uint8_t  fll_id,
uint32_t  frequency,
uint8_t  check 
)
Parameters
fll_idFLL domain.
frequencyFrequency value to set.
checkCheck frequency(with current voltage).
Returns
Set frequency.
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.

Parameters
fll_idFLL domain.
frequencyInitial frequency.
static int pi_fll_soc_max_freq_at_V ( int  voltage)
inlinestatic
Parameters
voltageGiven voltage
Returns
max frquency.

References DCDC_DEFAULT_LV, FLL_SOC_FV_SLOPE, and FLL_SOC_MIN_FREQUENCY.

int pi_freq_callback_add ( pi_freq_cb_t cb)
void pi_freq_callback_exec ( void  )
static void pi_freq_callback_init ( pi_freq_cb_t cb,
pi_freq_func_t  func,
void *  args 
)
inlinestatic
int pi_freq_callback_remove ( pi_freq_cb_t cb)