Intel® Quark™ Microcontroller Software Interface 1.4.0 Intel® Quark™ Microcontroller BSP

- Main Page
- Modules
- Data Structures
- Files

Modules | Enumerations | Enumerator | Functions
Quark D2000 Power states

Power mode control for Quark D2000 Microcontrollers. More...

## Modules
| Quark(TM) D2000 Retention Alternator Regulator (RAR).
| Retention alternator regulator for Quark D2000.

## Enumerations
enum | qm_power_wake_event_t { QM_POWER_WAKE_FROM_GPIO_COMP, QM_POWER_WAKE_FROM_RTC }
| Wake source for deep sleep mode type. More...

## Functions
void | qm_power_cpu_halt (void)
| Put CPU in halt state. More...
void | qm_power_soc_sleep ()
| Put SoC to sleep. More...
void | qm_power_soc_deep_sleep (const qm_power_wake_event_t wake_event)
| Put SoC to deep sleep. More...
void | qm_power_soc_restore (void)
| Restore system state after sleep or deep sleep. More...

## Detailed Description

Power mode control for Quark D2000 Microcontrollers.

## Enumeration Type Documentation

enum qm_power_wake_event_t

Wake source for deep sleep mode type.

Enumerator
QM_POWER_WAKE_FROM_GPIO_COMP | Use GPIO/Comparator as wake source.
QM_POWER_WAKE_FROM_RTC | Use RTC as wake source.

Definition at line 21 of file power_states.h.

## Function Documentation

void qm_power_cpu_halt | ( | void |  | ) |

Put CPU in halt state.

Halts the CPU until next interrupt or reset.

This function can be called with interrupts disabled. Interrupts will be enabled before triggering the transition.

Definition at line 29 of file power_states.c.

References SOCW_EVENT_HALT.

Referenced by qm_power_soc_deep_sleep(), and qm_power_soc_sleep().

void qm_power_soc_deep_sleep | ( | const qm_power_wake_event_t | wake_event | ) |

Put SoC to deep sleep.

Enter into deep sleep mode. All clocks are gated. The Wake source for this function depends on the input parameter, QM_POWER_WAKE_FROM_GPIO_COMP will enable waking from GPIO or comparator pins and QM_POWER_WAKE_FROM_RTC will enable waking from the RTC.

Parameters

  [in] | wake_event | Select wake source for deep sleep mode.

Definition at line 180 of file power_states.c.

References CLK_PERIPH_CLK, clk_periph_disable(), CLK_PERIPH_REGISTER, CLK_SYS_DIV_1, CLK_SYS_DIV_128, CLK_SYS_HYB_OSC_4MHZ, CLK_SYS_RTC_OSC, clk_sys_set_mode(), QM_ADC_MODE_DEEP_PWR_DOWN, qm_adc_set_mode(), qm_power_cpu_halt(), QM_POWER_WAKE_FROM_GPIO_COMP, QM_POWER_WAKE_FROM_RTC, QM_RAR_RETENTION, qm_rar_set_mode(), SOCW_EVENT_REGISTER, SOCW_REG_CCU_EXT_CLK_CTL, SOCW_REG_CCU_LP_CLK_CTL, and SOCW_REG_PMUX_SLEW.

Referenced by qm_power_soc_deep_sleep_restore(), and qm_ss_power_soc_deep_sleep_restore().

void qm_power_soc_restore | ( | void |  | ) |

Restore system state after sleep or deep sleep.

On wakeup, the system is restored to the previous state before qm_power_soc_sleep() or qm_power_soc_deep_sleep() was called.

Definition at line 402 of file power_states.c.

References qm_power_soc_deep_sleep_restore(), and qm_power_soc_sleep_restore().

Referenced by QM_ISR_DECLARE().

void qm_power_soc_sleep | ( |  | ) |

Put SoC to sleep.

Enter into sleep mode. The hybrid oscillator is disabled, most peripherals are disabled and the voltage regulator is set into retention mode. The following peripherals are disabled in this mode:

- I2C
- SPI
- GPIO debouncing
- Watchdog timer
- PWM / Timers
- UART

The SoC operates from the 32 kHz clock source and the following peripherals may bring the SoC back into an active state:

- GPIO interrupts
- AON Timers
- RTC
- Low power comparators

Definition at line 59 of file power_states.c.