MT2523 API Reference  LinkIt SDK v4
Clock Gate

Overview

HAL_CLOCK_CG_ID descriptions

Each hal_clock_cg_id is related to one CG. Please check the following parameters before controlling the clock.

The description of API parameters for HAL_CLOCK_CG_ID is listed below:

HAL_CLOCK_CG_ID Details
HAL_CLOCK_CG_BT_26M The CG for crystal oscillator to Bluetooth. It is controlled in Bluetooth library.
HAL_CLOCK_CG_BT_BUSCK The CG for AHB bus to Bluetooth. It is controlled in Bluetooth library.
HAL_CLOCK_CG_BT_N9 The CG for Bluetooth coprocessor. It is controlled in Bluetooth library.
HAL_CLOCK_CG_BUS The CG for system bus. It cannot be disabled, otherwise the system will fail.
HAL_CLOCK_CG_CM The CG for Cortex-M4. It cannot be disabled, otherwise the system will fail.
HAL_CLOCK_CG_DMA The CG for DMA. It is controlled in DMA driver.
HAL_CLOCK_CG_USB48M The CG for USB MAC. It is controlled in USB driver.
HAL_CLOCK_CG_MSDC0 The CG for MSDC0. It is controlled in MSDC driver.
HAL_CLOCK_CG_I2C2 The CG for I2C2. It is controlled in I2C driver.
HAL_CLOCK_CG_CM4_OSTIMER The CG for OS timer. It cannot be disabled, otherwise the system will fail.
HAL_CLOCK_CG_DMA_AO The CG for DMA. It is controlled in DMA driver.
HAL_CLOCK_CG_UART0 The CG for UART0. It cannot be disabled, otherwise the system will fail.
HAL_CLOCK_CG_UART1 The CG for UART1. It is controlled in UART driver.
HAL_CLOCK_CG_UART2 The CG for UART2. It is controlled in UART driver.
HAL_CLOCK_CG_UART3 The CG for UART3. It is controlled in UART driver.
HAL_CLOCK_CG_SPISLV The CG for SPI slave. This CG should be enabled when it is connected to the master device if choosing a custom driver.
HAL_CLOCK_CG_SPI0 The CG for SPI master 0. It is controlled in SPI driver.
HAL_CLOCK_CG_SPI1 The CG for SPI master 1. It is controlled in SPI driver.
HAL_CLOCK_CG_SPI2 The CG for SPI master 2. It is controlled in SPI driver.
HAL_CLOCK_CG_SPI3 The CG for SPI master 3. It is controlled in SPI driver.
HAL_CLOCK_CG_PWM0 The CG for PWM0. It is controlled in PWM driver.
HAL_CLOCK_CG_BTIF The CG for BTIF (an APB slave which transmits or receives data through DMA/VFIFO.). It is controlled in Bluetooth library.
HAL_CLOCK_CG_GPTIMER The clock for general purpose timer. It cannot be disabled, otherwise the system will fail.
HAL_CLOCK_CG_PWM1 The CG for PWM1. It is controlled in PWM driver.
HAL_CLOCK_CG_CM_SYSROM The clock for system ROM. It cannot be disabled, otherwise the system will fail.
HAL_CLOCK_CG_SFC The clock for serial flash controller. It cannot be disabled, otherwise the system will fail.
HAL_CLOCK_CG_MSDC1 The CG for MSDC1. It is controlled in MSDC driver.
HAL_CLOCK_CG_USB_DMA The CG for USB DMA. It is controlled in USB driver.
HAL_CLOCK_CG_USB_BUS The CG for USB bus. It is controlled in USB driver.
HAL_CLOCK_CG_DISP_PWM The CG for the PWM signal to LCM module. It is controlled in display driver.
HAL_CLOCK_CG_TRNG The CG for TRNG. It is controlled in TRNG driver.
HAL_CLOCK_CG_PWM2 The CG for PWM2. It is controlled in PWM driver.
HAL_CLOCK_CG_PWM3 The CG for PWM3. It is controlled in PWM driver.
HAL_CLOCK_CG_PWM4 The CG for PWM4. It is controlled in PWM driver.
HAL_CLOCK_CG_PWM5 The CG for PWM5. It is controlled in PWM driver.
HAL_CLOCK_CG_LCD The CG for LCD engine which processes the buffer and generates the output signal to DBI/DSI interface. It is controlled in display driver.
HAL_CLOCK_CG_G2D The CG for G2D. It is controlled in G2D driver.
HAL_CLOCK_CG_MM_COLOR The CG for color engine which adjusts the sharpness, contrast and saturation for display quality. It is controlled in display driver.
HAL_CLOCK_CG_DSI0 The CG for DSI module which processes DSI signal and outputs to LCM module. It is controlled in display driver.
HAL_CLOCK_CG_LCD_APB The CG for AHB to LCD engine. It is controlled in display driver.
HAL_CLOCK_CG_AUXADC The CG for ADC. It is controlled in ADC driver.
HAL_CLOCK_CG_SENSOR_DMA The clock for sensor DMA. This clock should be enabled when using I2C0 or I2C1 with custom driver.
HAL_CLOCK_CG_I2C1 The CG for I2C1. It is controlled in I2C driver.
HAL_CLOCK_CG_I2C0 The CG for I2C0. It is controlled in I2C driver.

Enumerations

enum  hal_clock_cg_id {
  HAL_CLOCK_CG_BT_26M = 9,
  HAL_CLOCK_CG_CAMINF48M = 10,
  HAL_CLOCK_CG_BT_BUSCK = 13,
  HAL_CLOCK_CG_BT_N9 = 15,
  HAL_CLOCK_CG_BUS = 20,
  HAL_CLOCK_CG_CM = 21,
  HAL_CLOCK_CG_BSI = 23,
  HAL_CLOCK_CG_SEJ = 0 + 32,
  HAL_CLOCK_CG_DMA = 1 + 32,
  HAL_CLOCK_CG_USB48M = 2 + 32,
  HAL_CLOCK_CG_MSDC0 = 3 + 32,
  HAL_CLOCK_CG_I2C_D2D = 6 + 32,
  HAL_CLOCK_CG_I2C2 = 7 + 32,
  HAL_CLOCK_CG_CM4_OSTIMER = 10 + 32,
  HAL_CLOCK_CG_DMA_AO = 12 + 32,
  HAL_CLOCK_CG_UART0 = 13 + 32,
  HAL_CLOCK_CG_UART1 = 14 + 32,
  HAL_CLOCK_CG_UART2 = 15 + 32,
  HAL_CLOCK_CG_UART3 = 16 + 32,
  HAL_CLOCK_CG_SPISLV = 19 + 32,
  HAL_CLOCK_CG_SPI0 = 20 + 32,
  HAL_CLOCK_CG_SPI1 = 21 + 32,
  HAL_CLOCK_CG_SPI2 = 22 + 32,
  HAL_CLOCK_CG_SPI3 = 23 + 32,
  HAL_CLOCK_CG_PWM0 = 0 + 64,
  HAL_CLOCK_CG_BTIF = 1 + 64,
  HAL_CLOCK_CG_GPTIMER = 2 + 64,
  HAL_CLOCK_CG_GPCOUNTER = 3 + 64,
  HAL_CLOCK_CG_PWM1 = 4 + 64,
  HAL_CLOCK_CG_EFUSE = 6 + 64,
  HAL_CLOCK_CG_LPM = 7 + 64,
  HAL_CLOCK_CG_CM_SYSROM = 8 + 64,
  HAL_CLOCK_CG_SFC = 9 + 64,
  HAL_CLOCK_CG_MSDC1 = 10 + 64,
  HAL_CLOCK_CG_USB_DMA = 12 + 64,
  HAL_CLOCK_CG_USB_BUS = 13 + 64,
  HAL_CLOCK_CG_DISP_PWM = 14 + 64,
  HAL_CLOCK_CG_TRNG = 16 + 64,
  HAL_CLOCK_CG_PWM2 = 19 + 64,
  HAL_CLOCK_CG_PWM3 = 20 + 64,
  HAL_CLOCK_CG_PWM4 = 21 + 64,
  HAL_CLOCK_CG_PWM5 = 22 + 64,
  HAL_CLOCK_CG_LCD = 0 + 96,
  HAL_CLOCK_CG_RESEIZER = 1 + 96,
  HAL_CLOCK_CG_ROTDMA = 2 + 96,
  HAL_CLOCK_CG_CAM_BCLK = 3 + 96,
  HAL_CLOCK_CG_PAD2CAM = 4 + 96,
  HAL_CLOCK_CG_G2D = 5 + 96,
  HAL_CLOCK_CG_MM_COLOR = 6 + 96,
  HAL_CLOCK_CG_AAL = 7 + 96,
  HAL_CLOCK_CG_DSI0 = 8 + 96,
  HAL_CLOCK_CG_LCD_APB = 9 + 96,
  HAL_CLOCK_CG_AUXADC = 2 + 128,
  HAL_CLOCK_CG_GPDAC = 6 + 128,
  HAL_CLOCK_CG_SENSOR_DMA = 8 + 128,
  HAL_CLOCK_CG_I2C1 = 9 + 128,
  HAL_CLOCK_CG_I2C0 = 10 + 128
}
 Use hal_clock_cg_id in Clock API. More...
 

Enumeration Type Documentation

Use hal_clock_cg_id in Clock API.