Intel® Quark™ Microcontroller Software Interface
1.4.0
Intel® Quark™ Microcontroller BSP
|
SoC Power mode control for Quark SE Microcontrollers. More...
Functions | |
void | qm_power_soc_sleep (void) |
Enter SoC sleep state. More... | |
void | qm_power_soc_deep_sleep (void) |
Enter SoC deep sleep state. More... | |
void | qm_power_soc_sleep_restore (void) |
Enter SoC sleep state and restore after wake up. More... | |
void | qm_power_soc_deep_sleep_restore (void) |
Enter SoC deep sleep state and restore after wake up. More... | |
void | qm_power_sleep_wait (void) |
Save context, enter x86 C2 power save state and restore after wake up. More... | |
void | qm_power_soc_set_x86_restore_flag (void) |
Enable the x86 startup restore flag, see GPS0 #define in qm_soc_regs.h. | |
SoC Power mode control for Quark SE Microcontrollers.
Available SoC states are:
LPSS can only be enabled from the Sensor core, refer to qm_ss_power_soc_lpss_enable for further details.
void qm_power_sleep_wait | ( | void | ) |
Save context, enter x86 C2 power save state and restore after wake up.
This routine is same as qm_power_soc_sleep_restore(), just instead of going to sleep it will go to C2 power save state. Note: this function has a while(1) which will spin until we enter (and exit) sleep while the power state change will be managed by the other core.
Definition at line 108 of file power_states.c.
References qm_power_cpu_c2(), and qm_power_soc_set_x86_restore_flag().
void qm_power_soc_deep_sleep | ( | void | ) |
Enter SoC deep sleep state.
Put the SoC into deep sleep state until next SoC wake event.
Possible SoC wake events are:
This function puts 1P8V regulators and 3P3V into Linear Mode.
Definition at line 23 of file power_states.c.
References SOCW_EVENT_REGISTER, SOCW_EVENT_SLEEP, SOCW_REG_SLP_CFG, vreg_plat1p8_set_mode(), and vreg_plat3p3_set_mode().
void qm_power_soc_deep_sleep_restore | ( | void | ) |
Enter SoC deep sleep state and restore after wake up.
Put the SoC into deep sleep state until next SoC wake event and continue execution after wake up where the application stopped.
If the library is built with ENABLE_RESTORE_CONTEXT=1, then this function will use the common RAM __x86_restore_info[0] to save the necessary context to bring back the CPU to the point where this function was called. This means that applications should refrain from using them.
This function calls qm_x86_save_context and qm_x86_restore_context in order to restore execution where it stopped. All power management transitions are done by qm_power_soc_deep_sleep().
Definition at line 304 of file power_states.c.
References clk_periph_enable(), CLK_PERIPH_REGISTER, qm_power_soc_deep_sleep(), qm_power_soc_set_x86_restore_flag(), QM_RAR_NORMAL, qm_rar_set_mode(), SOCW_EVENT_REGISTER, SOCW_REG_CCU_EXT_CLK_CTL, SOCW_REG_CCU_LP_CLK_CTL, SOCW_REG_CCU_PERIPH_CLK_GATE_CTL, SOCW_REG_CCU_SYS_CLK_CTL, SOCW_REG_OSC0_CFG1, and SOCW_REG_PMUX_SLEW.
Referenced by qm_power_soc_restore().
void qm_power_soc_sleep | ( | void | ) |
Enter SoC sleep state.
Put the SoC into sleep state until next SoC wake event.
Possible SoC wake events are:
Enter SoC sleep state.
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:
The SoC operates from the 32 kHz clock source and the following peripherals may bring the SoC back into an active state:
Definition at line 59 of file power_states.c.
References clk_periph_disable(), CLK_PERIPH_GPIO_DB, CLK_PERIPH_GPIO_REGISTER, CLK_PERIPH_I2C_M0, CLK_PERIPH_I2C_M0_REGISTER, CLK_PERIPH_PWM_REGISTER, CLK_PERIPH_SPI_M0, CLK_PERIPH_SPI_M0_REGISTER, CLK_PERIPH_SPI_S, CLK_PERIPH_SPI_S_REGISTER, CLK_PERIPH_UARTA_REGISTER, CLK_PERIPH_UARTB_REGISTER, CLK_PERIPH_WDT_REGISTER, CLK_SYS_DIV_8, CLK_SYS_HYB_OSC_4MHZ, clk_sys_set_mode(), QM_ADC_MODE_PWR_DOWN, qm_adc_set_mode(), qm_power_cpu_halt(), QM_RAR_RETENTION, qm_rar_set_mode(), SOCW_EVENT_REGISTER, SOCW_EVENT_SLEEP, SOCW_REG_CCU_LP_CLK_CTL, and SOCW_REG_SLP_CFG.
Referenced by qm_power_soc_sleep_restore(), and qm_ss_power_soc_sleep_restore().
void qm_power_soc_sleep_restore | ( | void | ) |
Enter SoC sleep state and restore after wake up.
Put the SoC into sleep state until next SoC wake event and continue execution after wake up where the application stopped.
If the library is built with ENABLE_RESTORE_CONTEXT=1, then this function will use the common RAM __x86_restore_info[0] to save the necessary context to bring back the CPU to the point where this function was called. This means that applications should refrain from using them.
This function calls qm_x86_save_context and qm_x86_restore_context in order to restore execution where it stopped. All power management transitions are done by qm_power_soc_sleep().
Definition at line 135 of file power_states.c.
References qm_power_soc_set_x86_restore_flag(), qm_power_soc_sleep(), QM_RAR_NORMAL, qm_rar_set_mode(), SOCW_EVENT_REGISTER, SOCW_REG_CCU_PERIPH_CLK_GATE_CTL, SOCW_REG_CCU_SYS_CLK_CTL, and SOCW_REG_OSC0_CFG1.
Referenced by qm_power_soc_restore().