MT2523 API Reference  LinkIt SDK v4
Clock

Overview

HAL_CLOCK_CG_ID descriptions

Each hal_clock_cg_id is related to one hardware clock gate. Please check the following impacts 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_CM4_OSTIMER The clock for OS timer. It cannot be disabled, otherwise the system will fail.
HAL_CLOCK_CG_UART0 The clock for UART0. It cannot be disabled, otherwise the system will fail.
HAL_CLOCK_CG_SPISLV The clock for SPI slave. This clock should be enabled when it is connected to the master device if choosing a custom driver.
HAL_CLOCK_CG_GPCOUNTER The clock for general purpose counter timer. It cannot be disabled, otherwise the system will fail.
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_DISP_PWM The clock for display. This clock should be enabled if choosing a custom display driver.
HAL_CLOCK_CG_AAL The clock for Ambient-Light Adaptive Luma. This clock should be enabled if choosing a custom display driver.
HAL_CLOCK_CG_DSI0 The clock for display serial interface. This clock should be enabled if choosing a custom display driver.
HAL_CLOCK_CG_SENSOR_DMA The clock for sensor DMA. This clock should be enabled when using I2C0 or I2C1 with custom 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 clock_id in CLOCK API. More...
 

Enumeration Type Documentation

Use clock_id in CLOCK API.