Functions
Low Power mode configuration functions
Peripheral Driver » HAL Driver » PWR | Peripheral Driver » LL Driver » SLP_TIM » Functions

## Functions
void | hal_pwr_enter_chip_deepsleep (void)
| Enters DeepSleep mode. More...
hal_status_t | hal_sleep_timer_config_and_start (uint8_t mode, uint32_t value)
| Configure the AON Sleep Timer mode, count and start used to wakeup MCU. More...
void | hal_sleep_timer_stop (void)
| stop Sleep Timer More...
uint32_t | hal_sleep_timer_get_reload_value (void)
| Get the reload value of sleep timer. More...
uint32_t | hal_sleep_timer_get_current_value (void)
| Get the current value of sleep timer. More...
uint32_t | hal_sleep_timer_get_clock_freq (void)
| Get clock frequency of sleep timer. More...
uint8_t | hal_sleep_timer_status_get (void)
| get sleep timer is running or not More...

## Detailed Description

## Function Documentation

## ◆ hal_pwr_enter_chip_deepsleep()

void hal_pwr_enter_chip_deepsleep | ( | void |  | ) |

Enters DeepSleep mode.

Note
  In DeepSleep mode, all I/O pins keep the same state as in Run mode.

## ◆ hal_sleep_timer_config_and_start()

hal_status_t hal_sleep_timer_config_and_start | ( | uint8_t | mode,
|  | uint32_t | value
| ) |  |

Configure the AON Sleep Timer mode, count and start used to wakeup MCU.

Parameters

  [in] | mode | Specifies the sleep timer mode. This parameter can be a combination of the following values: PWR_SLP_TIMER_MODE_NORMAL PWR_SLP_TIMER_MODE_SINGLE PWR_SLP_TIMER_MODE_RELOAD
  [in] | value | Count value of the AON Sleep Timer.

Return values

  HAL_OK | Operation is OK.
  HAL_BUSY | Driver is busy.

Note
  The sleep clock of AON Timer is 32 KHz.

## ◆ hal_sleep_timer_get_clock_freq()

uint32_t hal_sleep_timer_get_clock_freq | ( | void |  | ) |

Get clock frequency of sleep timer.

Return values

  clock | frequency of sleep timer

## ◆ hal_sleep_timer_get_current_value()

uint32_t hal_sleep_timer_get_current_value | ( | void |  | ) |

Get the current value of sleep timer.

Return values

  the | current value of sleep timer

## ◆ hal_sleep_timer_get_reload_value()

uint32_t hal_sleep_timer_get_reload_value | ( | void |  | ) |

Get the reload value of sleep timer.

Return values

  the | reload value of sleep timer

## ◆ hal_sleep_timer_status_get()

uint8_t hal_sleep_timer_status_get | ( | void |  | ) |

get sleep timer is running or not

Return values

  runing | state of sleep timer (1 or 0).

## ◆ hal_sleep_timer_stop()

void hal_sleep_timer_stop | ( | void |  | ) |

stop Sleep Timer