Generic clocks are configurable clocks which run outside the system clock domain. They are often connected to peripherals which have an asynchronous component running independently of the bus clock, e.g. USB controllers, low-power timers and RTCs, etc.
Note that not all platforms have support for generic clocks; on such platforms, this API will not be available.
◆ GENCLK_PCK_0
◆ GENCLK_PCK_1
◆ GENCLK_PCK_2
◆ genclk_divider
Enumerator |
---|
GENCLK_PCK_PRES_1 | Set PCK clock prescaler to 1.
|
GENCLK_PCK_PRES_2 | Set PCK clock prescaler to 2.
|
GENCLK_PCK_PRES_4 | Set PCK clock prescaler to 4.
|
GENCLK_PCK_PRES_8 | Set PCK clock prescaler to 8.
|
GENCLK_PCK_PRES_16 | Set PCK clock prescaler to 16.
|
GENCLK_PCK_PRES_32 | Set PCK clock prescaler to 32.
|
GENCLK_PCK_PRES_64 | Set PCK clock prescaler to 64.
|
Definition at line 84 of file same70/genclk.h.
◆ genclk_source
Generic clock source ID.
Each generic clock may be generated from a different clock source. These are the available alternatives provided by the chip.
Enumerator |
---|
GENCLK_PCK_SRC_SLCK_RC | Internal 32kHz RC oscillator as PCK source clock.
|
GENCLK_PCK_SRC_SLCK_XTAL | External 32kHz crystal oscillator as PCK source clock.
|
GENCLK_PCK_SRC_SLCK_BYPASS | External 32kHz bypass oscillator as PCK source clock.
|
GENCLK_PCK_SRC_MAINCK_4M_RC | Internal 4MHz RC oscillator as PCK source clock.
|
GENCLK_PCK_SRC_MAINCK_8M_RC | Internal 8MHz RC oscillator as PCK source clock.
|
GENCLK_PCK_SRC_MAINCK_12M_RC | Internal 12MHz RC oscillator as PCK source clock.
|
GENCLK_PCK_SRC_MAINCK_XTAL | External crystal oscillator as PCK source clock.
|
GENCLK_PCK_SRC_MAINCK_BYPASS | External bypass oscillator as PCK source clock.
|
GENCLK_PCK_SRC_PLLACK | Use PLLACK as PCK source clock.
|
GENCLK_PCK_SRC_MCK | Use Master Clk as PCK source clock.
|
Definition at line 66 of file same70/genclk.h.
◆ genclk_config_defaults()
static void genclk_config_defaults |
( |
struct genclk_config * |
p_cfg, |
|
|
uint32_t |
ul_id |
|
) |
| |
|
inlinestatic |
◆ genclk_config_read()
static void genclk_config_read |
( |
struct genclk_config * |
p_cfg, |
|
|
uint32_t |
ul_id |
|
) |
| |
|
inlinestatic |
◆ genclk_config_set_divider()
static void genclk_config_set_divider |
( |
struct genclk_config * |
p_cfg, |
|
|
uint32_t |
e_divider |
|
) |
| |
|
inlinestatic |
◆ genclk_config_set_source()
Select a new source clock src in configuration cfg.
Definition at line 122 of file same70/genclk.h.
◆ genclk_config_write()
static void genclk_config_write |
( |
const struct genclk_config * |
p_cfg, |
|
|
uint32_t |
ul_id |
|
) |
| |
|
inlinestatic |
◆ genclk_disable()
static void genclk_disable |
( |
uint32_t |
ul_id | ) |
|
|
inlinestatic |
◆ genclk_enable()
static void genclk_enable |
( |
const struct genclk_config * |
p_cfg, |
|
|
uint32_t |
ul_id |
|
) |
| |
|
inlinestatic |
◆ genclk_enable_config()
static void genclk_enable_config |
( |
unsigned int |
id, |
|
|
enum genclk_source |
src, |
|
|
unsigned int |
divider |
|
) |
| |
|
inlinestatic |
Enable the configuration defined by src and divider for the generic clock identified by id.
- Parameters
-
id | The ID of the generic clock. |
src | The source clock of the generic clock. |
divider | The divider used to generate the generic clock. |
Definition at line 176 of file genclk.h.
◆ genclk_enable_source()
Enable the source clock src used by a generic clock.
Definition at line 175 of file same70/genclk.h.