| NANO100_BSP V3.05.000 The Board Support Package for Nano100BN Series

Modules | Macros
CLK Exported Constants
NANO100 Device Driver » CLK Driver
Collaboration diagram for CLK Exported Constants:

## Modules
| CLK Exported Functions

## Macros
#define | FREQ_128MHZ 128000000
#define | FREQ_120MHZ 120000000
#define | FREQ_48MHZ 48000000
#define | FREQ_42MHZ 42000000
#define | FREQ_32MHZ 32000000
#define | FREQ_24MHZ 24000000
#define | FREQ_12MHZ 12000000
#define | CLK_PWRCTL_HXT_EN (0x1UL<<CLK_PWRCTL_HXT_EN_Pos)
#define | CLK_PWRCTL_LXT_EN (0x1UL<<CLK_PWRCTL_LXT_EN_Pos)
#define | CLK_PWRCTL_HIRC_EN (0x1UL<<CLK_PWRCTL_HIRC_EN_Pos)
#define | CLK_PWRCTL_LIRC_EN (0x1UL<<CLK_PWRCTL_LIRC_EN_Pos)
#define | CLK_PWRCTL_DELY_EN (0x1UL<<CLK_PWRCTL_WK_DLY_Pos)
#define | CLK_PWRCTL_WAKEINT_EN (0x1UL<<CLK_PWRCTL_PD_WK_IE_Pos)
#define | CLK_PWRCTL_PWRDOWN_EN (0x1UL<<CLK_PWRCTL_PD_EN_Pos)
#define | CLK_PWRCTL_HXT_SELXT (0x1UL<<CLK_PWRCTL_HXT_SELXT_Pos)
#define | CLK_PWRCTL_HXT_GAIN (0x1UL<<CLK_PWRCTL_HXT_GAIN_Pos)
#define | CLK_PWRCTL_LXT_SCNT (0x1UL<<CLK_PWRCTL_LXT_SCNT_Pos)
#define | CLK_AHBCLK_GPIO_EN (0x1UL<<CLK_AHBCLK_GPIO_EN_Pos)
#define | CLK_AHBCLK_DMA_EN (0x1UL<<CLK_AHBCLK_DMA_EN_Pos)
#define | CLK_AHBCLK_ISP_EN (0x1UL<<CLK_AHBCLK_ISP_EN_Pos)
#define | CLK_AHBCLK_EBI_EN (0x1UL<<CLK_AHBCLK_EBI_EN_Pos)
#define | CLK_AHBCLK_SRAM_EN (0x1UL<<CLK_AHBCLK_SRAM_EN_Pos)
#define | CLK_AHBCLK_TICK_EN (0x1UL<<CLK_AHBCLK_TICK_EN_Pos)
#define | CLK_APBCLK_WDT_EN (0x1UL<<CLK_APBCLK_WDT_EN_Pos)
#define | CLK_APBCLK_RTC_EN (0x1UL<<CLK_APBCLK_RTC_EN_Pos)
#define | CLK_APBCLK_TMR0_EN (0x1UL<<CLK_APBCLK_TMR0_EN_Pos)
#define | CLK_APBCLK_TMR1_EN (0x1UL<<CLK_APBCLK_TMR1_EN_Pos)
#define | CLK_APBCLK_TMR2_EN (0x1UL<<CLK_APBCLK_TMR2_EN_Pos)
#define | CLK_APBCLK_TMR3_EN (0x1UL<<CLK_APBCLK_TMR3_EN_Pos)
#define | CLK_APBCLK_FDIV_EN (0x1UL<<CLK_APBCLK_FDIV_EN_Pos)
#define | CLK_APBCLK_SC2_EN (0x1UL<<CLK_APBCLK_SC2_EN_Pos)
#define | CLK_APBCLK_I2C0_EN (0x1UL<<CLK_APBCLK_I2C0_EN_Pos)
#define | CLK_APBCLK_I2C1_EN (0x1UL<<CLK_APBCLK_I2C1_EN_Pos)
#define | CLK_APBCLK_SPI0_EN (0x1UL<<CLK_APBCLK_SPI0_EN_Pos)
#define | CLK_APBCLK_SPI1_EN (0x1UL<<CLK_APBCLK_SPI1_EN_Pos)
#define | CLK_APBCLK_SPI2_EN (0x1UL<<CLK_APBCLK_SPI2_EN_Pos)
#define | CLK_APBCLK_UART0_EN (0x1UL<<CLK_APBCLK_UART0_EN_Pos)
#define | CLK_APBCLK_UART1_EN (0x1UL<<CLK_APBCLK_UART1_EN_Pos)
#define | CLK_APBCLK_PWM0_CH01_EN (0x1UL<<CLK_APBCLK_PWM0_CH01_EN_Pos)
#define | CLK_APBCLK_PWM0_CH23_EN (0x1UL<<CLK_APBCLK_PWM0_CH23_EN_Pos)
#define | CLK_APBCLK_PWM1_CH01_EN (0x1UL<<CLK_APBCLK_PWM1_CH01_EN_Pos)
#define | CLK_APBCLK_PWM1_CH23_EN (0x1UL<<CLK_APBCLK_PWM1_CH23_EN_Pos)
#define | CLK_APBCLK_DAC_EN (0x1UL<<CLK_APBCLK_DAC_EN_Pos)
#define | CLK_APBCLK_LCD_EN (0x1UL<<CLK_APBCLK_LCD_EN_Pos)
#define | CLK_APBCLK_USBD_EN (0x1UL<<CLK_APBCLK_USBD_EN_Pos)
#define | CLK_APBCLK_ADC_EN (0x1UL<<CLK_APBCLK_ADC_EN_Pos)
#define | CLK_APBCLK_I2S_EN (0x1UL<<CLK_APBCLK_I2S_EN_Pos)
#define | CLK_APBCLK_SC0_EN (0x1UL<<CLK_APBCLK_SC0_EN_Pos)
#define | CLK_APBCLK_SC1_EN (0x1UL<<CLK_APBCLK_SC1_EN_Pos)
#define | CLK_CLKSTATUS_HXT_STB (0x1UL<<CLK_CLKSTATUS_HXT_STB_Pos)
#define | CLK_CLKSTATUS_LXT_STB (0x1UL<<CLK_CLKSTATUS_LXT_STB_Pos)
#define | CLK_CLKSTATUS_PLL_STB (0x1UL<<CLK_CLKSTATUS_PLL_STB_Pos)
#define | CLK_CLKSTATUS_LIRC_STB (0x1UL<<CLK_CLKSTATUS_LIRC_STB_Pos)
#define | CLK_CLKSTATUS_HIRC_STB (0x1UL<<CLK_CLKSTATUS_HIRC_STB_Pos)
#define | CLK_CLKSTATUS_CLK_SW_FAIL (0x1UL<<CLK_CLKSTATUS_CLK_SW_FAIL_Pos)
#define | CLK_CLKSEL0_HCLK_S_HXT (0UL<<CLK_CLKSEL0_HCLK_S_Pos)
#define | CLK_CLKSEL0_HCLK_S_LXT (1UL<<CLK_CLKSEL0_HCLK_S_Pos)
#define | CLK_CLKSEL0_HCLK_S_PLL (2UL<<CLK_CLKSEL0_HCLK_S_Pos)
#define | CLK_CLKSEL0_HCLK_S_LIRC (3UL<<CLK_CLKSEL0_HCLK_S_Pos)
#define | CLK_CLKSEL0_HCLK_S_HIRC (7UL<<CLK_CLKSEL0_HCLK_S_Pos)
#define | CLK_CLKSEL1_LCD_S_LXT (0x0UL<<CLK_CLKSEL1_LCD_S_Pos)
#define | CLK_CLKSEL1_TMR1_S_HXT (0x0UL<<CLK_CLKSEL1_TMR1_S_Pos)
#define | CLK_CLKSEL1_TMR1_S_LXT (0x1UL<<CLK_CLKSEL1_TMR1_S_Pos)
#define | CLK_CLKSEL1_TMR1_S_LIRC (0x2UL<<CLK_CLKSEL1_TMR1_S_Pos)
#define | CLK_CLKSEL1_TMR1_S_EXT (0x3UL<<CLK_CLKSEL1_TMR1_S_Pos)
#define | CLK_CLKSEL1_TMR1_S_HIRC (0x4UL<<CLK_CLKSEL1_TMR1_S_Pos)
#define | CLK_CLKSEL1_TMR0_S_HXT (0x0UL<<CLK_CLKSEL1_TMR0_S_Pos)
#define | CLK_CLKSEL1_TMR0_S_LXT (0x1UL<<CLK_CLKSEL1_TMR0_S_Pos)
#define | CLK_CLKSEL1_TMR0_S_LIRC (0x2UL<<CLK_CLKSEL1_TMR0_S_Pos)
#define | CLK_CLKSEL1_TMR0_S_EXT (0x3UL<<CLK_CLKSEL1_TMR0_S_Pos)
#define | CLK_CLKSEL1_TMR0_S_HIRC (0x4UL<<CLK_CLKSEL1_TMR0_S_Pos)
#define | CLK_CLKSEL1_PWM0_CH01_S_HXT (0x0UL<<CLK_CLKSEL1_PWM0_CH01_S_Pos)
#define | CLK_CLKSEL1_PWM0_CH01_S_LXT (0x1UL<<CLK_CLKSEL1_PWM0_CH01_S_Pos)
#define | CLK_CLKSEL1_PWM0_CH01_S_HCLK (0x2UL<<CLK_CLKSEL1_PWM0_CH01_S_Pos)
#define | CLK_CLKSEL1_PWM0_CH01_S_HIRC (0x3UL<<CLK_CLKSEL1_PWM0_CH01_S_Pos)
#define | CLK_CLKSEL1_PWM0_CH23_S_HXT (0x0UL<<CLK_CLKSEL1_PWM0_CH23_S_Pos)
#define | CLK_CLKSEL1_PWM0_CH23_S_LXT (0x1UL<<CLK_CLKSEL1_PWM0_CH23_S_Pos)
#define | CLK_CLKSEL1_PWM0_CH23_S_HCLK (0x2UL<<CLK_CLKSEL1_PWM0_CH23_S_Pos)
#define | CLK_CLKSEL1_PWM0_CH23_S_HIRC (0x3UL<<CLK_CLKSEL1_PWM0_CH23_S_Pos)
#define | CLK_CLKSEL1_ADC_S_HXT (0x0UL<<CLK_CLKSEL1_ADC_S_Pos)
#define | CLK_CLKSEL1_ADC_S_LXT (0x1UL<<CLK_CLKSEL1_ADC_S_Pos)
#define | CLK_CLKSEL1_ADC_S_PLL (0x2UL<<CLK_CLKSEL1_ADC_S_Pos)
#define | CLK_CLKSEL1_ADC_S_HIRC (0x3UL<<CLK_CLKSEL1_ADC_S_Pos)
#define | CLK_CLKSEL1_UART_S_HXT (0x0UL<<CLK_CLKSEL1_UART_S_Pos)
#define | CLK_CLKSEL1_UART_S_LXT (0x1UL<<CLK_CLKSEL1_UART_S_Pos)
#define | CLK_CLKSEL1_UART_S_PLL (0x2UL<<CLK_CLKSEL1_UART_S_Pos)
#define | CLK_CLKSEL1_UART_S_HIRC (0x3UL<<CLK_CLKSEL1_UART_S_Pos)
#define | CLK_CLKSEL2_SPI2_S_PLL (0x0UL<<CLK_CLKSEL2_SPI2_S_Pos)
#define | CLK_CLKSEL2_SPI2_S_HCLK (0x1UL<<CLK_CLKSEL2_SPI2_S_Pos)
#define | CLK_CLKSEL2_SPI1_S_PLL (0x0UL<<CLK_CLKSEL2_SPI1_S_Pos)
#define | CLK_CLKSEL2_SPI1_S_HCLK (0x1UL<<CLK_CLKSEL2_SPI1_S_Pos)
#define | CLK_CLKSEL2_SPI0_S_PLL (0x0UL<<CLK_CLKSEL2_SPI0_S_Pos)
#define | CLK_CLKSEL2_SPI0_S_HCLK (0x1UL<<CLK_CLKSEL2_SPI0_S_Pos)
#define | CLK_CLKSEL2_SC_S_HXT (0x0UL<<CLK_CLKSEL2_SC_S_Pos)
#define | CLK_CLKSEL2_SC_S_PLL (0x1UL<<CLK_CLKSEL2_SC_S_Pos)
#define | CLK_CLKSEL2_SC_S_HIRC (0x2UL<<CLK_CLKSEL2_SC_S_Pos)
#define | CLK_CLKSEL2_I2S_S_HXT (0x0UL<<CLK_CLKSEL2_I2S_S_Pos)
#define | CLK_CLKSEL2_I2S_S_PLL (0x1UL<<CLK_CLKSEL2_I2S_S_Pos)
#define | CLK_CLKSEL2_I2S_S_HIRC (0x2UL<<CLK_CLKSEL2_I2S_S_Pos)
#define | CLK_CLKSEL2_TMR3_S_HXT (0x0UL<<CLK_CLKSEL2_TMR3_S_Pos)
#define | CLK_CLKSEL2_TMR3_S_LXT (0x1UL<<CLK_CLKSEL2_TMR3_S_Pos)
#define | CLK_CLKSEL2_TMR3_S_LIRC (0x2UL<<CLK_CLKSEL2_TMR3_S_Pos)
#define | CLK_CLKSEL2_TMR3_S_EXT (0x3UL<<CLK_CLKSEL2_TMR3_S_Pos)
#define | CLK_CLKSEL2_TMR3_S_HIRC (0x4UL<<CLK_CLKSEL2_TMR3_S_Pos)
#define | CLK_CLKSEL2_TMR2_S_HXT (0x0UL<<CLK_CLKSEL2_TMR2_S_Pos)
#define | CLK_CLKSEL2_TMR2_S_LXT (0x1UL<<CLK_CLKSEL2_TMR2_S_Pos)
#define | CLK_CLKSEL2_TMR2_S_LIRC (0x2UL<<CLK_CLKSEL2_TMR2_S_Pos)
#define | CLK_CLKSEL2_TMR2_S_EXT (0x3UL<<CLK_CLKSEL2_TMR2_S_Pos)
#define | CLK_CLKSEL2_TMR2_S_HIRC (0x4UL<<CLK_CLKSEL2_TMR2_S_Pos)
#define | CLK_CLKSEL2_PWM1_CH01_S_HXT (0x0UL<<CLK_CLKSEL2_PWM1_CH01_S_Pos)
#define | CLK_CLKSEL2_PWM1_CH01_S_LXT (0x1UL<<CLK_CLKSEL2_PWM1_CH01_S_Pos)
#define | CLK_CLKSEL2_PWM1_CH01_S_HCLK (0x2UL<<CLK_CLKSEL2_PWM1_CH01_S_Pos)
#define | CLK_CLKSEL2_PWM1_CH01_S_HIRC (0x3UL<<CLK_CLKSEL2_PWM1_CH01_S_Pos)
#define | CLK_CLKSEL2_PWM1_CH23_S_HXT (0x0UL<<CLK_CLKSEL2_PWM1_CH23_S_Pos)
#define | CLK_CLKSEL2_PWM1_CH23_S_LXT (0x1UL<<CLK_CLKSEL2_PWM1_CH23_S_Pos)
#define | CLK_CLKSEL2_PWM1_CH23_S_HCLK (0x2UL<<CLK_CLKSEL2_PWM1_CH23_S_Pos)
#define | CLK_CLKSEL2_PWM1_CH23_S_HIRC (0x3UL<<CLK_CLKSEL2_PWM1_CH23_S_Pos)
#define | CLK_CLKSEL2_FRQDIV_S_HXT (0x0UL<<CLK_CLKSEL2_FRQDIV_S_Pos)
#define | CLK_CLKSEL2_FRQDIV_S_LXT (0x1UL<<CLK_CLKSEL2_FRQDIV_S_Pos)
#define | CLK_CLKSEL2_FRQDIV_S_HCLK (0x2UL<<CLK_CLKSEL2_FRQDIV_S_Pos)
#define | CLK_CLKSEL2_FRQDIV_S_HIRC (0x3UL<<CLK_CLKSEL2_FRQDIV_S_Pos)
#define | CLK_HCLK_CLK_DIVIDER(x) (((x-1)<< CLK_CLKDIV0_HCLK_N_Pos) & CLK_CLKDIV0_HCLK_N_Msk)
#define | CLK_USB_CLK_DIVIDER(x) (((x-1)<< CLK_CLKDIV0_USB_N_Pos) & CLK_CLKDIV0_USB_N_Msk)
#define | CLK_UART_CLK_DIVIDER(x) (((x-1)<< CLK_CLKDIV0_UART_N_Pos) & CLK_CLKDIV0_UART_N_Msk)
#define | CLK_ADC_CLK_DIVIDER(x) (((x-1)<< CLK_CLKDIV0_ADC_N_Pos) & CLK_CLKDIV0_ADC_N_Msk)
#define | CLK_SC0_CLK_DIVIDER(x) (((x-1)<< CLK_CLKDIV0_SC0_N_Pos) & CLK_CLKDIV0_SC0_N_Msk)
#define | CLK_I2S_CLK_DIVIDER(x) (((x-1)<< CLK_CLKDIV0_I2S_N_Pos) & CLK_CLKDIV0_I2S_N_Msk)
#define | CLK_SC2_CLK_DIVIDER(x) (((x-1)<< CLK_CLKDIV1_SC2_N_Pos ) & CLK_CLKDIV1_SC2_N_Msk)
#define | CLK_SC1_CLK_DIVIDER(x) (((x-1)<< CLK_CLKDIV1_SC1_N_Pos ) & CLK_CLKDIV1_SC1_N_Msk)
#define | CLK_CLKSEL0_STCLKSEL_HCLK (1)
#define | CLK_CLKSEL0_STCLKSEL_HCLK_DIV8 (2)
#define | CLK_PLLCTL_OUT_DV (0x1UL<<CLK_PLLCTL_OUT_DV_Pos)
#define | CLK_PLLCTL_PD (0x1UL<<CLK_PLLCTL_PD_Pos)
#define | CLK_PLLCTL_PLL_SRC_HIRC (0x1UL<<CLK_PLLCTL_PLL_SRC_Pos)
#define | CLK_PLLCTL_PLL_SRC_HXT (0x0UL<<CLK_PLLCTL_PLL_SRC_Pos)
#define | CLK_PLLCTL_NR_2 0x000
#define | CLK_PLLCTL_NR_4 0x100
#define | CLK_PLLCTL_NR_8 0x200
#define | CLK_PLLCTL_NR_16 0x300
#define | CLK_PLLCON_NF(x) ((x)-32)
#define | CLK_PLLCON_NO_1 0x0000UL
#define | CLK_PLLCON_NO_2 0x1000UL
#define | CLK_PLLCTL_120MHz_HIRC (CLK_PLLCTL_PLL_SRC_HIRC | CLK_PLLCON_NO_1 | CLK_PLLCTL_NR_4 | CLK_PLLCON_NF(40) )
#define | CLK_PLLCTL_96MHz_HIRC (CLK_PLLCTL_PLL_SRC_HIRC | CLK_PLLCON_NO_1 | CLK_PLLCTL_NR_8 | CLK_PLLCON_NF(64) )
#define | CLK_PLLCTL_48MHz_HIRC (CLK_PLLCTL_PLL_SRC_HIRC | CLK_PLLCON_NO_1 | CLK_PLLCTL_NR_16| CLK_PLLCON_NF(64) )
#define | CLK_PLLCTL_84MHz_HIRC (CLK_PLLCTL_PLL_SRC_HIRC | CLK_PLLCON_NO_1 | CLK_PLLCTL_NR_8 | CLK_PLLCON_NF(56) )
#define | CLK_PLLCTL_42MHz_HIRC (CLK_PLLCTL_PLL_SRC_HIRC | CLK_PLLCON_NO_1 | CLK_PLLCTL_NR_16| CLK_PLLCON_NF(56) )
#define | CLK_FRQDIV_EN (0x1UL<<CLK_FRQDIV_FDIV_EN_Pos)
#define | CLK_WK_INTSTS_IS (0x1UL<<CLK_WK_INTSTS_PD_WK_IS_Pos)
#define | CLK_MCLKO_MCLK_SEL_ISP_CLK (0x00<<CLK_MCLKO_MCLK_SEL_Pos)
#define | CLK_MCLKO_MCLK_SEL_HIRC (0x01<<CLK_MCLKO_MCLK_SEL_Pos)
#define | CLK_MCLKO_MCLK_SEL_HXT (0x02<<CLK_MCLKO_MCLK_SEL_Pos)
#define | CLK_MCLKO_MCLK_SEL_LXT (0x03<<CLK_MCLKO_MCLK_SEL_Pos)
#define | CLK_MCLKO_MCLK_SEL_LIRC (0x04<<CLK_MCLKO_MCLK_SEL_Pos)
#define | CLK_MCLKO_MCLK_SEL_PLLO (0x05<<CLK_MCLKO_MCLK_SEL_Pos)
#define | CLK_MCLKO_MCLK_SEL_PLLI (0x06<<CLK_MCLKO_MCLK_SEL_Pos)
#define | CLK_MCLKO_MCLK_SEL_SYSTICK (0x07<<CLK_MCLKO_MCLK_SEL_Pos)
#define | CLK_MCLKO_MCLK_SEL_HCLK (0x08<<CLK_MCLKO_MCLK_SEL_Pos)
#define | CLK_MCLKO_MCLK_SEL_PCLK (0x0A<<CLK_MCLKO_MCLK_SEL_Pos)
#define | CLK_MCLKO_MCLK_SEL_TMR0 (0x20<<CLK_MCLKO_MCLK_SEL_Pos)
#define | CLK_MCLKO_MCLK_SEL_TMR1 (0x21<<CLK_MCLKO_MCLK_SEL_Pos)
#define | CLK_MCLKO_MCLK_SEL_UART0 (0x22<<CLK_MCLKO_MCLK_SEL_Pos)
#define | CLK_MCLKO_MCLK_SEL_USB (0x23<<CLK_MCLKO_MCLK_SEL_Pos)
#define | CLK_MCLKO_MCLK_SEL_ADC (0x24<<CLK_MCLKO_MCLK_SEL_Pos)
#define | CLK_MCLKO_MCLK_SEL_WDT (0x25<<CLK_MCLKO_MCLK_SEL_Pos)
#define | CLK_MCLKO_MCLK_SEL_PWM0CH01 (0x26<<CLK_MCLKO_MCLK_SEL_Pos)
#define | CLK_MCLKO_MCLK_SEL_PWM0CH23 (0x27<<CLK_MCLKO_MCLK_SEL_Pos)
#define | CLK_MCLKO_MCLK_SEL_LCD (0x29<<CLK_MCLKO_MCLK_SEL_Pos)
#define | CLK_MCLKO_MCLK_SEL_TMR2 (0x38<<CLK_MCLKO_MCLK_SEL_Pos)
#define | CLK_MCLKO_MCLK_SEL_TMR3 (0x39<<CLK_MCLKO_MCLK_SEL_Pos)
#define | CLK_MCLKO_MCLK_SEL_UART1 (0x3A<<CLK_MCLKO_MCLK_SEL_Pos)
#define | CLK_MCLKO_MCLK_SEL_PWM1CH01 (0x3B<<CLK_MCLKO_MCLK_SEL_Pos)
#define | CLK_MCLKO_MCLK_SEL_PWM1CH23 (0x3C<<CLK_MCLKO_MCLK_SEL_Pos)
#define | CLK_MCLKO_MCLK_SEL_I2S (0x3D<<CLK_MCLKO_MCLK_SEL_Pos)
#define | CLK_MCLKO_MCLK_SEL_SC0 (0x3E<<CLK_MCLKO_MCLK_SEL_Pos)
#define | CLK_MCLKO_MCLK_SEL_SC1 (0x3F<<CLK_MCLKO_MCLK_SEL_Pos)
#define | MODULE_APBCLK(x) ((x >>31) & 0x1)
#define | MODULE_CLKSEL(x) ((x >>29) & 0x3)
#define | MODULE_CLKSEL_Msk(x) ((x >>25) & 0xf)
#define | MODULE_CLKSEL_Pos(x) ((x >>20) & 0x1f)
#define | MODULE_CLKDIV(x) ((x >>18) & 0x3)
#define | MODULE_CLKDIV_Msk(x) ((x >>10) & 0xff)
#define | MODULE_CLKDIV_Pos(x) ((x >>5 ) & 0x1f)
#define | MODULE_IP_EN_Pos(x) ((x >>0 ) & 0x1f)
#define | MODULE_NoMsk 0x0
#define | NA MODULE_NoMsk
#define | MODULE_APBCLK_ENC(x) (((x) & 0x01) << 31)
#define | MODULE_CLKSEL_ENC(x) (((x) & 0x03) << 29)
#define | MODULE_CLKSEL_Msk_ENC(x) (((x) & 0x0f) << 25)
#define | MODULE_CLKSEL_Pos_ENC(x) (((x) & 0x1f) << 20)
#define | MODULE_CLKDIV_ENC(x) (((x) & 0x03) << 18)
#define | MODULE_CLKDIV_Msk_ENC(x) (((x) & 0xff) << 10)
#define | MODULE_CLKDIV_Pos_ENC(x) (((x) & 0x1f) << 5)
#define | MODULE_IP_EN_Pos_ENC(x) (((x) & 0x1f) << 0)
#define | TICK_MODULE ((0UL<<31)|(3<<29)|(MODULE_NoMsk<<25)|( 0<<20)|(1<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_AHBCLK_TICK_EN_Pos )
#define | SRAM_MODULE ((0UL<<31)|(3<<29)|(MODULE_NoMsk<<25)|( 0<<20)|(1<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_AHBCLK_SRAM_EN_Pos )
#define | EBI_MODULE ((0UL<<31)|(3<<29)|(MODULE_NoMsk<<25)|( 0<<20)|(1<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_AHBCLK_EBI_EN_Pos )
#define | ISP_MODULE ((0UL<<31)|(3<<29)|(MODULE_NoMsk<<25)|( 0<<20)|(1<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_AHBCLK_ISP_EN_Pos )
#define | DMA_MODULE ((0UL<<31)|(3<<29)|(MODULE_NoMsk<<25)|( 0<<20)|(0<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_AHBCLK_DMA_EN_Pos )
#define | GPIO_MODULE ((0UL<<31)|(3<<29)|(MODULE_NoMsk<<25)|( 0<<20)|(0<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_AHBCLK_GPIO_EN_Pos )
#define | SC2_MODULE ((1UL<<31)|(2<<29)|(3<<25) |(18<<20)|(1<<18)|(0xF<<10) |( 4<<5)|CLK_APBCLK_SC2_EN_Pos )
#define | SC1_MODULE ((1UL<<31)|(2<<29)|(3<<25) |(18<<20)|(1<<18)|(0xF<<10) |( 0<<5)|CLK_APBCLK_SC1_EN_Pos )
#define | SC0_MODULE ((1UL<<31)|(2<<29)|(3<<25) |(18<<20)|(0<<18)|(0xF<<10) |(28<<5)|CLK_APBCLK_SC0_EN_Pos )
#define | I2S_MODULE ((1UL<<31)|(2<<29)|(3<<25) |(16<<20)|(0<<18)|(0xF<<10) |(12<<5)|CLK_APBCLK_I2S_EN_Pos )
#define | ADC_MODULE ((1UL<<31)|(1<<29)|(3<<25) |( 2<<20)|(0<<18)|(0xFF<<10) |(16<<5)|CLK_APBCLK_ADC_EN_Pos )
#define | USBD_MODULE ((1UL<<31)|(1<<29)|(MODULE_NoMsk<<25)|( 0<<20)|(0<<18)|(0xF<<10) |( 4<<5)|CLK_APBCLK_USBD_EN_Pos )
#define | PWM1_CH23_MODULE ((1UL<<31)|(2<<29)|(3<<25) |( 6<<20)|(0<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_APBCLK_PWM1_CH23_EN_Pos)
#define | PWM1_CH01_MODULE ((1UL<<31)|(2<<29)|(3<<25) |( 4<<20)|(0<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_APBCLK_PWM1_CH01_EN_Pos)
#define | PWM0_CH23_MODULE ((1UL<<31)|(1<<29)|(3<<25) |( 6<<20)|(0<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_APBCLK_PWM0_CH23_EN_Pos)
#define | PWM0_CH01_MODULE ((1UL<<31)|(1<<29)|(3<<25) |( 4<<20)|(0<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_APBCLK_PWM0_CH01_EN_Pos)
#define | UART1_MODULE ((1UL<<31)|(1<<29)|(3<<25) |( 0<<20)|(0<<18)|(0xF<<10) |( 8<<5)|CLK_APBCLK_UART1_EN_Pos )
#define | UART0_MODULE ((1UL<<31)|(1<<29)|(3<<25) |( 0<<20)|(0<<18)|(0xF<<10) |( 8<<5)|CLK_APBCLK_UART0_EN_Pos )
#define | SPI2_MODULE ((1UL<<31)|(2<<29)|(1<<25) |(22<<20)|(0<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_APBCLK_SPI2_EN_Pos )
#define | SPI1_MODULE ((1UL<<31)|(2<<29)|(1<<25) |(21<<20)|(0<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_APBCLK_SPI1_EN_Pos )
#define | SPI0_MODULE ((1UL<<31)|(2<<29)|(1<<25) |(20<<20)|(0<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_APBCLK_SPI0_EN_Pos )
#define | I2C1_MODULE ((1UL<<31)|(0<<29)|(MODULE_NoMsk<<25)|( 0<<20)|(0<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_APBCLK_I2C1_EN_Pos )
#define | I2C0_MODULE ((1UL<<31)|(0<<29)|(MODULE_NoMsk<<25)|( 0<<20)|(0<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_APBCLK_I2C0_EN_Pos )
#define | FDIV_MODULE ((1UL<<31)|(2<<29)|(3<<25) |( 2<<20)|(0<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_APBCLK_FDIV_EN_Pos )
#define | TMR3_MODULE ((1UL<<31)|(2<<29)|(7<<25) |(12<<20)|(1<<18)|(0xF<<10) |(20<<5)|CLK_APBCLK_TMR3_EN_Pos )
#define | TMR2_MODULE ((1UL<<31)|(2<<29)|(7<<25) |( 8<<20)|(1<<18)|(0xF<<10) |(16<<5)|CLK_APBCLK_TMR2_EN_Pos )
#define | TMR1_MODULE ((1UL<<31)|(1<<29)|(7<<25) |(12<<20)|(1<<18)|(0xF<<10) |(12<<5)|CLK_APBCLK_TMR1_EN_Pos )
#define | TMR0_MODULE ((1UL<<31)|(1<<29)|(7<<25) |( 8<<20)|(1<<18)|(0xF<<10) |( 8<<5)|CLK_APBCLK_TMR0_EN_Pos )
#define | RTC_MODULE ((1UL<<31)|(3<<29)|(MODULE_NoMsk<<25)|( 0<<20)|(0<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_APBCLK_RTC_EN_Pos )
#define | WDT_MODULE ((1UL<<31)|(3<<29)|(MODULE_NoMsk<<25)|( 0<<20)|(0<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_APBCLK_WDT_EN_Pos )
#define | LCD_MODULE ((1UL<<31)|(1<<29)|(1<<25) |(18<<20)|(0<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_APBCLK_LCD_EN_Pos )
#define | DAC_MODULE ((1UL<<31)|(3<<29)|(MODULE_NoMsk<<25)|( 0<<20)|(0<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_APBCLK_DAC_EN_Pos )

## Detailed Description

## Macro Definition Documentation

## ◆ ADC_MODULE

#define ADC_MODULE ((1UL<<31)|(1<<29)|(3<<25) |( 2<<20)|(0<<18)|(0xFF<<10) |(16<<5)|CLK_APBCLK_ADC_EN_Pos )

ADC Module

Definition at line 305 of file clk.h.

## ◆ CLK_ADC_CLK_DIVIDER

#define CLK_ADC_CLK_DIVIDER | ( |  | x | ) | (((x-1)<< CLK_CLKDIV0_ADC_N_Pos) & CLK_CLKDIV0_ADC_N_Msk)

CLKDIV0 Setting for ADC clock divider. It could be 1~256

Definition at line 191 of file clk.h.

## ◆ CLK_AHBCLK_DMA_EN

#define CLK_AHBCLK_DMA_EN (0x1UL<<CLK_AHBCLK_DMA_EN_Pos)

DMA clock enable

Definition at line 57 of file clk.h.

## ◆ CLK_AHBCLK_EBI_EN

#define CLK_AHBCLK_EBI_EN (0x1UL<<CLK_AHBCLK_EBI_EN_Pos)

EBI clock enable

Definition at line 59 of file clk.h.

## ◆ CLK_AHBCLK_GPIO_EN

#define CLK_AHBCLK_GPIO_EN (0x1UL<<CLK_AHBCLK_GPIO_EN_Pos)

GPIO clock enable

Definition at line 56 of file clk.h.

## ◆ CLK_AHBCLK_ISP_EN

#define CLK_AHBCLK_ISP_EN (0x1UL<<CLK_AHBCLK_ISP_EN_Pos)

Flash ISP controller clock enable

Definition at line 58 of file clk.h.

## ◆ CLK_AHBCLK_SRAM_EN

#define CLK_AHBCLK_SRAM_EN (0x1UL<<CLK_AHBCLK_SRAM_EN_Pos)

SRAM Controller Clock Enable

Definition at line 60 of file clk.h.

## ◆ CLK_AHBCLK_TICK_EN

#define CLK_AHBCLK_TICK_EN (0x1UL<<CLK_AHBCLK_TICK_EN_Pos)

System Tick Clock Enable

Definition at line 61 of file clk.h.

## ◆ CLK_APBCLK_ADC_EN

#define CLK_APBCLK_ADC_EN (0x1UL<<CLK_APBCLK_ADC_EN_Pos)

ADC clock enable

Definition at line 86 of file clk.h.

## ◆ CLK_APBCLK_DAC_EN

#define CLK_APBCLK_DAC_EN (0x1UL<<CLK_APBCLK_DAC_EN_Pos)

DAC Clock Enable Control

Definition at line 83 of file clk.h.

## ◆ CLK_APBCLK_FDIV_EN

#define CLK_APBCLK_FDIV_EN (0x1UL<<CLK_APBCLK_FDIV_EN_Pos)

Frequency Divider Output clock enable

Definition at line 70 of file clk.h.

## ◆ CLK_APBCLK_I2C0_EN

#define CLK_APBCLK_I2C0_EN (0x1UL<<CLK_APBCLK_I2C0_EN_Pos)

I2C 0 clock enable

Definition at line 72 of file clk.h.

## ◆ CLK_APBCLK_I2C1_EN

#define CLK_APBCLK_I2C1_EN (0x1UL<<CLK_APBCLK_I2C1_EN_Pos)

I2C 1 clock enable

Definition at line 73 of file clk.h.

## ◆ CLK_APBCLK_I2S_EN

#define CLK_APBCLK_I2S_EN (0x1UL<<CLK_APBCLK_I2S_EN_Pos)

I2S clock enable

Definition at line 87 of file clk.h.

## ◆ CLK_APBCLK_LCD_EN

#define CLK_APBCLK_LCD_EN (0x1UL<<CLK_APBCLK_LCD_EN_Pos)

LCD Clock Enable Control

Definition at line 84 of file clk.h.

## ◆ CLK_APBCLK_PWM0_CH01_EN

#define CLK_APBCLK_PWM0_CH01_EN (0x1UL<<CLK_APBCLK_PWM0_CH01_EN_Pos)

PWM0 Channel 0 and Channel 1 Clock Enable Control

Definition at line 79 of file clk.h.

## ◆ CLK_APBCLK_PWM0_CH23_EN

#define CLK_APBCLK_PWM0_CH23_EN (0x1UL<<CLK_APBCLK_PWM0_CH23_EN_Pos)

PWM0 Channel 2 and Channel 3 Clock Enable Control

Definition at line 80 of file clk.h.

## ◆ CLK_APBCLK_PWM1_CH01_EN

#define CLK_APBCLK_PWM1_CH01_EN (0x1UL<<CLK_APBCLK_PWM1_CH01_EN_Pos)

PWM1 Channel 0 and Channel 1 Clock Enable Control

Definition at line 81 of file clk.h.

## ◆ CLK_APBCLK_PWM1_CH23_EN

#define CLK_APBCLK_PWM1_CH23_EN (0x1UL<<CLK_APBCLK_PWM1_CH23_EN_Pos)

PWM1 Channel 2 and Channel 3 Clock Enable Control

Definition at line 82 of file clk.h.

## ◆ CLK_APBCLK_RTC_EN

#define CLK_APBCLK_RTC_EN (0x1UL<<CLK_APBCLK_RTC_EN_Pos)

RTC clock enable

Definition at line 65 of file clk.h.

## ◆ CLK_APBCLK_SC0_EN

#define CLK_APBCLK_SC0_EN (0x1UL<<CLK_APBCLK_SC0_EN_Pos)

SmartCard 0 Clock Enable Control

Definition at line 88 of file clk.h.

## ◆ CLK_APBCLK_SC1_EN

#define CLK_APBCLK_SC1_EN (0x1UL<<CLK_APBCLK_SC1_EN_Pos)

SmartCard 1 Clock Enable Control

Definition at line 89 of file clk.h.

## ◆ CLK_APBCLK_SC2_EN

#define CLK_APBCLK_SC2_EN (0x1UL<<CLK_APBCLK_SC2_EN_Pos)

SmartCard 2 Clock Enable Control

Definition at line 71 of file clk.h.

## ◆ CLK_APBCLK_SPI0_EN

#define CLK_APBCLK_SPI0_EN (0x1UL<<CLK_APBCLK_SPI0_EN_Pos)

SPI 0 clock enable

Definition at line 74 of file clk.h.

## ◆ CLK_APBCLK_SPI1_EN

#define CLK_APBCLK_SPI1_EN (0x1UL<<CLK_APBCLK_SPI1_EN_Pos)

SPI 1 clock enable

Definition at line 75 of file clk.h.

## ◆ CLK_APBCLK_SPI2_EN

#define CLK_APBCLK_SPI2_EN (0x1UL<<CLK_APBCLK_SPI2_EN_Pos)

SPI 2 clock enable

Definition at line 76 of file clk.h.

## ◆ CLK_APBCLK_TMR0_EN

#define CLK_APBCLK_TMR0_EN (0x1UL<<CLK_APBCLK_TMR0_EN_Pos)

Timer 0 clock enable

Definition at line 66 of file clk.h.

## ◆ CLK_APBCLK_TMR1_EN

#define CLK_APBCLK_TMR1_EN (0x1UL<<CLK_APBCLK_TMR1_EN_Pos)

Timer 1 clock enable

Definition at line 67 of file clk.h.

## ◆ CLK_APBCLK_TMR2_EN

#define CLK_APBCLK_TMR2_EN (0x1UL<<CLK_APBCLK_TMR2_EN_Pos)

Timer 2 clock enable

Definition at line 68 of file clk.h.

## ◆ CLK_APBCLK_TMR3_EN

#define CLK_APBCLK_TMR3_EN (0x1UL<<CLK_APBCLK_TMR3_EN_Pos)

Timer 3 clock enable

Definition at line 69 of file clk.h.

## ◆ CLK_APBCLK_UART0_EN

#define CLK_APBCLK_UART0_EN (0x1UL<<CLK_APBCLK_UART0_EN_Pos)

UART 0 clock enable

Definition at line 77 of file clk.h.

## ◆ CLK_APBCLK_UART1_EN

#define CLK_APBCLK_UART1_EN (0x1UL<<CLK_APBCLK_UART1_EN_Pos)

UART 1 clock enable

Definition at line 78 of file clk.h.

## ◆ CLK_APBCLK_USBD_EN

#define CLK_APBCLK_USBD_EN (0x1UL<<CLK_APBCLK_USBD_EN_Pos)

USB device clock enable

Definition at line 85 of file clk.h.

## ◆ CLK_APBCLK_WDT_EN

#define CLK_APBCLK_WDT_EN (0x1UL<<CLK_APBCLK_WDT_EN_Pos)

Watchdog clock enable

Definition at line 64 of file clk.h.

## ◆ CLK_CLKSEL0_HCLK_S_HIRC

#define CLK_CLKSEL0_HCLK_S_HIRC (7UL<<CLK_CLKSEL0_HCLK_S_Pos)

Select HCLK clock source from high speed oscillator

Definition at line 105 of file clk.h.

## ◆ CLK_CLKSEL0_HCLK_S_HXT

#define CLK_CLKSEL0_HCLK_S_HXT (0UL<<CLK_CLKSEL0_HCLK_S_Pos)

Select HCLK clock source from high speed crystal

Definition at line 101 of file clk.h.

## ◆ CLK_CLKSEL0_HCLK_S_LIRC

#define CLK_CLKSEL0_HCLK_S_LIRC (3UL<<CLK_CLKSEL0_HCLK_S_Pos)

Select HCLK clock source from low speed oscillator

Definition at line 104 of file clk.h.

## ◆ CLK_CLKSEL0_HCLK_S_LXT

#define CLK_CLKSEL0_HCLK_S_LXT (1UL<<CLK_CLKSEL0_HCLK_S_Pos)

Select HCLK clock source from low speed crystal

Definition at line 102 of file clk.h.

## ◆ CLK_CLKSEL0_HCLK_S_PLL

#define CLK_CLKSEL0_HCLK_S_PLL (2UL<<CLK_CLKSEL0_HCLK_S_Pos)

Select HCLK clock source from PLL

Definition at line 103 of file clk.h.

## ◆ CLK_CLKSEL0_STCLKSEL_HCLK

#define CLK_CLKSEL0_STCLKSEL_HCLK (1)

Setting systick clock source as external HCLK

Definition at line 200 of file clk.h.

## ◆ CLK_CLKSEL0_STCLKSEL_HCLK_DIV8

#define CLK_CLKSEL0_STCLKSEL_HCLK_DIV8 (2)

Setting systick clock source as external HCLK/8

Definition at line 201 of file clk.h.

## ◆ CLK_CLKSEL1_ADC_S_HIRC

#define CLK_CLKSEL1_ADC_S_HIRC (0x3UL<<CLK_CLKSEL1_ADC_S_Pos)

Select ADC clock source from high speed oscillator

Definition at line 135 of file clk.h.

## ◆ CLK_CLKSEL1_ADC_S_HXT

#define CLK_CLKSEL1_ADC_S_HXT (0x0UL<<CLK_CLKSEL1_ADC_S_Pos)

Select ADC clock source from high speed crystal

Definition at line 132 of file clk.h.

## ◆ CLK_CLKSEL1_ADC_S_LXT

#define CLK_CLKSEL1_ADC_S_LXT (0x1UL<<CLK_CLKSEL1_ADC_S_Pos)

Select ADC clock source from low speed crystal

Definition at line 133 of file clk.h.

## ◆ CLK_CLKSEL1_ADC_S_PLL

#define CLK_CLKSEL1_ADC_S_PLL (0x2UL<<CLK_CLKSEL1_ADC_S_Pos)

Select ADC clock source from PLL

Definition at line 134 of file clk.h.

## ◆ CLK_CLKSEL1_LCD_S_LXT

#define CLK_CLKSEL1_LCD_S_LXT (0x0UL<<CLK_CLKSEL1_LCD_S_Pos)

Select LCD clock source from low speed crystal

Definition at line 108 of file clk.h.

## ◆ CLK_CLKSEL1_PWM0_CH01_S_HCLK

#define CLK_CLKSEL1_PWM0_CH01_S_HCLK (0x2UL<<CLK_CLKSEL1_PWM0_CH01_S_Pos)

Select PWM0_CH01 clock source from HCLK

Definition at line 124 of file clk.h.

## ◆ CLK_CLKSEL1_PWM0_CH01_S_HIRC

#define CLK_CLKSEL1_PWM0_CH01_S_HIRC (0x3UL<<CLK_CLKSEL1_PWM0_CH01_S_Pos)

Select PWM0_CH01 clock source from high speed oscillator

Definition at line 125 of file clk.h.

## ◆ CLK_CLKSEL1_PWM0_CH01_S_HXT

#define CLK_CLKSEL1_PWM0_CH01_S_HXT (0x0UL<<CLK_CLKSEL1_PWM0_CH01_S_Pos)

Select PWM0_CH01 clock source from high speed crystal

Definition at line 122 of file clk.h.

## ◆ CLK_CLKSEL1_PWM0_CH01_S_LXT

#define CLK_CLKSEL1_PWM0_CH01_S_LXT (0x1UL<<CLK_CLKSEL1_PWM0_CH01_S_Pos)

Select PWM0_CH01 clock source from low speed crystal

Definition at line 123 of file clk.h.

## ◆ CLK_CLKSEL1_PWM0_CH23_S_HCLK

#define CLK_CLKSEL1_PWM0_CH23_S_HCLK (0x2UL<<CLK_CLKSEL1_PWM0_CH23_S_Pos)

Select PWM0_CH23 clock source from HCLK

Definition at line 129 of file clk.h.

## ◆ CLK_CLKSEL1_PWM0_CH23_S_HIRC

#define CLK_CLKSEL1_PWM0_CH23_S_HIRC (0x3UL<<CLK_CLKSEL1_PWM0_CH23_S_Pos)

Select PWM0_CH23 clock source from high speed oscillator

Definition at line 130 of file clk.h.

## ◆ CLK_CLKSEL1_PWM0_CH23_S_HXT

#define CLK_CLKSEL1_PWM0_CH23_S_HXT (0x0UL<<CLK_CLKSEL1_PWM0_CH23_S_Pos)

Select PWM0_CH23 clock source from high speed crystal

Definition at line 127 of file clk.h.

## ◆ CLK_CLKSEL1_PWM0_CH23_S_LXT

#define CLK_CLKSEL1_PWM0_CH23_S_LXT (0x1UL<<CLK_CLKSEL1_PWM0_CH23_S_Pos)

Select PWM0_CH23 clock source from low speed crystal

Definition at line 128 of file clk.h.

## ◆ CLK_CLKSEL1_TMR0_S_EXT

#define CLK_CLKSEL1_TMR0_S_EXT (0x3UL<<CLK_CLKSEL1_TMR0_S_Pos)

Select TMR0 clock source from external trigger

Definition at line 119 of file clk.h.

## ◆ CLK_CLKSEL1_TMR0_S_HIRC

#define CLK_CLKSEL1_TMR0_S_HIRC (0x4UL<<CLK_CLKSEL1_TMR0_S_Pos)

Select TMR0 clock source from high speed oscillator

Definition at line 120 of file clk.h.

## ◆ CLK_CLKSEL1_TMR0_S_HXT

#define CLK_CLKSEL1_TMR0_S_HXT (0x0UL<<CLK_CLKSEL1_TMR0_S_Pos)

Select TMR0 clock source from high speed crystal

Definition at line 116 of file clk.h.

## ◆ CLK_CLKSEL1_TMR0_S_LIRC

#define CLK_CLKSEL1_TMR0_S_LIRC (0x2UL<<CLK_CLKSEL1_TMR0_S_Pos)

Select TMR0 clock source from low speed oscillator

Definition at line 118 of file clk.h.

## ◆ CLK_CLKSEL1_TMR0_S_LXT

#define CLK_CLKSEL1_TMR0_S_LXT (0x1UL<<CLK_CLKSEL1_TMR0_S_Pos)

Select TMR0 clock source from low speed crystal

Definition at line 117 of file clk.h.

## ◆ CLK_CLKSEL1_TMR1_S_EXT

#define CLK_CLKSEL1_TMR1_S_EXT (0x3UL<<CLK_CLKSEL1_TMR1_S_Pos)

Select TMR1 clock source from external trigger

Definition at line 113 of file clk.h.

## ◆ CLK_CLKSEL1_TMR1_S_HIRC

#define CLK_CLKSEL1_TMR1_S_HIRC (0x4UL<<CLK_CLKSEL1_TMR1_S_Pos)

Select TMR1 clock source from high speed oscillator

Definition at line 114 of file clk.h.

## ◆ CLK_CLKSEL1_TMR1_S_HXT

#define CLK_CLKSEL1_TMR1_S_HXT (0x0UL<<CLK_CLKSEL1_TMR1_S_Pos)

Select TMR1 clock source from high speed crystal

Definition at line 110 of file clk.h.

## ◆ CLK_CLKSEL1_TMR1_S_LIRC

#define CLK_CLKSEL1_TMR1_S_LIRC (0x2UL<<CLK_CLKSEL1_TMR1_S_Pos)

Select TMR1 clock source from low speed oscillator

Definition at line 112 of file clk.h.

## ◆ CLK_CLKSEL1_TMR1_S_LXT

#define CLK_CLKSEL1_TMR1_S_LXT (0x1UL<<CLK_CLKSEL1_TMR1_S_Pos)

Select TMR1 clock source from low speed crystal

Definition at line 111 of file clk.h.

## ◆ CLK_CLKSEL1_UART_S_HIRC

#define CLK_CLKSEL1_UART_S_HIRC (0x3UL<<CLK_CLKSEL1_UART_S_Pos)

Select UART clock source from high speed oscillator

Definition at line 140 of file clk.h.

## ◆ CLK_CLKSEL1_UART_S_HXT

#define CLK_CLKSEL1_UART_S_HXT (0x0UL<<CLK_CLKSEL1_UART_S_Pos)

Select UART clock source from high speed crystal

Definition at line 137 of file clk.h.

## ◆ CLK_CLKSEL1_UART_S_LXT

#define CLK_CLKSEL1_UART_S_LXT (0x1UL<<CLK_CLKSEL1_UART_S_Pos)

Select UART clock source from low speed crystal

Definition at line 138 of file clk.h.

## ◆ CLK_CLKSEL1_UART_S_PLL

#define CLK_CLKSEL1_UART_S_PLL (0x2UL<<CLK_CLKSEL1_UART_S_Pos)

Select UART clock source from PLL

Definition at line 139 of file clk.h.

## ◆ CLK_CLKSEL2_FRQDIV_S_HCLK

#define CLK_CLKSEL2_FRQDIV_S_HCLK (0x2UL<<CLK_CLKSEL2_FRQDIV_S_Pos)

Select FRQDIV clock source from HCLK

Definition at line 184 of file clk.h.

## ◆ CLK_CLKSEL2_FRQDIV_S_HIRC

#define CLK_CLKSEL2_FRQDIV_S_HIRC (0x3UL<<CLK_CLKSEL2_FRQDIV_S_Pos)

Select FRQDIV clock source from HIRC

Definition at line 185 of file clk.h.

## ◆ CLK_CLKSEL2_FRQDIV_S_HXT

#define CLK_CLKSEL2_FRQDIV_S_HXT (0x0UL<<CLK_CLKSEL2_FRQDIV_S_Pos)

Select FRQDIV clock source from HXT

Definition at line 182 of file clk.h.

## ◆ CLK_CLKSEL2_FRQDIV_S_LXT

#define CLK_CLKSEL2_FRQDIV_S_LXT (0x1UL<<CLK_CLKSEL2_FRQDIV_S_Pos)

Select FRQDIV clock source from LXT

Definition at line 183 of file clk.h.

## ◆ CLK_CLKSEL2_I2S_S_HIRC

#define CLK_CLKSEL2_I2S_S_HIRC (0x2UL<<CLK_CLKSEL2_I2S_S_Pos)

Select I2S clock source from HIRC

Definition at line 158 of file clk.h.

## ◆ CLK_CLKSEL2_I2S_S_HXT

#define CLK_CLKSEL2_I2S_S_HXT (0x0UL<<CLK_CLKSEL2_I2S_S_Pos)

Select I2S clock source from HXT

Definition at line 156 of file clk.h.

## ◆ CLK_CLKSEL2_I2S_S_PLL

#define CLK_CLKSEL2_I2S_S_PLL (0x1UL<<CLK_CLKSEL2_I2S_S_Pos)

Select I2S clock source from PLL

Definition at line 157 of file clk.h.

## ◆ CLK_CLKSEL2_PWM1_CH01_S_HCLK

#define CLK_CLKSEL2_PWM1_CH01_S_HCLK (0x2UL<<CLK_CLKSEL2_PWM1_CH01_S_Pos)

Select PWM1_CH01 clock source from HCLK

Definition at line 174 of file clk.h.

## ◆ CLK_CLKSEL2_PWM1_CH01_S_HIRC

#define CLK_CLKSEL2_PWM1_CH01_S_HIRC (0x3UL<<CLK_CLKSEL2_PWM1_CH01_S_Pos)

Select PWM1_CH01 clock source from high speed oscillator

Definition at line 175 of file clk.h.

## ◆ CLK_CLKSEL2_PWM1_CH01_S_HXT

#define CLK_CLKSEL2_PWM1_CH01_S_HXT (0x0UL<<CLK_CLKSEL2_PWM1_CH01_S_Pos)

Select PWM1_CH01 clock source from high speed crystal

Definition at line 172 of file clk.h.

## ◆ CLK_CLKSEL2_PWM1_CH01_S_LXT

#define CLK_CLKSEL2_PWM1_CH01_S_LXT (0x1UL<<CLK_CLKSEL2_PWM1_CH01_S_Pos)

Select PWM1_CH01 clock source from low speed crystal

Definition at line 173 of file clk.h.

## ◆ CLK_CLKSEL2_PWM1_CH23_S_HCLK

#define CLK_CLKSEL2_PWM1_CH23_S_HCLK (0x2UL<<CLK_CLKSEL2_PWM1_CH23_S_Pos)

Select PWM1_CH23 clock source from HCLK

Definition at line 179 of file clk.h.

## ◆ CLK_CLKSEL2_PWM1_CH23_S_HIRC

#define CLK_CLKSEL2_PWM1_CH23_S_HIRC (0x3UL<<CLK_CLKSEL2_PWM1_CH23_S_Pos)

Select PWM1_CH23 clock source from high speed oscillator

Definition at line 180 of file clk.h.

## ◆ CLK_CLKSEL2_PWM1_CH23_S_HXT

#define CLK_CLKSEL2_PWM1_CH23_S_HXT (0x0UL<<CLK_CLKSEL2_PWM1_CH23_S_Pos)

Select PWM1_CH23 clock source from high speed crystal

Definition at line 177 of file clk.h.

## ◆ CLK_CLKSEL2_PWM1_CH23_S_LXT

#define CLK_CLKSEL2_PWM1_CH23_S_LXT (0x1UL<<CLK_CLKSEL2_PWM1_CH23_S_Pos)

Select PWM1_CH23 clock source from low speed crystal

Definition at line 178 of file clk.h.

## ◆ CLK_CLKSEL2_SC_S_HIRC

#define CLK_CLKSEL2_SC_S_HIRC (0x2UL<<CLK_CLKSEL2_SC_S_Pos)

Select SmartCard clock source from HIRC

Definition at line 154 of file clk.h.

## ◆ CLK_CLKSEL2_SC_S_HXT

#define CLK_CLKSEL2_SC_S_HXT (0x0UL<<CLK_CLKSEL2_SC_S_Pos)

Select SmartCard clock source from HXT

Definition at line 152 of file clk.h.

## ◆ CLK_CLKSEL2_SC_S_PLL

#define CLK_CLKSEL2_SC_S_PLL (0x1UL<<CLK_CLKSEL2_SC_S_Pos)

Select smartCard clock source from PLL

Definition at line 153 of file clk.h.

## ◆ CLK_CLKSEL2_SPI0_S_HCLK

#define CLK_CLKSEL2_SPI0_S_HCLK (0x1UL<<CLK_CLKSEL2_SPI0_S_Pos)

Select SPI0 clock source from HCLK

Definition at line 150 of file clk.h.

## ◆ CLK_CLKSEL2_SPI0_S_PLL

#define CLK_CLKSEL2_SPI0_S_PLL (0x0UL<<CLK_CLKSEL2_SPI0_S_Pos)

Select SPI0 clock source from PLL

Definition at line 149 of file clk.h.

## ◆ CLK_CLKSEL2_SPI1_S_HCLK

#define CLK_CLKSEL2_SPI1_S_HCLK (0x1UL<<CLK_CLKSEL2_SPI1_S_Pos)

Select SPI1 clock source from HCLK

Definition at line 147 of file clk.h.

## ◆ CLK_CLKSEL2_SPI1_S_PLL

#define CLK_CLKSEL2_SPI1_S_PLL (0x0UL<<CLK_CLKSEL2_SPI1_S_Pos)

Select SPI1 clock source from PLL

Definition at line 146 of file clk.h.

## ◆ CLK_CLKSEL2_SPI2_S_HCLK

#define CLK_CLKSEL2_SPI2_S_HCLK (0x1UL<<CLK_CLKSEL2_SPI2_S_Pos)

Select SPI2 clock source from HCLK

Definition at line 144 of file clk.h.

## ◆ CLK_CLKSEL2_SPI2_S_PLL

#define CLK_CLKSEL2_SPI2_S_PLL (0x0UL<<CLK_CLKSEL2_SPI2_S_Pos)

Select SPI2 clock source from PLL

Definition at line 143 of file clk.h.

## ◆ CLK_CLKSEL2_TMR2_S_EXT

#define CLK_CLKSEL2_TMR2_S_EXT (0x3UL<<CLK_CLKSEL2_TMR2_S_Pos)

Select TMR2 clock source from external trigger

Definition at line 169 of file clk.h.

## ◆ CLK_CLKSEL2_TMR2_S_HIRC

#define CLK_CLKSEL2_TMR2_S_HIRC (0x4UL<<CLK_CLKSEL2_TMR2_S_Pos)

Select TMR2 clock source from high speed oscillator

Definition at line 170 of file clk.h.

## ◆ CLK_CLKSEL2_TMR2_S_HXT

#define CLK_CLKSEL2_TMR2_S_HXT (0x0UL<<CLK_CLKSEL2_TMR2_S_Pos)

Select TMR2 clock source from high speed crystal

Definition at line 166 of file clk.h.

## ◆ CLK_CLKSEL2_TMR2_S_LIRC

#define CLK_CLKSEL2_TMR2_S_LIRC (0x2UL<<CLK_CLKSEL2_TMR2_S_Pos)

Select TMR2 clock source from low speed oscillator

Definition at line 168 of file clk.h.

## ◆ CLK_CLKSEL2_TMR2_S_LXT

#define CLK_CLKSEL2_TMR2_S_LXT (0x1UL<<CLK_CLKSEL2_TMR2_S_Pos)

Select TMR2 clock source from low speed crystal

Definition at line 167 of file clk.h.

## ◆ CLK_CLKSEL2_TMR3_S_EXT

#define CLK_CLKSEL2_TMR3_S_EXT (0x3UL<<CLK_CLKSEL2_TMR3_S_Pos)

Select TMR3 clock source from external trigger

Definition at line 163 of file clk.h.

## ◆ CLK_CLKSEL2_TMR3_S_HIRC

#define CLK_CLKSEL2_TMR3_S_HIRC (0x4UL<<CLK_CLKSEL2_TMR3_S_Pos)

Select TMR3 clock source from high speed oscillator

Definition at line 164 of file clk.h.

## ◆ CLK_CLKSEL2_TMR3_S_HXT

#define CLK_CLKSEL2_TMR3_S_HXT (0x0UL<<CLK_CLKSEL2_TMR3_S_Pos)

Select TMR3 clock source from high speed crystal

Definition at line 160 of file clk.h.

## ◆ CLK_CLKSEL2_TMR3_S_LIRC

#define CLK_CLKSEL2_TMR3_S_LIRC (0x2UL<<CLK_CLKSEL2_TMR3_S_Pos)

Select TMR3 clock source from low speed oscillator

Definition at line 162 of file clk.h.

## ◆ CLK_CLKSEL2_TMR3_S_LXT

#define CLK_CLKSEL2_TMR3_S_LXT (0x1UL<<CLK_CLKSEL2_TMR3_S_Pos)

Select TMR3 clock source from low speed crystal

Definition at line 161 of file clk.h.

## ◆ CLK_CLKSTATUS_CLK_SW_FAIL

#define CLK_CLKSTATUS_CLK_SW_FAIL (0x1UL<<CLK_CLKSTATUS_CLK_SW_FAIL_Pos)

Clock switch fail flag

Definition at line 97 of file clk.h.

## ◆ CLK_CLKSTATUS_HIRC_STB

#define CLK_CLKSTATUS_HIRC_STB (0x1UL<<CLK_CLKSTATUS_HIRC_STB_Pos)

Internal high speed oscillator clock source stable flag

Definition at line 96 of file clk.h.

## ◆ CLK_CLKSTATUS_HXT_STB

#define CLK_CLKSTATUS_HXT_STB (0x1UL<<CLK_CLKSTATUS_HXT_STB_Pos)

External high speed crystal clock source stable flag

Definition at line 92 of file clk.h.

## ◆ CLK_CLKSTATUS_LIRC_STB

#define CLK_CLKSTATUS_LIRC_STB (0x1UL<<CLK_CLKSTATUS_LIRC_STB_Pos)

Internal low speed oscillator clock source stable flag

Definition at line 95 of file clk.h.

## ◆ CLK_CLKSTATUS_LXT_STB

#define CLK_CLKSTATUS_LXT_STB (0x1UL<<CLK_CLKSTATUS_LXT_STB_Pos)

External low speed crystal clock source stable flag

Definition at line 93 of file clk.h.

## ◆ CLK_CLKSTATUS_PLL_STB

#define CLK_CLKSTATUS_PLL_STB (0x1UL<<CLK_CLKSTATUS_PLL_STB_Pos)

Internal PLL clock source stable flag

Definition at line 94 of file clk.h.

## ◆ CLK_FRQDIV_EN

#define CLK_FRQDIV_EN (0x1UL<<CLK_FRQDIV_FDIV_EN_Pos)

Frequency divider enable bit

Definition at line 234 of file clk.h.

## ◆ CLK_HCLK_CLK_DIVIDER

#define CLK_HCLK_CLK_DIVIDER | ( |  | x | ) | (((x-1)<< CLK_CLKDIV0_HCLK_N_Pos) & CLK_CLKDIV0_HCLK_N_Msk)

CLKDIV0 Setting for HCLK clock divider. It could be 1~16

Definition at line 188 of file clk.h.

## ◆ CLK_I2S_CLK_DIVIDER

#define CLK_I2S_CLK_DIVIDER | ( |  | x | ) | (((x-1)<< CLK_CLKDIV0_I2S_N_Pos) & CLK_CLKDIV0_I2S_N_Msk)

CLKDIV0 Setting for I2S clock divider. It could be 1~16

Definition at line 193 of file clk.h.

## ◆ CLK_MCLKO_MCLK_SEL_ADC

#define CLK_MCLKO_MCLK_SEL_ADC (0x24<<CLK_MCLKO_MCLK_SEL_Pos)

Select MCLK clock output ADC clock

Definition at line 254 of file clk.h.

## ◆ CLK_MCLKO_MCLK_SEL_HCLK

#define CLK_MCLKO_MCLK_SEL_HCLK (0x08<<CLK_MCLKO_MCLK_SEL_Pos)

Select MCLK clock output HCLK clock

Definition at line 248 of file clk.h.

## ◆ CLK_MCLKO_MCLK_SEL_HIRC

#define CLK_MCLKO_MCLK_SEL_HIRC (0x01<<CLK_MCLKO_MCLK_SEL_Pos)

Select MCLK clock output HIRC clock

Definition at line 241 of file clk.h.

## ◆ CLK_MCLKO_MCLK_SEL_HXT

#define CLK_MCLKO_MCLK_SEL_HXT (0x02<<CLK_MCLKO_MCLK_SEL_Pos)

Select MCLK clock output HXT clock

Definition at line 242 of file clk.h.

## ◆ CLK_MCLKO_MCLK_SEL_I2S

#define CLK_MCLKO_MCLK_SEL_I2S (0x3D<<CLK_MCLKO_MCLK_SEL_Pos)

Select MCLK clock output I2S clock

Definition at line 264 of file clk.h.

## ◆ CLK_MCLKO_MCLK_SEL_ISP_CLK

#define CLK_MCLKO_MCLK_SEL_ISP_CLK (0x00<<CLK_MCLKO_MCLK_SEL_Pos)

Select MCLK clock output ISP_CLK

Definition at line 240 of file clk.h.

## ◆ CLK_MCLKO_MCLK_SEL_LCD

#define CLK_MCLKO_MCLK_SEL_LCD (0x29<<CLK_MCLKO_MCLK_SEL_Pos)

Select MCLK clock output LCD clock

Definition at line 258 of file clk.h.

## ◆ CLK_MCLKO_MCLK_SEL_LIRC

#define CLK_MCLKO_MCLK_SEL_LIRC (0x04<<CLK_MCLKO_MCLK_SEL_Pos)

Select MCLK clock output LIRC clock

Definition at line 244 of file clk.h.

## ◆ CLK_MCLKO_MCLK_SEL_LXT

#define CLK_MCLKO_MCLK_SEL_LXT (0x03<<CLK_MCLKO_MCLK_SEL_Pos)

Select MCLK clock output LXT clock

Definition at line 243 of file clk.h.

## ◆ CLK_MCLKO_MCLK_SEL_PCLK

#define CLK_MCLKO_MCLK_SEL_PCLK (0x0A<<CLK_MCLKO_MCLK_SEL_Pos)

Select MCLK clock output PCLK clock

Definition at line 249 of file clk.h.

## ◆ CLK_MCLKO_MCLK_SEL_PLLI

#define CLK_MCLKO_MCLK_SEL_PLLI (0x06<<CLK_MCLKO_MCLK_SEL_Pos)

Select MCLK clock output PLL input

Definition at line 246 of file clk.h.

## ◆ CLK_MCLKO_MCLK_SEL_PLLO

#define CLK_MCLKO_MCLK_SEL_PLLO (0x05<<CLK_MCLKO_MCLK_SEL_Pos)

Select MCLK clock output PLL input

Definition at line 245 of file clk.h.

## ◆ CLK_MCLKO_MCLK_SEL_PWM0CH01

#define CLK_MCLKO_MCLK_SEL_PWM0CH01 (0x26<<CLK_MCLKO_MCLK_SEL_Pos)

Select MCLK clock output PWM0CH01 clock

Definition at line 256 of file clk.h.

## ◆ CLK_MCLKO_MCLK_SEL_PWM0CH23

#define CLK_MCLKO_MCLK_SEL_PWM0CH23 (0x27<<CLK_MCLKO_MCLK_SEL_Pos)

Select MCLK clock output PWM0CH23 clock

Definition at line 257 of file clk.h.

## ◆ CLK_MCLKO_MCLK_SEL_PWM1CH01

#define CLK_MCLKO_MCLK_SEL_PWM1CH01 (0x3B<<CLK_MCLKO_MCLK_SEL_Pos)

Select MCLK clock output PWM1CH01 clock

Definition at line 262 of file clk.h.

## ◆ CLK_MCLKO_MCLK_SEL_PWM1CH23

#define CLK_MCLKO_MCLK_SEL_PWM1CH23 (0x3C<<CLK_MCLKO_MCLK_SEL_Pos)

Select MCLK clock output PWM1CH23 clock

Definition at line 263 of file clk.h.

## ◆ CLK_MCLKO_MCLK_SEL_SC0

#define CLK_MCLKO_MCLK_SEL_SC0 (0x3E<<CLK_MCLKO_MCLK_SEL_Pos)

Select MCLK clock output SC0 clock

Definition at line 265 of file clk.h.

## ◆ CLK_MCLKO_MCLK_SEL_SC1

#define CLK_MCLKO_MCLK_SEL_SC1 (0x3F<<CLK_MCLKO_MCLK_SEL_Pos)

Select MCLK clock output SC1 clock

Definition at line 266 of file clk.h.

## ◆ CLK_MCLKO_MCLK_SEL_SYSTICK

#define CLK_MCLKO_MCLK_SEL_SYSTICK (0x07<<CLK_MCLKO_MCLK_SEL_Pos)

Select MCLK clock output system tick

Definition at line 247 of file clk.h.

## ◆ CLK_MCLKO_MCLK_SEL_TMR0

#define CLK_MCLKO_MCLK_SEL_TMR0 (0x20<<CLK_MCLKO_MCLK_SEL_Pos)

Select MCLK clock output TMR0 clock

Definition at line 250 of file clk.h.

## ◆ CLK_MCLKO_MCLK_SEL_TMR1

#define CLK_MCLKO_MCLK_SEL_TMR1 (0x21<<CLK_MCLKO_MCLK_SEL_Pos)

Select MCLK clock output TMR1 clock

Definition at line 251 of file clk.h.

## ◆ CLK_MCLKO_MCLK_SEL_TMR2

#define CLK_MCLKO_MCLK_SEL_TMR2 (0x38<<CLK_MCLKO_MCLK_SEL_Pos)

Select MCLK clock output TMR2 clock

Definition at line 259 of file clk.h.

## ◆ CLK_MCLKO_MCLK_SEL_TMR3

#define CLK_MCLKO_MCLK_SEL_TMR3 (0x39<<CLK_MCLKO_MCLK_SEL_Pos)

Select MCLK clock output TMR3 clock

Definition at line 260 of file clk.h.

## ◆ CLK_MCLKO_MCLK_SEL_UART0

#define CLK_MCLKO_MCLK_SEL_UART0 (0x22<<CLK_MCLKO_MCLK_SEL_Pos)

Select MCLK clock output UART0 clock

Definition at line 252 of file clk.h.

## ◆ CLK_MCLKO_MCLK_SEL_UART1

#define CLK_MCLKO_MCLK_SEL_UART1 (0x3A<<CLK_MCLKO_MCLK_SEL_Pos)

Select MCLK clock output UART1 clock

Definition at line 261 of file clk.h.

## ◆ CLK_MCLKO_MCLK_SEL_USB

#define CLK_MCLKO_MCLK_SEL_USB (0x23<<CLK_MCLKO_MCLK_SEL_Pos)

Select MCLK clock output USB clock

Definition at line 253 of file clk.h.

## ◆ CLK_MCLKO_MCLK_SEL_WDT

#define CLK_MCLKO_MCLK_SEL_WDT (0x25<<CLK_MCLKO_MCLK_SEL_Pos)

Select MCLK clock output WDT clock

Definition at line 255 of file clk.h.

## ◆ CLK_PLLCON_NF

#define CLK_PLLCON_NF | ( |  | x | ) | ((x)-32)

x must be constant and 32 <= x <= 95.)

Definition at line 213 of file clk.h.

## ◆ CLK_PLLCON_NO_1

#define CLK_PLLCON_NO_1 0x0000UL

For PLL output divider is 1

Definition at line 215 of file clk.h.

## ◆ CLK_PLLCON_NO_2

#define CLK_PLLCON_NO_2 0x1000UL

For PLL output divider is 2

Definition at line 216 of file clk.h.

## ◆ CLK_PLLCTL_120MHz_HIRC

#define CLK_PLLCTL_120MHz_HIRC (CLK_PLLCTL_PLL_SRC_HIRC | CLK_PLLCON_NO_1 | CLK_PLLCTL_NR_4 | CLK_PLLCON_NF(40) )

Predefined PLLCTL setting for 120MHz PLL output with 12MHz IRC

Definition at line 227 of file clk.h.

## ◆ CLK_PLLCTL_42MHz_HIRC

#define CLK_PLLCTL_42MHz_HIRC (CLK_PLLCTL_PLL_SRC_HIRC | CLK_PLLCON_NO_1 | CLK_PLLCTL_NR_16| CLK_PLLCON_NF(56) )

Predefined PLLCTL setting for 42MHz PLL output with 12MHz IRC

Definition at line 231 of file clk.h.

## ◆ CLK_PLLCTL_48MHz_HIRC

#define CLK_PLLCTL_48MHz_HIRC (CLK_PLLCTL_PLL_SRC_HIRC | CLK_PLLCON_NO_1 | CLK_PLLCTL_NR_16| CLK_PLLCON_NF(64) )

Predefined PLLCTL setting for 48MHz PLL output with 12MHz IRC

Definition at line 229 of file clk.h.

## ◆ CLK_PLLCTL_84MHz_HIRC

#define CLK_PLLCTL_84MHz_HIRC (CLK_PLLCTL_PLL_SRC_HIRC | CLK_PLLCON_NO_1 | CLK_PLLCTL_NR_8 | CLK_PLLCON_NF(56) )

Predefined PLLCTL setting for 84MHz PLL output with 12MHz IRC

Definition at line 230 of file clk.h.

## ◆ CLK_PLLCTL_96MHz_HIRC

#define CLK_PLLCTL_96MHz_HIRC (CLK_PLLCTL_PLL_SRC_HIRC | CLK_PLLCON_NO_1 | CLK_PLLCTL_NR_8 | CLK_PLLCON_NF(64) )

Predefined PLLCTL setting for 96MHz PLL output with 12MHz IRC

Definition at line 228 of file clk.h.

## ◆ CLK_PLLCTL_NR_16

#define CLK_PLLCTL_NR_16 0x300

For PLL input divider is 16

Definition at line 212 of file clk.h.

## ◆ CLK_PLLCTL_NR_2

#define CLK_PLLCTL_NR_2 0x000

For PLL input divider is 2

Definition at line 209 of file clk.h.

## ◆ CLK_PLLCTL_NR_4

#define CLK_PLLCTL_NR_4 0x100

For PLL input divider is 4

Definition at line 210 of file clk.h.

## ◆ CLK_PLLCTL_NR_8

#define CLK_PLLCTL_NR_8 0x200

For PLL input divider is 8

Definition at line 211 of file clk.h.

## ◆ CLK_PLLCTL_OUT_DV

#define CLK_PLLCTL_OUT_DV (0x1UL<<CLK_PLLCTL_OUT_DV_Pos)

PLL Output Divider Control

Definition at line 204 of file clk.h.

## ◆ CLK_PLLCTL_PD

#define CLK_PLLCTL_PD (0x1UL<<CLK_PLLCTL_PD_Pos)

PLL Power down mode

Definition at line 205 of file clk.h.

## ◆ CLK_PLLCTL_PLL_SRC_HIRC

#define CLK_PLLCTL_PLL_SRC_HIRC (0x1UL<<CLK_PLLCTL_PLL_SRC_Pos)

PLL clock source from high speed oscillator

Definition at line 206 of file clk.h.

## ◆ CLK_PLLCTL_PLL_SRC_HXT

#define CLK_PLLCTL_PLL_SRC_HXT (0x0UL<<CLK_PLLCTL_PLL_SRC_Pos)

PLL clock source from high speed crystal

Definition at line 207 of file clk.h.

## ◆ CLK_PWRCTL_DELY_EN

#define CLK_PWRCTL_DELY_EN (0x1UL<<CLK_PWRCTL_WK_DLY_Pos)

Enable the wake-up delay counter

Definition at line 47 of file clk.h.

## ◆ CLK_PWRCTL_HIRC_EN

#define CLK_PWRCTL_HIRC_EN (0x1UL<<CLK_PWRCTL_HIRC_EN_Pos)

Enable internal high speed oscillator

Definition at line 45 of file clk.h.

## ◆ CLK_PWRCTL_HXT_EN

#define CLK_PWRCTL_HXT_EN (0x1UL<<CLK_PWRCTL_HXT_EN_Pos)

Enable high speed crystal

Definition at line 43 of file clk.h.

## ◆ CLK_PWRCTL_HXT_GAIN

#define CLK_PWRCTL_HXT_GAIN (0x1UL<<CLK_PWRCTL_HXT_GAIN_Pos)

High frequency crystal Gain control Enabled

Definition at line 51 of file clk.h.

## ◆ CLK_PWRCTL_HXT_SELXT

#define CLK_PWRCTL_HXT_SELXT (0x1UL<<CLK_PWRCTL_HXT_SELXT_Pos)

High frequency crystal loop back path Enabled

Definition at line 50 of file clk.h.

## ◆ CLK_PWRCTL_LIRC_EN

#define CLK_PWRCTL_LIRC_EN (0x1UL<<CLK_PWRCTL_LIRC_EN_Pos)

Enable internal low speed oscillator

Definition at line 46 of file clk.h.

## ◆ CLK_PWRCTL_LXT_EN

#define CLK_PWRCTL_LXT_EN (0x1UL<<CLK_PWRCTL_LXT_EN_Pos)

Enable low speed crystal

Definition at line 44 of file clk.h.

## ◆ CLK_PWRCTL_LXT_SCNT

#define CLK_PWRCTL_LXT_SCNT (0x1UL<<CLK_PWRCTL_LXT_SCNT_Pos)

Delay 8192 LXT before LXT output

Definition at line 52 of file clk.h.

## ◆ CLK_PWRCTL_PWRDOWN_EN

#define CLK_PWRCTL_PWRDOWN_EN (0x1UL<<CLK_PWRCTL_PD_EN_Pos)

Power down enable bit

Definition at line 49 of file clk.h.

## ◆ CLK_PWRCTL_WAKEINT_EN

#define CLK_PWRCTL_WAKEINT_EN (0x1UL<<CLK_PWRCTL_PD_WK_IE_Pos)

Enable the wake-up interrupt

Definition at line 48 of file clk.h.

## ◆ CLK_SC0_CLK_DIVIDER

#define CLK_SC0_CLK_DIVIDER | ( |  | x | ) | (((x-1)<< CLK_CLKDIV0_SC0_N_Pos) & CLK_CLKDIV0_SC0_N_Msk)

CLKDIV0 Setting for SmartCard0 clock divider. It could be 1~16

Definition at line 192 of file clk.h.

## ◆ CLK_SC1_CLK_DIVIDER

#define CLK_SC1_CLK_DIVIDER | ( |  | x | ) | (((x-1)<< CLK_CLKDIV1_SC1_N_Pos ) & CLK_CLKDIV1_SC1_N_Msk)

CLKDIV1 Setting for SmartCard1 clock divider. It could be 1~16

Definition at line 197 of file clk.h.

## ◆ CLK_SC2_CLK_DIVIDER

#define CLK_SC2_CLK_DIVIDER | ( |  | x | ) | (((x-1)<< CLK_CLKDIV1_SC2_N_Pos ) & CLK_CLKDIV1_SC2_N_Msk)

CLKDIV1 Setting for SmartCard2 clock divider. It could be 1~16

Definition at line 196 of file clk.h.

## ◆ CLK_UART_CLK_DIVIDER

#define CLK_UART_CLK_DIVIDER | ( |  | x | ) | (((x-1)<< CLK_CLKDIV0_UART_N_Pos) & CLK_CLKDIV0_UART_N_Msk)

CLKDIV0 Setting for UART clock divider. It could be 1~16

Definition at line 190 of file clk.h.

## ◆ CLK_USB_CLK_DIVIDER

#define CLK_USB_CLK_DIVIDER | ( |  | x | ) | (((x-1)<< CLK_CLKDIV0_USB_N_Pos) & CLK_CLKDIV0_USB_N_Msk)

CLKDIV0 Setting for HCLK clock divider. It could be 1~16

Definition at line 189 of file clk.h.

## ◆ CLK_WK_INTSTS_IS

#define CLK_WK_INTSTS_IS (0x1UL<<CLK_WK_INTSTS_PD_WK_IS_Pos)

Wake-up Interrupt Status in chip Power-down Mode

Definition at line 237 of file clk.h.

## ◆ DAC_MODULE

#define DAC_MODULE ((1UL<<31)|(3<<29)|(MODULE_NoMsk<<25)|( 0<<20)|(0<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_APBCLK_DAC_EN_Pos )

DAC Module

Definition at line 326 of file clk.h.

## ◆ DMA_MODULE

#define DMA_MODULE ((0UL<<31)|(3<<29)|(MODULE_NoMsk<<25)|( 0<<20)|(0<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_AHBCLK_DMA_EN_Pos )

DMA Module

Definition at line 298 of file clk.h.

## ◆ EBI_MODULE

#define EBI_MODULE ((0UL<<31)|(3<<29)|(MODULE_NoMsk<<25)|( 0<<20)|(1<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_AHBCLK_EBI_EN_Pos )

EBI Module

Definition at line 296 of file clk.h.

## ◆ FDIV_MODULE

#define FDIV_MODULE ((1UL<<31)|(2<<29)|(3<<25) |( 2<<20)|(0<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_APBCLK_FDIV_EN_Pos )

Frequency Divider0 Output Module

Definition at line 318 of file clk.h.

## ◆ FREQ_120MHZ

#define FREQ_120MHZ 120000000

Definition at line 35 of file clk.h.

## ◆ FREQ_128MHZ

#define FREQ_128MHZ 128000000

Definition at line 34 of file clk.h.

## ◆ FREQ_12MHZ

#define FREQ_12MHZ 12000000

Definition at line 40 of file clk.h.

## ◆ FREQ_24MHZ

#define FREQ_24MHZ 24000000

Definition at line 39 of file clk.h.

## ◆ FREQ_32MHZ

#define FREQ_32MHZ 32000000

Definition at line 38 of file clk.h.

## ◆ FREQ_42MHZ

#define FREQ_42MHZ 42000000

Definition at line 37 of file clk.h.

## ◆ FREQ_48MHZ

#define FREQ_48MHZ 48000000

Definition at line 36 of file clk.h.

## ◆ GPIO_MODULE

#define GPIO_MODULE ((0UL<<31)|(3<<29)|(MODULE_NoMsk<<25)|( 0<<20)|(0<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_AHBCLK_GPIO_EN_Pos )

GPIO Module

Definition at line 299 of file clk.h.

## ◆ I2C0_MODULE

#define I2C0_MODULE ((1UL<<31)|(0<<29)|(MODULE_NoMsk<<25)|( 0<<20)|(0<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_APBCLK_I2C0_EN_Pos )

I2C0 Module

Definition at line 317 of file clk.h.

## ◆ I2C1_MODULE

#define I2C1_MODULE ((1UL<<31)|(0<<29)|(MODULE_NoMsk<<25)|( 0<<20)|(0<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_APBCLK_I2C1_EN_Pos )

I2C1 Module

Definition at line 316 of file clk.h.

## ◆ I2S_MODULE

#define I2S_MODULE ((1UL<<31)|(2<<29)|(3<<25) |(16<<20)|(0<<18)|(0xF<<10) |(12<<5)|CLK_APBCLK_I2S_EN_Pos )

I2S Module

Definition at line 304 of file clk.h.

## ◆ ISP_MODULE

#define ISP_MODULE ((0UL<<31)|(3<<29)|(MODULE_NoMsk<<25)|( 0<<20)|(1<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_AHBCLK_ISP_EN_Pos )

ISP Module

Definition at line 297 of file clk.h.

## ◆ LCD_MODULE

#define LCD_MODULE ((1UL<<31)|(1<<29)|(1<<25) |(18<<20)|(0<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_APBCLK_LCD_EN_Pos )

LCD Module

Definition at line 325 of file clk.h.

## ◆ MODULE_APBCLK

#define MODULE_APBCLK | ( |  | x | ) | ((x >>31) & 0x1)

Calculate APBCLK offset on MODULE index

Definition at line 272 of file clk.h.

## ◆ MODULE_APBCLK_ENC

#define MODULE_APBCLK_ENC | ( |  | x | ) | (((x) & 0x01) << 31)

MODULE index, 0x0:AHBCLK, 0x1:APBCLK

Definition at line 283 of file clk.h.

## ◆ MODULE_CLKDIV

#define MODULE_CLKDIV | ( |  | x | ) | ((x >>18) & 0x3)

Calculate APBCLK CLKDIV on MODULE index

Definition at line 276 of file clk.h.

## ◆ MODULE_CLKDIV_ENC

#define MODULE_CLKDIV_ENC | ( |  | x | ) | (((x) & 0x03) << 18)

APBCLK CLKDIV on MODULE index, 0x0:CLKDIV

Definition at line 287 of file clk.h.

## ◆ MODULE_CLKDIV_Msk

#define MODULE_CLKDIV_Msk | ( |  | x | ) | ((x >>10) & 0xff)

Calculate CLKDIV mask offset on MODULE index

Definition at line 277 of file clk.h.

## ◆ MODULE_CLKDIV_Msk_ENC

#define MODULE_CLKDIV_Msk_ENC | ( |  | x | ) | (((x) & 0xff) << 10)

CLKDIV mask offset on MODULE index

Definition at line 288 of file clk.h.

## ◆ MODULE_CLKDIV_Pos

#define MODULE_CLKDIV_Pos | ( |  | x | ) | ((x >>5 ) & 0x1f)

Calculate CLKDIV position offset on MODULE index

Definition at line 278 of file clk.h.

## ◆ MODULE_CLKDIV_Pos_ENC

#define MODULE_CLKDIV_Pos_ENC | ( |  | x | ) | (((x) & 0x1f) << 5)

CLKDIV position offset on MODULE index

Definition at line 289 of file clk.h.

## ◆ MODULE_CLKSEL

#define MODULE_CLKSEL | ( |  | x | ) | ((x >>29) & 0x3)

Calculate CLKSEL offset on MODULE index

Definition at line 273 of file clk.h.

## ◆ MODULE_CLKSEL_ENC

#define MODULE_CLKSEL_ENC | ( |  | x | ) | (((x) & 0x03) << 29)

CLKSEL offset on MODULE index, 0x0:CLKSEL0, 0x1:CLKSEL1 0x3 CLKSEL2

Definition at line 284 of file clk.h.

## ◆ MODULE_CLKSEL_Msk

#define MODULE_CLKSEL_Msk | ( |  | x | ) | ((x >>25) & 0xf)

Calculate CLKSEL mask offset on MODULE index

Definition at line 274 of file clk.h.

## ◆ MODULE_CLKSEL_Msk_ENC

#define MODULE_CLKSEL_Msk_ENC | ( |  | x | ) | (((x) & 0x0f) << 25)

CLKSEL mask offset on MODULE index

Definition at line 285 of file clk.h.

## ◆ MODULE_CLKSEL_Pos

#define MODULE_CLKSEL_Pos | ( |  | x | ) | ((x >>20) & 0x1f)

Calculate CLKSEL position offset on MODULE index

Definition at line 275 of file clk.h.

## ◆ MODULE_CLKSEL_Pos_ENC

#define MODULE_CLKSEL_Pos_ENC | ( |  | x | ) | (((x) & 0x1f) << 20)

CLKSEL position offset on MODULE index

Definition at line 286 of file clk.h.

## ◆ MODULE_IP_EN_Pos

#define MODULE_IP_EN_Pos | ( |  | x | ) | ((x >>0 ) & 0x1f)

Calculate APBCLK offset on MODULE index

Definition at line 279 of file clk.h.

## ◆ MODULE_IP_EN_Pos_ENC

#define MODULE_IP_EN_Pos_ENC | ( |  | x | ) | (((x) & 0x1f) << 0)

APBCLK offset on MODULE index

Definition at line 290 of file clk.h.

## ◆ MODULE_NoMsk

#define MODULE_NoMsk 0x0

Not mask on MODULE index

Definition at line 280 of file clk.h.

## ◆ NA

#define NA MODULE_NoMsk

Not Available

Definition at line 281 of file clk.h.

## ◆ PWM0_CH01_MODULE

#define PWM0_CH01_MODULE ((1UL<<31)|(1<<29)|(3<<25) |( 4<<20)|(0<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_APBCLK_PWM0_CH01_EN_Pos)

PWM0 Channel0 and Channel1 Module

Definition at line 310 of file clk.h.

## ◆ PWM0_CH23_MODULE

#define PWM0_CH23_MODULE ((1UL<<31)|(1<<29)|(3<<25) |( 6<<20)|(0<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_APBCLK_PWM0_CH23_EN_Pos)

PWM0 Channel2 and Channel3 Module

Definition at line 309 of file clk.h.

## ◆ PWM1_CH01_MODULE

#define PWM1_CH01_MODULE ((1UL<<31)|(2<<29)|(3<<25) |( 4<<20)|(0<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_APBCLK_PWM1_CH01_EN_Pos)

PWM1 Channel0 and Channel1 Module

Definition at line 308 of file clk.h.

## ◆ PWM1_CH23_MODULE

#define PWM1_CH23_MODULE ((1UL<<31)|(2<<29)|(3<<25) |( 6<<20)|(0<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_APBCLK_PWM1_CH23_EN_Pos)

PWM1 Channel2 and Channel3 Module

Definition at line 307 of file clk.h.

## ◆ RTC_MODULE

#define RTC_MODULE ((1UL<<31)|(3<<29)|(MODULE_NoMsk<<25)|( 0<<20)|(0<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_APBCLK_RTC_EN_Pos )

Real-Time-Clock Module

Definition at line 323 of file clk.h.

## ◆ SC0_MODULE

#define SC0_MODULE ((1UL<<31)|(2<<29)|(3<<25) |(18<<20)|(0<<18)|(0xF<<10) |(28<<5)|CLK_APBCLK_SC0_EN_Pos )

SmartCard0 Module

Definition at line 303 of file clk.h.

## ◆ SC1_MODULE

#define SC1_MODULE ((1UL<<31)|(2<<29)|(3<<25) |(18<<20)|(1<<18)|(0xF<<10) |( 0<<5)|CLK_APBCLK_SC1_EN_Pos )

SmartCard1 Module

Definition at line 302 of file clk.h.

## ◆ SC2_MODULE

#define SC2_MODULE ((1UL<<31)|(2<<29)|(3<<25) |(18<<20)|(1<<18)|(0xF<<10) |( 4<<5)|CLK_APBCLK_SC2_EN_Pos )

SmartCard2 Module

Definition at line 301 of file clk.h.

## ◆ SPI0_MODULE

#define SPI0_MODULE ((1UL<<31)|(2<<29)|(1<<25) |(20<<20)|(0<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_APBCLK_SPI0_EN_Pos )

SPI0 Module

Definition at line 315 of file clk.h.

## ◆ SPI1_MODULE

#define SPI1_MODULE ((1UL<<31)|(2<<29)|(1<<25) |(21<<20)|(0<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_APBCLK_SPI1_EN_Pos )

SPI1 Module

Definition at line 314 of file clk.h.

## ◆ SPI2_MODULE

#define SPI2_MODULE ((1UL<<31)|(2<<29)|(1<<25) |(22<<20)|(0<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_APBCLK_SPI2_EN_Pos )

SPI0 Module

Definition at line 313 of file clk.h.

## ◆ SRAM_MODULE

#define SRAM_MODULE ((0UL<<31)|(3<<29)|(MODULE_NoMsk<<25)|( 0<<20)|(1<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_AHBCLK_SRAM_EN_Pos )

SRAM Module

Definition at line 295 of file clk.h.

## ◆ TICK_MODULE

#define TICK_MODULE ((0UL<<31)|(3<<29)|(MODULE_NoMsk<<25)|( 0<<20)|(1<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_AHBCLK_TICK_EN_Pos )

TICK Module

Definition at line 294 of file clk.h.

## ◆ TMR0_MODULE

#define TMR0_MODULE ((1UL<<31)|(1<<29)|(7<<25) |( 8<<20)|(1<<18)|(0xF<<10) |( 8<<5)|CLK_APBCLK_TMR0_EN_Pos )

Timer0 Module

Definition at line 322 of file clk.h.

## ◆ TMR1_MODULE

#define TMR1_MODULE ((1UL<<31)|(1<<29)|(7<<25) |(12<<20)|(1<<18)|(0xF<<10) |(12<<5)|CLK_APBCLK_TMR1_EN_Pos )

Timer1 Module

Definition at line 321 of file clk.h.

## ◆ TMR2_MODULE

#define TMR2_MODULE ((1UL<<31)|(2<<29)|(7<<25) |( 8<<20)|(1<<18)|(0xF<<10) |(16<<5)|CLK_APBCLK_TMR2_EN_Pos )

Timer2 Module

Definition at line 320 of file clk.h.

## ◆ TMR3_MODULE

#define TMR3_MODULE ((1UL<<31)|(2<<29)|(7<<25) |(12<<20)|(1<<18)|(0xF<<10) |(20<<5)|CLK_APBCLK_TMR3_EN_Pos )

Timer3 Module

Definition at line 319 of file clk.h.

## ◆ UART0_MODULE

#define UART0_MODULE ((1UL<<31)|(1<<29)|(3<<25) |( 0<<20)|(0<<18)|(0xF<<10) |( 8<<5)|CLK_APBCLK_UART0_EN_Pos )

UART0 Module

Definition at line 312 of file clk.h.

## ◆ UART1_MODULE

#define UART1_MODULE ((1UL<<31)|(1<<29)|(3<<25) |( 0<<20)|(0<<18)|(0xF<<10) |( 8<<5)|CLK_APBCLK_UART1_EN_Pos )

UART1 Module

Definition at line 311 of file clk.h.

## ◆ USBD_MODULE

#define USBD_MODULE ((1UL<<31)|(1<<29)|(MODULE_NoMsk<<25)|( 0<<20)|(0<<18)|(0xF<<10) |( 4<<5)|CLK_APBCLK_USBD_EN_Pos )

USBD Module

Definition at line 306 of file clk.h.

## ◆ WDT_MODULE

#define WDT_MODULE ((1UL<<31)|(3<<29)|(MODULE_NoMsk<<25)|( 0<<20)|(0<<18)|(MODULE_NoMsk<<10)|( 0<<5)|CLK_APBCLK_WDT_EN_Pos )

Watchdog Timer Module

Definition at line 324 of file clk.h.