For Gen 3 devices what are people using for an idle state?
My battery application requires reasonably quick response <1min but i also need to be power conscious.
It seems the deep sleep stuff requires long periods to reconnect and misses many cloud functions.
Can I use the usual ARM Wait For Interrupt (__WFI) or Wait For Event (__WFE) to reduce power just a bit? Or is this already part of the RTOS?
So far it seems a bit sketchy. The WFE seems to mess with obtaining a cloud connection. But once connected its seems ok. Reponds to pings and functions as normal.
I might not both for the 8mW of power savings the potential for problems is too much. I think a wait stop needs to be incorporated to the RTOS idle task for less obtrusion.
Using this sketch on an idling boron I got these results over 60s average.
Without the Wait code: (3.92V x 48mA) 188.16mW
With the Wait code: (3.92V x 46mA) 180.3mW
SYSTEM_THREAD(ENABLED);
LEDSystemTheme theme; // Enable custom theme
void setup() {
theme.setColor(LED_SIGNAL_CLOUD_CONNECTED, 0x00000000); // Set LED_SIGNAL_NETWORK_ON to no color
theme.apply(); // Apply theme settings
}
void loop() {
if(Particle.connected() && millis() > 60000){
//__WFE();
}
}
Bump, I was wondering if any of the Particle team are working on adding a cpu wait state in the main loop? Or at least in the delay loop to reduce power?