Power Save - Tickless Mode

Materials

  • AmebaD [AMB21 / AMB22 / AMB23 / BW16] x 1

Example

Introduction

Ameba-D supports two low power modes which are deepsleep mode and sleep mode. The power consumptions of Tickless Sleep Mode is around 28uA to 30uA compare to normal state around 15mA. This example describes how to use freertos tickless with uart interruptable interface.

Procedure

Open “File” “Examples” “AmebaPowerSave” “TicklessMode”

../../../../_images/image165.png

Set condition values as picture below. “TL_WAKEUP_SOURCE” is used to set the wake-up source, user can chose 3 wake up sources now,

LOGUART(SET_TL_UART_WAKEUP);
RTC Timer(SET_TL_RTC_WAKEUP);
AON pins(SET_AON_WAKEPIN_WAKEUP);

Using LOGUART as wakeup source

When the LOGUART is selected as the wakeup source, the “TL_Suspend_function” will enter sleep mode. And then it is kept alive for 13s then enter sleep mode. To wakeup, press enter.

Using RTC Timer as wakeup source

RTC Timer wakeup system is by setting alarm. The alarm has 4 values to be set, day, hour, min and sec. All 4 values can be set by DS_RTC_ALARM_DAY, DS_RTC_ALARM_HOUR, DS_RTC_ALARM_MIN, and DS_RTC_ALARM_SEC.

../../../../_images/image260.png

Using AON GPIO pins as wakeup source

For AMB21, there are 5 pins that can be set as AON pins and active high for wakeup, GPIOA25(D16), GPIOA26(D17), GPIOA21(D26), GPIOA20(D27), GPIOA(D28).

../../../../_images/image341.png

For AMB23, there are 8 pins that can be set as AON pins and active high for wakeup, GPIOA12(D9), GPIOA13(D10), GPIOA14(D11), GPIOA15(D12), GPIOA16(D13), GPIOA18(D15), GPIOA19(D16), GPIOA21(D18).

../../../../_images/image430.png

For BW16 and BW16-TypeC, there is only 6 pins that can be set as AON pin and active high for wakeup, GPIOA_25 (D7), GPIOA_26 (D8), GPIOA_15 (D9), GPIOA_14 (D10), GPIOA_13 (D11), GPIOA_12 (D12).

../../../../_images/image522.png ../../../../_images/image612.png ../../../../_images/image710.png

TL_SYSACTIVE_TIME is for setting time duration of the system to keep alive. (Unit ms)

LOGUART

../../../../_images/image88.png

RTC Timer

../../../../_images/image95.png

AON GPIO Pins

../../../../_images/image105.png

Code Reference

Please refer to the API Documents PowerSave section for detail description of all API.