FreeRTOS port on GAP8/RISC-V
|
Macros | |
#define | LOG2_MAXDCO |
#define | LOG2_MAXDIV |
#define | LOG2_REFCLK |
#define | LOG2_MAXM |
Functions | |
static uint32_t | __pi_fll_mult_div_from_frequency_get (uint32_t freq, uint32_t *mult, uint32_t *div) |
static uint32_t | __pi_fll_frequency_from_mult_div_get (uint32_t mult, uint32_t div) |
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... | |
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) |
Variables | |
static volatile uint32_t | g_fll_frequency [ARCHI_NB_FLL] |
static pi_freq_cb_t * | g_freq_cb |
#define LOG2_MAXDCO |
FreqOut = (Fref * Mult)/2^(Div-1) With Mult on 16 bits and Div on 4 bits
#define LOG2_MAXDIV |
#define LOG2_MAXM |
#define LOG2_REFCLK |
Referenced by __pi_fll_frequency_from_mult_div_get(), and __pi_fll_mult_div_from_frequency_get().
|
static |
References ARCHI_FLL_REF_CLOCK, and LOG2_REFCLK.
Referenced by pi_fll_frequency_get(), and pi_fll_frequency_set().
|
static |
References __FL1, __MAX, and LOG2_REFCLK.
Referenced by pi_fll_frequency_set().
uint32_t pi_fll_frequency_get | ( | uint8_t | fll_id, |
uint8_t | real | ||
) |
fll_id | FLL domain. |
real | Compute current frequency. |
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). |
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. |
Referenced by __pi_pmu_init(), and pi_pmu_init().
int pi_freq_callback_add | ( | pi_freq_cb_t * | cb | ) |
References g_freq_cb, pi_freq_cb_t::next, and pi_freq_cb_t::prev.
Referenced by __pi_i2c_open(), __pi_pwm_open(), __pi_spi_open(), and __pi_uart_open().
void pi_freq_callback_exec | ( | void | ) |
References pi_freq_cb_t::args, pi_freq_cb_t::function, g_freq_cb, and pi_freq_cb_t::next.
Referenced by pi_fll_frequency_set().
int pi_freq_callback_remove | ( | pi_freq_cb_t * | cb | ) |
References g_freq_cb, pi_freq_cb_t::next, and pi_freq_cb_t::prev.
Referenced by __pi_i2c_close(), __pi_pwm_close(), __pi_spi_close(), and __pi_uart_close().
|
static |
Referenced by pi_fll_frequency_get(), and pi_fll_frequency_set().
|
static |
Referenced by pi_freq_callback_add(), pi_freq_callback_exec(), and pi_freq_callback_remove().