HPM SDK
HPMicro Software Development Kit
hpm_pllctl_drv.c File Reference
#include "hpm_pllctl_drv.h"

Macros

#define PLLCTL_INT_PLL_MAX_FBDIV   (2400U)
 
#define PLLCTL_INT_PLL_MIN_FBDIV   (16U)
 
#define PLLCTL_FRAC_PLL_MAX_FBDIV   (240U)
 
#define PLLCTL_FRAC_PLL_MIN_FBDIV   (20U)
 
#define PLLCTL_PLL_MAX_REFDIV   (63U)
 
#define PLLCTL_PLL_MIN_REFDIV   (1U)
 
#define PLLCTL_PLL_MAX_POSTDIV1   (7U)
 
#define PLLCTL_PLL_MIN_POSTDIV1   (1U)
 
#define PLLCTL_FRAC_PLL_MIN_REF   (10000000U)
 
#define PLLCTL_INT_PLL_MIN_REF   (1000000U)
 

Functions

hpm_stat_t pllctl_set_pll_work_mode (PLLCTL_Type *ptr, uint8_t pll, bool int_mode)
 Sets the operating mode of a specified PLL. More...
 
hpm_stat_t pllctl_set_refdiv (PLLCTL_Type *ptr, uint8_t pll, uint8_t div)
 Sets the reference divider for a specified PLL. More...
 
hpm_stat_t pllctl_init_int_pll_with_freq (PLLCTL_Type *ptr, uint8_t pll, uint32_t freq_in_hz)
 Initializes a PLL in integer mode for a specific frequency. More...
 
hpm_stat_t pllctl_init_frac_pll_with_freq (PLLCTL_Type *ptr, uint8_t pll, uint32_t freq_in_hz)
 Initializes a PLL in fractional mode for a specific frequency. More...
 
uint32_t pllctl_get_pll_freq_in_hz (PLLCTL_Type *ptr, uint8_t pll)
 Gets the current frequency of a specified PLL. More...
 
hpm_stat_t pllctl_pll_ss_enable (PLLCTL_Type *ptr, uint8_t pll, uint8_t spread, uint8_t div, bool down_spread)
 Enables spread spectrum mode for a specified PLL. More...
 
hpm_stat_t pllctl_pll_setup_spread_spectrum (PLLCTL_Type *ptr, uint8_t pll, uint8_t ss_range, uint32_t modulation_freq, pllctl_ss_type ss_type)
 Configures spread spectrum settings for a specified PLL. More...
 

Macro Definition Documentation

◆ PLLCTL_FRAC_PLL_MAX_FBDIV

#define PLLCTL_FRAC_PLL_MAX_FBDIV   (240U)

◆ PLLCTL_FRAC_PLL_MIN_FBDIV

#define PLLCTL_FRAC_PLL_MIN_FBDIV   (20U)

◆ PLLCTL_FRAC_PLL_MIN_REF

#define PLLCTL_FRAC_PLL_MIN_REF   (10000000U)

◆ PLLCTL_INT_PLL_MAX_FBDIV

#define PLLCTL_INT_PLL_MAX_FBDIV   (2400U)

◆ PLLCTL_INT_PLL_MIN_FBDIV

#define PLLCTL_INT_PLL_MIN_FBDIV   (16U)

◆ PLLCTL_INT_PLL_MIN_REF

#define PLLCTL_INT_PLL_MIN_REF   (1000000U)

◆ PLLCTL_PLL_MAX_POSTDIV1

#define PLLCTL_PLL_MAX_POSTDIV1   (7U)

◆ PLLCTL_PLL_MAX_REFDIV

#define PLLCTL_PLL_MAX_REFDIV   (63U)

◆ PLLCTL_PLL_MIN_POSTDIV1

#define PLLCTL_PLL_MIN_POSTDIV1   (1U)

◆ PLLCTL_PLL_MIN_REFDIV

#define PLLCTL_PLL_MIN_REFDIV   (1U)