Re: Power Management


Thomas, Ramesh
 

On 05/23/2016 12:27 PM, Matt Heins wrote:
I'm trying to understand the power management API and figure out what
is and isn't possible at this time. The clearest information about the
API I've found in the samples directory. In there, it suggests that
power management is not presently supported for the ARC processor on
the Arduino 101. I believe I can get power management working on the
x86 with the sample, but I'd like to also get it working on the ARC
processor. Could someone point me to any code to get that working?
As of now, PM in ARC can be done using IPM (inter processor messaging)
from the x86 side. You can refer to samples/ipm to see how x86 and ARC
can communicate. When x86 side gets notified via _sys_soc_suspend() ,
it can tell ARC to put CPU in low power state. You can refer to ARC data
sheet or arch/arc/core/cpu_idle.S to see how ARC can be put to low power
states. Sending ipm message during _sys_soc_resume() would cause ARC to
come out of low power state. You would need to setup some kind of
handshaking between ARC and x86 apps.


Also, it appears that any interrupt will bring the processor out of
low power, but the sample doesn't indicate how you might go about
figuring out what interrupt triggered. Is there a reference available
for that too?
You can probably do what the kernel event logger does - call
_sys_current_irq_key_get(). In x86, this function calls
_loapic_isr_vector_get() to get the current vector number.


Thanks

Matt

Join devel@lists.zephyrproject.org to automatically receive all group messages.