Other Parts Discussed in Thread: SYSCONFIG
I'm working on the BBAI64 platform, however this is a question that is generic to the J721E/TDA4VM microcontroller.
One of the things I’ll need to accomplish is to put the BBAI64 into a low power mode, but wake it back up in a state similar to how it went to sleep, and preferably wake much faster than a complete reboot would. From the J721E TRM, these are the various powermodes supported by the chip:
My intention is to get as low of a power-signature from the device as possible, preferably <25mA while asleep. And with the assistance of a GPIO pin (likely from the WKUP domain), power back up to the same state it was in prior to being put to sleep including resuming Linux and any/all Linux applications from the position of execution prior to being put to sleep.
Reading through the descriptions of each, it’s not really clear what the consequences to each are. For instance, if the chip is put into a SuspendToRAM state, when being reactivated, will Linux have to be rebooted and all applications relaunched?
Or can Linux (and any applications launched) resume where they were?
Can the microcontroller be returned to active state via a GPIO pin while in this state?
The only state that shows it is transitioned away from due to GPIO is DeepSleep which further supports my suspicion that this is the best state for my intentions.
As I read further, Stand-by technically can also but that’s only because Stand-by is not a very low power mode. Everything is powered and remains running, just at a lower speed hence I suspect any GPIO pin could be used to trigger the system out of this mode, not just a WKUP pin. And while this is a "lower-power mode" compared to active, my guess is its power draw is still going to be significantly higher than a car battery could tolerate for long periods of inactivity. As stated earlier, ideally a draw of no more than 25mA would be preferred while asleep. My guess is this mode would be a few hundred mA.
This is BBAI64-specific info here, but I didn’t find any pins on P8 or P9 that are in the WKUP domain, however the UART0
pins on the tiny white connector labelled J2
along the edge of the BBAI64 are from this domain. Since I don’t need that UART, I’m fine commandeering one of its pins as a wakeup trigger. Out of lack of any other knowledge, I chose WKUP_UART_RXD (J29)
and mapped it as a GPIO pin in my Sysconfig.
The plan is to be able to send a voltage into that pin and have the system come out of sleep and return to full function, no different than a computer would being woken from a sleep-state.
So given these intents:
-
Is my approach on point or are there some caveats and details that I’m obviously not aware of that are going to require I alter my approach?
-
Assuming this approach is possible, what else other than mapping the pin as a GPIO pin is necessary to trigger a wake-up behavior? I don’t know if it needs to be mapped in the DTB as an interrupt or if there’s some other more-specific incantation required.
-
What command from Linux puts the BBAI64 into "the best target state" for my intentions?
- Are there any other details or caveats to transitioning in and out of this mode that I should be aware of that would be relevant.