Skip to content

Fix powman powman_configure_wakeup_state and powman_get_power_state #2516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 20, 2025

Conversation

eightycc
Copy link
Contributor

This PR resolves issues #2506 and #2511:

To conform with SDK usage, powman_get_power_state now returns the complemented contents of field POWMAN_STATE_CURRENT_BITS of the POWMAN STATE register (#2506).

Corrects operation of powman_configure_wakeup_state (#2511):

  • Validates that sleep state is one of the P1.x states, and that the wake-up state is one of the P0.x states.
  • Correctly validates power manager state transitions while taking into account the current state, the sleep state, and the wake-up state. Validation conforms to section 6.2.3 of the RP2350 datasheet.
  • Sets the SEQ_CFG register bits HW_PWRUP_SRAM0 and HW_PWRUP_SRAM1 while taking into account both the sleep state and the wake-up state.

Copy link
Contributor

@peterharperuk peterharperuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing our code! I've spent some time staring at it and done some testing with my powman example and I think it makes sense. It fixes the weird situation where you couldn't specify SRAM on in the wakeup state - which never made sense to me.

@kilograham kilograham merged commit 8fb131a into raspberrypi:develop Jun 20, 2025
4 checks passed
@lurch lurch mentioned this pull request Jun 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants