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:
- Does RTL8735B hardware support OR-ing multiple AON wakeup sources in Deep Sleep?
- Does the Arduino
PowerModelibrary support configuring more than one source beforestart()? - 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!