Functions
Peripheral Control functions.
Peripheral Driver » HAL Driver » CGC » Functions

Clock Gate Open and Closemanagement functions. More...

## Functions
void | hal_cgc_config_wfi_clk (uint32_t blocks, cgc_clk_state_t clk_state)
| Configure the clock state for a specified block during WFI. More...
cgc_clk_state_t | hal_cgc_get_wfi_clk (uint32_t block)
| Get the clock state for a specified block during WFI. More...
void | hal_cgc_config_force_clk (uint32_t blocks, cgc_clk_state_t clk_state)
| Forced to Configure the clock state for a specified block. More...
cgc_clk_state_t | hal_cgc_get_force_clk (uint32_t block)
| Get the clock status of the currently specified block. More...

## Detailed Description

Clock Gate Open and Closemanagement functions.

## Function Documentation

## ◆ hal_cgc_config_force_clk()

void hal_cgc_config_force_clk | ( | uint32_t | blocks,
|  | cgc_clk_state_t | clk_state
| ) |  |

Forced to Configure the clock state for a specified block.

Parameters

  [in] | blocks | Specifies the peripheral blocks. This parameter can be a combiantion of the following values: CGC_FRC_SECU_HCLK CGC_FRC_SIM_HCLK CGC_FRC_HTB_HCLK CGC_FRC_PWM_HCLK CGC_FRC_ROM_HCLK CGC_FRC_SNSADC_HCLK CGC_FRC_GPIO_HCLK CGC_FRC_DMA_HCLK CGC_FRC_BLE_BRG_HCLK CGC_FRC_APB_SUB_HCLK CGC_FRC_SERIAL_HCLK CGC_FRC_I2S_S_HCLK CGC_FRC_AON_MCUSUB_HCLK CGC_FRC_XF_XQSPI_HCLK CGC_FRC_SRAM_HCLK CGC_FRC_UART0_HCLK CGC_FRC_UART1_HCLK CGC_FRC_I2C0_HCLK CGC_FRC_I2C1_HCLK CGC_FRC_SPIM_HCLK CGC_FRC_SPIS_HCLK CGC_FRC_QSPI0_HCLK CGC_FRC_QSPI1_HCLK CGC_FRC_I2S_HCLK CGC_FRC_SECU_DIV4_PCLK CGC_FRC_XQSPI_DIV4_PCLK
  [in] | clk_state | Specifies the clock state. This parameter can be one of the following values: CGC_CLK_ON CGC_CLK_OFF

## ◆ hal_cgc_config_wfi_clk()

void hal_cgc_config_wfi_clk | ( | uint32_t | blocks,
|  | cgc_clk_state_t | clk_state
| ) |  |

Configure the clock state for a specified block during WFI.

Parameters

  [in] | blocks | Specifies the peripheral blocks. This parameter can be a combiantion of the following values: CGC_WFI_SECU_HCLK CGC_WFI_SIM_HCLK CGC_WFI_HTB_HCLK CGC_WFI_PWM_HCLK CGC_WFI_ROM_HCLK CGC_WFI_SNSADC_HCLK CGC_WFI_GPIO_HCLK CGC_WFI_DMA_HCLK CGC_WFI_BLE_BRG_HCLK CGC_WFI_APB_SUB_HCLK CGC_WFI_SERIAL_HCLK CGC_WFI_I2S_S_HCLK CGC_WFI_AON_MCUSUB_HCLK CGC_WFI_XF_XQSPI_HCLK CGC_WFI_SRAM_HCLK CGC_WFI_SECU_DIV4_PCLK CGC_WFI_XQSPI_DIV4_PCLK
  [in] | clk_state | Specifies the clock state during WFI. This parameter can be one of the following values: CGC_CLK_ON CGC_CLK_OFF

## ◆ hal_cgc_get_force_clk()

cgc_clk_state_t hal_cgc_get_force_clk | ( | uint32_t | block | ) |

Get the clock status of the currently specified block.

Parameters

  [in] | block | Specifies the peripheral blocks. This parameter can be one of the following values: CGC_FRC_SECU_HCLK CGC_FRC_SIM_HCLK CGC_FRC_HTB_HCLK CGC_FRC_PWM_HCLK CGC_FRC_ROM_HCLK CGC_FRC_SNSADC_HCLK CGC_FRC_GPIO_HCLK CGC_FRC_DMA_HCLK CGC_FRC_BLE_BRG_HCLK CGC_FRC_APB_SUB_HCLK CGC_FRC_SERIAL_HCLK CGC_FRC_I2S_S_HCLK CGC_FRC_AON_MCUSUB_HCLK CGC_FRC_XF_XQSPI_HCLK CGC_FRC_SRAM_HCLK CGC_FRC_UART0_HCLK CGC_FRC_UART1_HCLK CGC_FRC_I2C0_HCLK CGC_FRC_I2C1_HCLK CGC_FRC_SPIM_HCLK CGC_FRC_SPIS_HCLK CGC_FRC_QSPI0_HCLK CGC_FRC_QSPI1_HCLK CGC_FRC_I2S_HCLK CGC_FRC_SECU_DIV4_PCLK CGC_FRC_XQSPI_DIV4_PCLK

Return values

  CGC_CLK_ON | Clock On.
  CGC_CLK_OFF | Clock Off.

## ◆ hal_cgc_get_wfi_clk()

cgc_clk_state_t hal_cgc_get_wfi_clk | ( | uint32_t | block | ) |

Get the clock state for a specified block during WFI.

Parameters

  [in] | block | Specifies the peripheral blocks. This parameter can be one of the following values: CGC_WFI_SECU_HCLK CGC_WFI_SIM_HCLK CGC_WFI_HTB_HCLK CGC_WFI_PWM_HCLK CGC_WFI_ROM_HCLK CGC_WFI_SNSADC_HCLK CGC_WFI_GPIO_HCLK CGC_WFI_DMA_HCLK CGC_WFI_BLE_BRG_HCLK CGC_WFI_APB_SUB_HCLK CGC_WFI_SERIAL_HCLK CGC_WFI_I2S_S_HCLK CGC_WFI_AON_MCUSUB_HCLK CGC_WFI_XF_XQSPI_HCLK CGC_WFI_SRAM_HCLK CGC_WFI_SECU_DIV4_PCLK CGC_WFI_XQSPI_DIV4_PCLK

Return values

  CGC_CLK_ON | Clock On.
  CGC_CLK_OFF | Clock Off.