PLLCTLV2 driver APIs. More...
Functions | |
| static bool | pllctlv2_xtal_is_stable (PLLCTLV2_Type *ptr) |
| Check if external crystal is stable. More... | |
| static bool | pllctlv2_xtal_is_enabled (PLLCTLV2_Type *ptr) |
| Check if external crystal is enabled. More... | |
| static void | pllctlv2_xtal_set_rampup_time (PLLCTLV2_Type *ptr, uint32_t rc24m_cycles) |
| Set external crystal ramp-up time. More... | |
| static bool | pllctlv2_pll_is_stable (PLLCTLV2_Type *ptr, uint8_t pll) |
| Check is PLL is stable. More... | |
| static bool | pllctlv2_pll_is_enabled (PLLCTLV2_Type *ptr, uint8_t pll) |
| Check if PLL is enabled. More... | |
| static void | pllctlv2_select_reference_clock (PLLCTLV2_Type *ptr, uint8_t pll, uint8_t src) |
| Select the PLL reference clock. More... | |
| void | pllctlv2_enable_spread_spectrum (PLLCTLV2_Type *ptr, uint8_t pll, uint32_t step, uint32_t stop) |
| Enable PLL Spread Spectrum feature. More... | |
| static void | pllctlv2_disable_spread_spectrum (PLLCTLV2_Type *ptr, uint8_t pll) |
| Disable PLL Spread spectrum. More... | |
| static void | pllctlv2_set_pll_lock_time (PLLCTLV2_Type *ptr, uint8_t pll, uint32_t xtal_cycles) |
| Set PLL lock time. More... | |
| static void | pllctlv2_set_pll_step_time (PLLCTLV2_Type *ptr, uint8_t pll, uint32_t xtal_cycles) |
| Set PLL step time. More... | |
| void | pllctlv2_set_postdiv (PLLCTLV2_Type *ptr, uint8_t pll, uint8_t div_index, uint8_t div_value) |
| Set PLL Post divider. More... | |
| hpm_stat_t | pllctlv2_set_pll_with_mfi_mfn (PLLCTLV2_Type *ptr, uint8_t pll, uint32_t mfi, uint32_t mfn) |
| Set the PLL via the low-level MFI, MFD and MFN PLL frequency = REF CLOCK * (mfi + 1.0 * mfn / mfd) More... | |
| hpm_stat_t | pllctlv2_init_pll_with_freq (PLLCTLV2_Type *ptr, uint8_t pll, uint32_t freq_in_hz) |
| Initialize PLL to specified frequency Note: the specified PLL clock needs to be enabled before being configured. More... | |
| uint32_t | pllctlv2_get_pll_freq_in_hz (PLLCTLV2_Type *ptr, uint8_t pll) |
| Get the specified PLl clock frequency. More... | |
| uint32_t | pllctlv2_get_pll_postdiv_freq_in_hz (PLLCTLV2_Type *ptr, uint8_t pll, uint8_t div_index) |
| Get the selected PLL post divider frequency. More... | |
PLLCTLV2 driver APIs.
|
inlinestatic |
#include <drivers/inc/hpm_pllctlv2_drv.h>
Disable PLL Spread spectrum.
| [in] | ptr | PLLCTLV2 base address |
| [in] | pll | PLL index |
| void pllctlv2_enable_spread_spectrum | ( | PLLCTLV2_Type * | ptr, |
| uint8_t | pll, | ||
| uint32_t | step, | ||
| uint32_t | stop | ||
| ) |
#include <drivers/inc/hpm_pllctlv2_drv.h>
Enable PLL Spread Spectrum feature.
| [in] | ptr | PLLCTLV2 base address |
| [in] | pll | PLL index |
| [in] | step | Step of spread spectrum modulator |
| [in] | stop | Stop point of spread spectrum modulator |
| uint32_t pllctlv2_get_pll_freq_in_hz | ( | PLLCTLV2_Type * | ptr, |
| uint8_t | pll | ||
| ) |
#include <drivers/inc/hpm_pllctlv2_drv.h>
Get the specified PLl clock frequency.
| [in] | ptr | PLLCTLV2 base |
| [in] | pll | PLL index |
| uint32_t pllctlv2_get_pll_postdiv_freq_in_hz | ( | PLLCTLV2_Type * | ptr, |
| uint8_t | pll, | ||
| uint8_t | div_index | ||
| ) |
#include <drivers/inc/hpm_pllctlv2_drv.h>
Get the selected PLL post divider frequency.
| [in] | ptr | PLLCTLV2 base |
| [in] | pll | PLL index |
| [in] | div_index | Post divider index |
| hpm_stat_t pllctlv2_init_pll_with_freq | ( | PLLCTLV2_Type * | ptr, |
| uint8_t | pll, | ||
| uint32_t | freq_in_hz | ||
| ) |
#include <drivers/inc/hpm_pllctlv2_drv.h>
Initialize PLL to specified frequency Note: the specified PLL clock needs to be enabled before being configured.
| [in] | ptr | PLLCTLV2 base |
| [in] | pll | PLL index |
| [in] | freq_in_hz | expected PLL frequency |
| status_invalid_argument | some parameters are invalid |
| status_success | operation is successful |
< PLLCTLV2 PLL MFN Factor
|
inlinestatic |
#include <drivers/inc/hpm_pllctlv2_drv.h>
Check if PLL is enabled.
| [in] | ptr | PLLCTLV2 base address |
| [in] | pll | PLL index |
|
inlinestatic |
#include <drivers/inc/hpm_pllctlv2_drv.h>
Check is PLL is stable.
| [in] | ptr | PLLCTLv2 base address |
| [in] | pll | PLL index |
|
inlinestatic |
#include <drivers/inc/hpm_pllctlv2_drv.h>
Select the PLL reference clock.
| [in] | ptr | PLLCTLV2 base address |
| [in] | pll | PLL index |
| [in] | src | PLL reference lcock source
|
|
inlinestatic |
#include <drivers/inc/hpm_pllctlv2_drv.h>
Set PLL lock time.
| [in] | ptr | PLLCTLV2 base address |
| [in] | pll | PLL index |
| [in] | xtal_cycles | external Crystal cycles |
|
inlinestatic |
#include <drivers/inc/hpm_pllctlv2_drv.h>
Set PLL step time.
| [in] | ptr | PLLCTLV2 base address |
| [in] | pll | PLL index |
| [in] | xtal_cycles | external Crystal cycles |
| hpm_stat_t pllctlv2_set_pll_with_mfi_mfn | ( | PLLCTLV2_Type * | ptr, |
| uint8_t | pll, | ||
| uint32_t | mfi, | ||
| uint32_t | mfn | ||
| ) |
#include <drivers/inc/hpm_pllctlv2_drv.h>
Set the PLL via the low-level MFI, MFD and MFN PLL frequency = REF CLOCK * (mfi + 1.0 * mfn / mfd)
| [in] | ptr | PLLCTLV2 base |
| [in] | pll | PLL index |
| [in] | mfi | MFI value |
| [in] | mfn | MFN value |
| status_invalid_argument | some parameters are invalid |
| status_success | operation is successful |
| void pllctlv2_set_postdiv | ( | PLLCTLV2_Type * | ptr, |
| uint8_t | pll, | ||
| uint8_t | div_index, | ||
| uint8_t | div_value | ||
| ) |
#include <drivers/inc/hpm_pllctlv2_drv.h>
Set PLL Post divider.
| [in] | ptr | PLLCTLV2 base |
| [in] | pll | PLL index |
| [in] | div_index | Divider index |
| [in] | div_value | divider value, divider factor is 1 + div_value / 5 |
|
inlinestatic |
#include <drivers/inc/hpm_pllctlv2_drv.h>
Check if external crystal is enabled.
| [in] | ptr | PLLCTLV2 base address |
|
inlinestatic |
#include <drivers/inc/hpm_pllctlv2_drv.h>
Check if external crystal is stable.
| [in] | ptr | PLLCTLV2 base address |
|
inlinestatic |
#include <drivers/inc/hpm_pllctlv2_drv.h>
Set external crystal ramp-up time.
| [in] | ptr | PLLCTLV2 base address |
| [in] | rc24m_cycles | Cycles of RC24M clock |