SDK4.0
This document shows Ameba SDK 4.0 APIs
|
sleep extended functions More...
Data Structures | |
struct | _SLEEP_WKUP_EVENT_ |
Functions | |
void | deepsleep_ex (uint32_t wakeup_event, uint32_t sleep_duration) |
To make the system entering the Deep Sleep power saving mode. The CPU, memory and peripheral power is off when entering deep sleep power saving mode. The program needs to be reload and all peripheral needs be re-configure when system resume. More... | |
void | standby_wakeup_event_del (uint32_t wakeup_event) |
To delete a wake up event for wakeing up the system from the deep standby power saving mode. More... | |
Ameba1 Only | |
typedef struct _SLEEP_WKUP_EVENT_ | SLEEP_WAKEUP_EVENT |
typedef struct _SLEEP_WKUP_EVENT_ * | PSLEEP_WAKEUP_EVENT |
void | deepstandby_ex (void) |
To make the system entering the Deep Standby power saving. The CPU, memory and part fo peripheral power is off when entering deep standby power saving mode. The program needs to be reload from the flash at system resume. More... | |
void | standby_wakeup_event_add (uint32_t wakeup_event, uint32_t sleep_duration_ms, uint32_t gpio_active) |
To add a wake up event to wake up the system from the deep standby power saving mode. More... | |
#define | SLEEP_WAKEUP_BY_GTIMER (SLP_GTIMER) |
#define | SLEEP_WAKEUP_BY_NFC (SLP_NFC) |
#define | STANDBY_WAKEUP_BY_NFC (BIT1) |
#define | STANDBY_WAKEUP_BY_PA5 (BIT4) |
#define | STANDBY_WAKEUP_BY_PC7 (BIT5) |
#define | STANDBY_WAKEUP_BY_PD5 (BIT6) |
#define | STANDBY_WAKEUP_BY_PE3 (BIT7) |
AmebaZ Only | |
void | deepstandby_ex (uint32_t sleep_duration_ms) |
To make the system entering the Deep Standby power saving. The CPU, memory and part fo peripheral power is off when entering deep standby power saving mode. The program needs to be reload from the flash at system resume. More... | |
void | standby_wakeup_event_add (uint32_t wakeup_event, uint32_t gpio_active) |
To add a wake up event to wake up the system from the deep standby power saving mode. More... | |
#define | SLEEP_WAKEUP_BY_STIMER (SLP_STIMER) |
#define | SLEEP_WAKEUP_BY_STIMER (BIT_SYSON_WEVT_SYSTIM_MSK) |
#define | SLEEP_WAKEUP_BY_GPIO_INT (SLP_GPIO) |
#define | SLEEP_WAKEUP_BY_GPIO_INT (BIT_SYSON_WEVT_GPIO_MSK) |
#define | SLEEP_WAKEUP_BY_WLAN (SLP_WL) |
#define | SLEEP_WAKEUP_BY_WLAN (BIT_SYSON_WEVT_WLAN_MSK) |
#define | SLEEP_WAKEUP_BY_SDIO (SLP_SDIO) |
#define | SLEEP_WAKEUP_BY_SDIO (BIT_SYSON_WEVT_SDIO_MSK) |
#define | SLEEP_WAKEUP_BY_USB (SLP_USB) |
#define | SLEEP_WAKEUP_BY_USB (BIT_SYSON_WEVT_USB_MSK) |
#define | STANDBY_WAKEUP_BY_STIMER (BIT0) |
#define | STANDBY_WAKEUP_BY_STIMER (BIT_SYSON_WEVT_A33_AND_A33GPIO_MSK) |
#define | DSLEEP_WAKEUP_BY_TIMER (DS_TIMER33) |
#define | DSLEEP_WAKEUP_BY_TIMER BIT(0) |
#define | DSLEEP_WAKEUP_BY_GPIO (DS_GPIO) |
#define | DSLEEP_WAKEUP_BY_GPIO BIT(2) |
#define | SLEEP_WAKEUP_BY_GPIO (BIT_SYSON_WEVT_GPIO_DSTBY_MSK) |
#define | SLEEP_WAKEUP_BY_UART (BIT_SYSON_WEVT_UART0_MSK | BIT_SYSON_WEVT_UART1_MSK) |
#define | SLEEP_WAKEUP_BY_I2C (BIT_SYSON_WEVT_I2C0_MSK | BIT_SYSON_WEVT_I2C1_MSK) |
#define | SLEEP_WAKEUP_BY_RTC (BIT_SYSON_WEVT_RTC_MSK) |
#define | STANDBY_WAKEUP_BY_GPIO (BIT_SYSON_WEVT_GPIO_DSTBY_MSK) |
#define | STANDBY_WAKEUP_BY_RTC (BIT_SYSON_WEVT_RTC_MSK) |
Ameba Common | |
void | sleep_ex (uint32_t wakeup_event, uint32_t sleep_duration) |
To make the system entering the Clock Gated power saving. This function just make the system to enter the clock gated power saving mode and pending on wake up event waitting. The user application need to configure the peripheral to generate system wake up event, like GPIO interrupt, G-Timer timeout, etc. befor entering power saving mode. More... | |
void | sleep_ex_selective (uint32_t wakeup_event, uint32_t sleep_duration, uint32_t clk_sourec_enable, uint32_t sdr_enable) |
To make the system entering the Clock Gated power saving. This function just make the system to enter the clock gated power saving mode and pending on wake up event waitting. The user application need to configure the peripheral to generate system wake up event, like GPIO interrupt , G-Timer timeout, etc. befor entering power saving mode. More... | |
sleep extended functions
void deepsleep_ex | ( | uint32_t | wakeup_event, |
uint32_t | sleep_duration | ||
) |
To make the system entering the Deep Sleep power saving mode. The CPU, memory and peripheral power is off when entering deep sleep power saving mode. The program needs to be reload and all peripheral needs be re-configure when system resume.
wakeup_event | A bit map of wake up event. This parameter can be any combination of the following values:
|
sleep_duration | the system sleep duration in ms, only valid for DSLEEP_WAKEUP_BY_TIMER wake up event. |
None |
void deepstandby_ex | ( | void | ) |
To make the system entering the Deep Standby power saving. The CPU, memory and part fo peripheral power is off when entering deep standby power saving mode. The program needs to be reload from the flash at system resume.
None |
void deepstandby_ex | ( | uint32_t | sleep_duration_ms | ) |
To make the system entering the Deep Standby power saving. The CPU, memory and part fo peripheral power is off when entering deep standby power saving mode. The program needs to be reload from the flash at system resume.
sleep_duration_ms | the system sleep duration in ms, only valid for STANDBY_WAKEUP_BY_STIMER wake up event. |
None |
void sleep_ex | ( | uint32_t | wakeup_event, |
uint32_t | sleep_duration | ||
) |
To make the system entering the Clock Gated power saving. This function just make the system to enter the clock gated power saving mode and pending on wake up event waitting. The user application need to configure the peripheral to generate system wake up event, like GPIO interrupt, G-Timer timeout, etc. befor entering power saving mode.
wakeup_event | A bit map of wake up event. This parameter can be any combination of the following values:
|
sleep_duration | the system sleep duration in ms, only valid for SLEEP_WAKEUP_BY_STIMER wake up event. |
None |
void sleep_ex_selective | ( | uint32_t | wakeup_event, |
uint32_t | sleep_duration, | ||
uint32_t | clk_sourec_enable, | ||
uint32_t | sdr_enable | ||
) |
To make the system entering the Clock Gated power saving. This function just make the system to enter the clock gated power saving mode and pending on wake up event waitting. The user application need to configure the peripheral to generate system wake up event, like GPIO interrupt , G-Timer timeout, etc. befor entering power saving mode.
wakeup_event | A bit map of wake up event. This parameter can be any combination of the following values:
|
sleep_duration | the system sleep duration in ms, only valid for SLEEP_WAKEUP_BY_STIMER wake up event. |
clk_sourec_enable | the option for SCLK on(1)/off(0) |
sdr_enable | the option for turn off the SDR controller (1:off, 0:on) |
None |
void standby_wakeup_event_add | ( | uint32_t | wakeup_event, |
uint32_t | sleep_duration_ms, | ||
uint32_t | gpio_active | ||
) |
To add a wake up event to wake up the system from the deep standby power saving mode.
wakeup_event | A bit map of wake up event. This parameter can be any combination of the following values:
|
sleep_duration_ms | the system sleep duration in ms, only valid for STANDBY_WAKEUP_BY_STIMER wake up event. |
gpio_option | for a GPIO pin to wake up the system by goes high or low This parameter can be any combination of the following values:
|
None |
void standby_wakeup_event_add | ( | uint32_t | wakeup_event, |
uint32_t | gpio_active | ||
) |
To add a wake up event to wake up the system from the deep standby power saving mode.
wakeup_event | A bit map of wake up event. This parameter can be any combination of the following values:
|
gpio_option | for a GPIO pin to wake up the system by goes high or low This parameter can be any combination of the following values:
|
None |
void standby_wakeup_event_del | ( | uint32_t | wakeup_event | ) |
To delete a wake up event for wakeing up the system from the deep standby power saving mode.
wakeup_event | A bit map of wake up event. This parameter can be any combination of the following values:
|
None |