Can AMB82-mini Deep Sleep use both AON GPIO and AON Timer as wake sources simultaneously?

Hi,

I’m building a battery-powered device on AMB82-mini (RTL8735B) and need the system to wake from Deep Sleep via two sources at the same time: an AON GPIO pin (pin 21, triggered by an external signal) and an AON Timer as a fallback (e.g. wake after 1 hour if no GPIO event occurs).

The official example only shows one source at a time, selected via a single WAKEUP_SOURCE define with #if / #elif branching. My question is: is it possible to configure both sources before calling PowerMode.start()?

I tried calling PowerMode.begin() twice — once with source 1 (AON GPIO) and once with source 0 (AON Timer) — hoping the second call adds to the AON register rather than replacing it:

PowerMode.begin(DEEPSLEEP_MODE, 1, 0, 21);         // GPIO pin 21
PowerMode.begin(DEEPSLEEP_MODE, 0, 0, 4000000, 3600); // AON timer, 1h
PowerMode.start();

I haven’t been able to confirm whether this works or whether the second begin() simply overwrites the first. I don’t have access to the PowerMode library source to check the register-level behavior.

Questions:

  1. Does RTL8735B hardware support OR-ing multiple AON wakeup sources in Deep Sleep?
  2. Does the Arduino PowerMode library support configuring more than one source before start()?
  3. If not, is there a lower-level API (C SDK / register write) that would allow this?

If the Arduino PowerMode library doesn’t support this, is it possible to configure dual wakeup sources (AON Timer + AON GPIO simultaneously) through the FreeRTOS SDK directly?

Any insight appreciated. Thanks!

Hi @inxnik ,

Yes, AMB82-mini does support multiple wakeup sources configuration. We will be updating the API and examples in our Arduino SDK soon. Meanwhile, you may refer to the changes made in the patch files provided to enable multiple wakeup sources.

Thank you.

power_mode_update.zip (7.1 KB)