Is there an expected SoC sequence required by power subsystem to obtain best exit latency? #34477
Replies: 3 comments 4 replies
-
Adding people to discussion @ceolin @scottwcpg |
Beta Was this translation helpful? Give feedback.
-
Hi @albertofloyd, my understanding is that step 8 should happen in So, in resume I think step 8 should be done only in One more thing, I saw the following comment in
This is much likely wrong (otherwise we have a bug) and I think the reason for this comment is that in the past the scheduler was not locked and the idle thread could be scheduled out before call |
Beta Was this translation helpful? Give feedback.
-
@scottwcpg any additional clarifications required in entry/exit suspend-to-ram sleep state (aka deep sleep) ? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently MCHP SoC supports 2 power states. idle and suspend_to_ram
During suspend_to_ram state entry follwing sequence is performed.
Mask all exceptions and interrupts except NMI and HardFault
__set_PRIMASK(1);
Save context for peripheral
SoC-specific enable sleep sequence
Unmask all interrupts in BASEPRI
__set_BASEPRI(0);
Wait for interrupt
SoC-specific disable sleep sequence
Restore peripheral context
Unmask interrupts
__set_PRIMASK(0);
Now app implement hooks state entry hook is observed that is executed ~100 miliseconds after SoC low power mode exited.
Most of time this time is spent handling _ISRs
Questions:
Is correct/expected from Zephyr perspective to unmask interrupts at step 8) event though they are eventually re-enabled inside SoC-specific pm_power_state_exit_post_ops ?
Is there any documentation that indicates how the PM subsystem hooks are to be implemented for SoC-specific sequences?
Beta Was this translation helpful? Give feedback.
All reactions