Go to the source code of this file.
Macros | |
#define | _ASM_NOP_ asm("tnop") |
#define | CLOCK_DLY_1_CYC _ASM_NOP_ |
instruction delay. More... | |
#define | CLOCK_DLY_2_CYC _ASM_NOP_;_ASM_NOP_ |
#define | CLOCK_DLY_3_CYC _ASM_NOP_;_ASM_NOP_;_ASM_NOP_ |
#define | CLOCK_DLY_4_CYC _ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_ |
#define | CLOCK_DLY_5_CYC _ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_ |
#define | CLOCK_DLY_6_CYC _ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_ |
#define | CLOCK_DLY_7_CYC _ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_ |
#define | CLOCK_DLY_8_CYC _ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_ |
#define | CLOCK_DLY_9_CYC _ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_ |
#define | CLOCK_DLY_10_CYC _ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_ |
#define | SYSCLK_RC_CLOCK_EN 0 |
select RC as system clock More... | |
Enumerations | |
enum | SYS_CLK_TypeDef { SYS_CLK_12M_Crystal = 0x44, SYS_CLK_16M_Crystal = 0x43, SYS_CLK_24M_Crystal = 0x42, SYS_CLK_32M_Crystal = 0x60, SYS_CLK_48M_Crystal = 0x20, SYS_CLK_RC_THRES = 0x10, SYS_CLK_24M_RC = 0x00, SYS_CLK_32M_RC = 0x01, SYS_CLK_48M_RC = 0x02 } |
system clock type. More... | |
enum | CLK_32K_TypeDef { CLK_32K_RC =0, CLK_32K_XTAL =1 } |
32K clock type. More... | |
Functions | |
void | clock_init (SYS_CLK_TypeDef SYS_CLK) |
This function to select the system clock source. More... | |
static int | clock_get_system_clk (void) |
This function to get the system clock source. More... | |
void | clock_32k_init (CLK_32K_TypeDef src) |
This function serves to set 32k clock source. More... | |
void | rc_24m_cal (void) |
This function performs to select 24M as the system clock source. More... | |
void | rc_48m_cal (void) |
This function performs to select 48M RC as the system clock source. More... | |
void | rc_32k_cal (void) |
This function performs to select 32K as the system clock source. More... | |
void | doubler_calibration (void) |
This function performs to calibration the source clock. More... | |
Variables | |
unsigned char | system_clk_type |
#define _ASM_NOP_ asm("tnop") |
#define CLOCK_DLY_1_CYC _ASM_NOP_ |
instruction delay.
#define CLOCK_DLY_8_CYC _ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_ |
#define CLOCK_DLY_9_CYC _ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_ |
#define CLOCK_DLY_10_CYC _ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_;_ASM_NOP_ |
#define SYSCLK_RC_CLOCK_EN 0 |
select RC as system clock
enum SYS_CLK_TypeDef |
enum CLK_32K_TypeDef |
void clock_init | ( | SYS_CLK_TypeDef | SYS_CLK | ) |
This function to select the system clock source.
[in] | SYS_CLK | - the clock source of the system clock. |
|
inlinestatic |
This function to get the system clock source.
[in] | none |
void clock_32k_init | ( | CLK_32K_TypeDef | src | ) |
This function serves to set 32k clock source.
variable | of 32k type. |
void rc_24m_cal | ( | void | ) |
This function performs to select 24M as the system clock source.
[in] | none. |
void rc_48m_cal | ( | void | ) |
This function performs to select 48M RC as the system clock source.
[in] | none. |
void rc_32k_cal | ( | void | ) |
This function performs to select 32K as the system clock source.
[in] | none. |
void doubler_calibration | ( | void | ) |
This function performs to calibration the source clock.
[in] | none. |
unsigned char system_clk_type |